StockFetcher Forums · Filter Exchange · Keltner channels<< >>Post Follow-up
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

Fetcher[

set{abv, days(Close crossed above the Upper Keltner Band(20,2.0,10),3)}
add column abv

set{blw, days(Close crossed below the Lower Keltner Band(20,2.0,10),3)}
add column blw

draw abv
draw blw
draw Keltner Band(20,2.0,10)

volume > 12312
close > 10
]



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:

Fetcher[

set{20ema, EMA(20)}
set{width, ATR(10)*2}
set{upperK, 20ema + width}
set{lowerK, 20ema - width}
draw upperK on plot price
draw lowerK on plot price

/*now find stocks that either crossed below lowerK OR above upperK*/

set{aboveKelt, count(close above upperK,1)}
set{belowKelt, count(close below lowerK,1)}
set{trigger, aboveKelt + belowKelt}

trigger above 0.5
trigger 1 day ago below 0.5
close above 1

add column trigger
add column aboveKelt
add column belowKelt

sort on column 6 descending
]



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.

StockFetcher Forums · Filter Exchange · Keltner channels<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.