
This strategy combines Keltner Channels and Momentum indicators to identify potential breakout trading opportunities and determine market trend strength. The strategy monitors price breakouts of Keltner Channels while using the Momentum indicator to confirm trend strength for making trading decisions.
The core logic is based on two main technical indicators: 1. Keltner Channels (KC): - Middle line: 20-period Exponential Moving Average (EMA) - Upper/Lower bands: Middle line ±1.5 times Average True Range (ATR) 2. Momentum Indicator: - Calculates price rate of change over 14 periods - Positive values indicate bullish momentum, negative values indicate bearish momentum
Trading signal rules: - Long entry: Price breaks above upper band and momentum is positive - Short entry: Price breaks below lower band and momentum is negative - Exit conditions: Price crosses middle band or momentum reverses
Risk control suggestions: - Set maximum position limits - Dynamically adjust parameters based on volatility - Add trend confirmation filters - Consider fixed stop loss levels
The strategy combines Keltner Channels and Momentum indicators to create a reliable trend-following trading system. Its strengths lie in high signal reliability and reasonable risk control, though market conditions can impact performance. Through parameter optimization and signal filter improvements, the strategy’s stability and profitability can be further enhanced.
/*backtest
start: 2025-02-02 00:00:00
end: 2025-02-09 00:00:00
period: 15m
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Keltner Channels + Momentum Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=200)
// Nastavenia Keltner Channels
lengthKC = input.int(20, title="KC Dĺžka")
mult = input.float(1.5, title="KC Multiplikátor")
src = input(close, title="Zdroj")
// Výpočet Keltner Channels
emaKC = ta.ema(src, lengthKC)
atrKC = ta.atr(lengthKC)
upperKC = emaKC + mult * atrKC
lowerKC = emaKC - mult * atrKC
// Vykreslenie Keltner Channels
plot(upperKC, color=color.blue, title="Horný Keltner Kanal")
plot(emaKC, color=color.orange, title="Stredný Keltner Kanal")
plot(lowerKC, color=color.blue, title="Dolný Keltner Kanal")
// Nastavenia Momentum
lengthMomentum = input.int(14, title="Momentum Dĺžka")
momentum = ta.mom(close, lengthMomentum)
// Vykreslenie Momentum
hline(0, "Nulová Čiara", color=color.gray)
plot(momentum, color=color.purple, title="Momentum")
// Logika stratégie
// Vstup do Long pozície: cena prekročí horný Keltner kanal a Momentum je rastúci
longCondition = ta.crossover(close, upperKC) and momentum > 0
if (longCondition)
strategy.entry("Long", strategy.long)
// Vstup do Short pozície: cena prekročí dolný Keltner kanal a Momentum je klesajúci
shortCondition = ta.crossunder(close, lowerKC) and momentum < 0
if (shortCondition)
strategy.entry("Short", strategy.short)
// Výstup z Long pozície: cena prekročí stredný Keltner kanal alebo Momentum klesne pod 0
exitLong = ta.crossunder(close, emaKC) or momentum < 0
if (exitLong)
strategy.close("Long")
// Výstup z Short pozície: cena prekročí stredný Keltner kanal alebo Momentum stúpne nad 0
exitShort = ta.crossover(close, emaKC) or momentum > 0
if (exitShort)
strategy.close("Short")