I have a scan that is supposed to look for stocks that have closed above the Keltner channel anytime within the last 25 days (along with some other basic stuff). Problem is, this scan is not at all matching what other scanning services are returning. For example, KMX is an excellent setup that StockCharts doesn’t show, and I cannot figure out why it is being excluded. I am thinking the Keller line is somehow wrong, but am not sure. Any ideas?
Here is the code I’m working with:
[type is stock]
and [group is not ETF]
and [country = US]
and [EMA(20,Close) > 5]
and [EMA(50, Volume) > 200000]
and [Max(25,close) > Upper Kelt Chan(20,2.25,10)]
and [RSI(14) >= 45.0]
and [RSI(14) <= 65.0]
Comments
For strictly accurate results, you have to compare each of the past 25 closes to each corresponding Upper Kelt value in an "or" statement, so that if any one comparison is true you will get a hit.
So, it would be
// begin scan
... // other stuff
and
[ // begin or statement
[25 days ago close > 25 days ago Upper Kelt Chan(20,2.5,10)]
or
[24 days ago close > 24 days ago Upper Kelt Chan(20,2.5,10)]
or
...
] // end or statement
.... // other stuff
// end scan
Thank you! I see my mistake now. It’s very annoying you can’t make within statements. This is standard with other services like StockFetcher.