Below is my stock screener that I use on a daily basis for my super trend strategy. I use proRealTimes ProScreener functionality and below is the code to use in the stock screener. If you need more information on creating a stock screener in proRealTime you can read my stock screener tutorial. If you are still struggling you can either contact me or post on the spread betting forum and I will do my best to help you out.
I think the code is fairly straight forward, but then I would think that being a software engineer. Below is my attempt to explain what is happening in the code.
Stock screener explanation
Indicator1 is the current super trend value based on a 3*ATR value. The ATR value is a 10 period ATR.
Indicator2 is set to the latest close value.
C1 becomes true if the previous super trend value (indicator1) is greater than the previous close (indicator2) and the current super trend value (indicator1) is less than the current close (indicator2). Therefore the super trend value has just crossed price switching from down trend to uptrend mode.
C2 becomes true if the previous super trend value (indicator1) is less than the previous close (indicator2) and the current super trend value (indicator1) is greater than the current close (indicator2). Therefore the super trend value has just crossed price switching from up trend to down trend mode.
If C1 or C2 is true then return the instrument in the screener list.
————CODE STARTS HERE—————REMOVE THIS LINE————————–
indicator1 = SuperTrend[3,10]
indicator2 = close
c1 = (indicator1 > indicator2 and indicator1 < indicator2) c2 = (indicator1 < indicator2 and indicator1 > indicator2)
SCREENER[c1 or c2] ((close/DClose(1)-1)*100 AS “% Chg yesterday”)
————CODE ENDS HERE—————REMOVE THIS LINE————————–
The other settings for this stock screener can be obtained from the screen shot below.
Click image to see larger version. Image © ProRealTime