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.
Same answer as before. Test MACD for bearish, if that's not true (in other words, MACD is bullish), you'll get results for the "or" conditions if any are true.
Of course, the easiest way is to run a separate scan for MACD is bullish for SPX. If you don't get a result, don't run the other scan(s).
A buyable gap up should be at least .75 times a stocks 40 day ATR. I think that this one is easy to code but I'm having a little trouble today? [Close > ATR(40,Close)*1.75] I assume that the scan default time period for ATR is 14? Anyway, how does that look?
On second though, I think that is not correct either, I am looking for a gain in price that is at least 1.75 times greater than the 40 day average of its ATR
The simple moving average function is sma(x, y). X is the length of the average, y is whatever you want to average, usually the close, but it can be anything, like an indicator.
Comments
Of course, the easiest way is to run a separate scan for MACD is bullish for SPX. If you don't get a result, don't run the other scan(s).
I think you want
and [ open - 1 day ago close > 1 day ago ATR(14) * 1.75]