Keltner; what am I missing?

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
-
Your scan is asking, is the max close in the last 25 days greater than TODAY'S Upper Kelt value. It doesn't say anything about previous Upper Kelt values. It also doesn't say anything about other closes in the last 25 days that are not the max close ( a close other than the max close might have closed above its Kelt, while the max close might be below its Kelt - for instance, if the stock dropped sharply).
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 scan0 -
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.
0 -
Well, I think the scan language is deliberately kept simple so non-IT experienced users can use it. Also, the more complicated the language gets, the more support issues there are. I've found it's possible to code anything you are likely to need, but you may have to open up to a different way of looking at some problems.0
Categories
- All Categories
- 2.3K StockCharts
- 395 SharpCharts
- 146 Other Charting Tools
- 69 Saved Charts and ChartLists
- 1.5K Scanning
- 73 Data Issues
- 177 Other StockCharts Questions
- 218 Technical Analysis
- 155 Using Technical Analysis
- 2 InterMarket and International
- 19 Market and Breadth Indicators
- 42 Market Analysis
- 109 Trading
- 109 Trading Strategies
- 163 S.C.A.N the StockCharts Answer Network forum
- 65 Using this StockCharts Answer Network forum
- 98 s.c.a.n. archives
- 5 Off-Topic
- 6 The Cogitation & Rumination Emporium
- Forum Test Area