New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

Scan crosses above ma of indicators

Hi everyone I try to set up a scan for an ma/indicator cross but I dont mange to get the scan correctly. I want to scan for stocks where the indicators just closed/crossed above (long) or below the ma20 (of the indicator). Both at the same time.
the indicators I want to use are $SYMBOL:$SPX with an ema20 overlay and OBV(on balance volume) with an ema20 overlay. so both conditions have to be met at the same time. the picture attached shows a short scan. this stock should show up on the 19th of march as the both requierements are met.






_______________________________
this is what I came up with (worng syntax)
[type = stock] AND [Daily SMA(20,Daily Volume) > 100000]

and [today's OBV < today's ema(20,OBV)]
and [$symbol:$SPX < SMA(20,$symbol : $SPX)]
and [group is DOW65]


BIG THANKS for your help in advance.
btw I took a look here

Comments

  • markdmarkd mod
    edited March 2020
    You have the right idea, but the scan engine does not "understand" ratio expressions like $SYMBOL:$SPX. So you have the right idea about putting the indicator inside the sma. So a crossover would be

    and [Force(21) x sma(21, Force(21))]

    (note the double parens - one set for sma(... ) and one set for Force(... ) )

  • You can try to use the PcTRelative indicator in the Technical Indicators drop down
    Example:

    PctRelative(39,$SPX) > 5

    I've tried it with other indicators

    Example:

    PctRelative(39,$SPX, ROC(5)) > 5

    I can't vouch for it being useful or correct, but it does pass syntax and it does return results. I haven't tried SMA

Sign In or Register to comment.