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.
How do you right a syntax for the most recent stock price crossing above 10 day MA or below 10 day MA. If you want to scan for most recent I assume you would have to write it for stock price crossing above 10 day MA or below 10 day MA1 day ago?
0
Comments
Price X Moving Average for a cross up.
Moving Average X Price for a cross down.
If you pick 1 day ago MA, then you would get the current Price and the 1 day ago MA. The cross could have happened 1 day ago, if the current price was above the 1 day ago MA or "today". Today being the current price.
Then from the Price SCTRs Volume drop down select your price type. Click Add to get it into the workbench.
Then select the MA from the Technical Indicators dropdown and Add
So, unformatted correctly as I'm not picking and adding from the workbench, it will look like
[Group is SP500]
and [Close > 99]
and [SMA(50,volume) > 99999]
You want to change the MA clause to look at the Close instead of volume
[Group is SP500]
and [Close > 99]
and [SMA(50,close) > 99999]
then you want to put the last two lines together to ask for the cross
[Group is SP500]
and [Close X SMA(50,close)]
or you mention 1 day ago for the cross, you'd either use the calendar at the top of the workbench where it says Starting 0 days before.... and change the 0 to a 1 for the prior trading day.
or change it in the scan language and leave the calendar alone.
[Group is SP500]
and [1 day ago Close X 1 day ago SMA(50,close)]
If you get stuck, copy and paste to post here what you have in the workbench for trouble shooting assistance.