Hi, I tried to build a stock screener based on the proven Tushar Chande 65SMA3CC strategy.
Here is were I come so far, but the screener seems not to work. Please can anybody help me out on this one?
ind=ADX[20]
c1= close[2] crosses over average [65]
c2=(close > open AND close[1]>open[1] AND close[2]>open[2] AND close>close[1] AND close[1]>close[2])
c3= close[2] crosses under average [65]
c4=(close < open AND close[1]<open[1] AND close[2]<open[2] AND close<close[1] AND close[1]<close[2])
c5= ind>20
screener [c1 and c2 and c5 or c3 and c4 and c5]
Thank you……..
Here is my second attempt
ind=ADX[20]
c1= ind>25
c2=(close > open AND close[1]>open[1] AND close[2]>open[2] AND close>close[1] AND close[1]>close[2]) AND close[2] > average [65]
c3=(close < open AND close[1]<open[1] AND close[2]<open[2] AND close<close[1] AND close[1]<close[2])AND close[2] < average [65]
screener [c1 and c2 or c1 and c3]
Anybody any suggestions to make this screener better?
> For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! <<
You should separate conditions like this instead:
screener [(c1 and c2) or (c1 and c3)]
or for your first code:
screener [(c1 and c2 and c5) or (c3 and c4 and c5)]
Otherwise your whole tested conditions will never be true all at the same time and those I made under brackets are completely different conditions from the other ones.