Keltner channel breakout
A close above the Keltner channel on rising volume marks unusual strength. Ride it with an ATR trailing stop and get out when the price falls back under its 20-day average.
Strategies · keltner_breakout.rvw
language 1
strategy "Keltner channel breakout" {
universe members("SYN500")
filter adv(20) > $500000
enter long when close > keltner_upper(20, width) and volume > sma(volume, 20)
rank by (close - keltner_upper(20, width)) / atr(20)
size 5% of equity, max 15 positions
trail 3 x atr(20)
exit when close < ema(close, 20)
param width = 2 in 1..3 step 0.5
}
Functions it uses
adv, keltner_upper, sma, atr, ema
Try it
File ▸ New Script from Example adds it to a project. The examples read the sample’s index label, SYN500, and market ETF, SYNSPY; when your data has neither, a sheet asks what to read instead, one of your index labels (or every stock and ETF) and a ticker, so the example runs on your data as it is.
Before you trust what it does on your data, see whether it’s luck: Is this result luck?