MA crossing screener

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #239449 quote
    VarmaRudra
    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
    robertogozzi
    Moderator
    Master

    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
    VarmaRudra
    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.

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 VarmaRudra
1 year, 4 months ago.

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