papagatorga 124 posts msg #105019 - Ignore papagatorga |
2/17/2012 12:33:11 PM
On StockCharts, my platform plots Keltner channels as (20,2,0,10). I am seeking a filter that identifies crosses of the top and bottom lines. I realize that would be two different filters. Cross the top line to the upside and bottom line to downside. In other words, outside the lines. StockFetcher or anyone can you help me? Say crosses within the last 3 days.
|
four 5,087 posts msg #105025 - Ignore four modified |
2/17/2012 3:56:31 PM
error fixed... thanks Kevin
|
Kevin_in_GA 4,599 posts msg #105027 - Ignore Kevin_in_GA |
2/17/2012 5:04:59 PM
____________
I think this is more like what you are asking - BTW, you had a typo in your settings, which should be (20,2.0,10).
StockCharts uses the n-day average for the ATR to determine the width of the band, and is calculated as follows:
Middle Line: 20-day exponential moving average
Upper Channel Line: 20-day EMA + (2 x ATR(10))
Lower Channel Line: 20-day EMA - (2 x ATR(10))
If you want an exact translation into SF code it is best to write this from scratch:
This is a lot of stocks, so you might want to combine this with at least one more screening criterion.
|
papagatorga 124 posts msg #105040 - Ignore papagatorga |
2/18/2012 3:24:10 PM
Thank you both. Kevin it does seem to be working well. Yes there are too many results, I had not expected near that number. I cut it to a managable number for my purposes, with a volume and price filter (vol over 1,000,000 and price over 10). It reflects some very good results going back one or two weeks. Now if I could figure how to select those winners.
|