MA crossing screener

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #239449 quote
    VarmaRudraVarmaRudra
    Participant
    New

    I want to develop a weekly screener with following conditions.

    • EMA20 cross over EMA50 happened around six months back for the first time in the last two years
    • Close is either very near to EMA[20] or  moved below EMA20 only slightly

    I developed the screener using lot of for loops and some calculations but getting very messy

    I am just hoping to get some help in doing this relatively easy way please. Thanks in advance.

    #239451 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    There you go (set TYPE=1 for EMAs, TYPE=0 for SMAs, etc…):

    Timeframe(Weekly)
    PerCent = 1   //1%  above or below MA20 is to be considered VERY NEAR
    Type    = 1
    MA20    = average[20,Type](close)
    MA50    = average[50,Type](close)
    c1      = (summation[104](MA20 CROSSES OVER MA50) = 1)
    c2      = (summation[5](MA20[24] CROSSES OVER MA50[24]) = 1)
    c3      = (close <= (MA20 * (1 + (PerCent / 100)))) AND (close >= (MA20 * (1 - (PerCent / 100))))
    c4      = MA20 > MA50
    Timeframe(default)
    Cond    = c1 AND c2 AND c3 AND c4 AND (high <> low)
    SCREENER[Cond]
    VarmaRudra and Iván González thanked this post
    x-15.jpg x-15.jpg
    #239462 quote
    VarmaRudraVarmaRudra
    Participant
    New

    This worked like a magic and given me some good ideas on clean coding. Thank you very much.

    robertogozzi thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

MA crossing screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
VarmaRudra @varmarudra Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by VarmaRudraVarmaRudra
1 year, 10 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 10/25/2024
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...