Keltner Channel Breakouts with SMA Trend, Time, and Risk Filters
Summary
This Pine strategy defines breakouts as closes beyond an ATR-based Keltner Channel, whose center is an exponential moving average. A configurable simple moving average filter classifies direction by whether the average is rising or falling, and the script offers controls for trade direction, session hours, stop distance, and an optional profit target. The visible settings use a 20-period channel EMA, 10-period ATR, channel multiplier of 2, and a 200-period SMA; the initial stop is 10 points and the optional target is 20 points.
The supplied excerpt is incomplete: it ends during the trade-direction logic, before the full entry, exit, and time-filter implementation can be assessed. It includes no market, timeframe, backtest configuration, or performance evidence. The code comments indicate signals are confirmed at bar close and intended to enter at the next bar open, but execution details cannot be verified from the excerpt. Thus the document teaches a recognizable breakout framework and its configurable controls, not evidence of an effective strategy.
Key ideas
- A close above or below the Keltner Channel bands defines a potential directional breakout.
- The channel bands use an EMA center with ATR-based width.
- A rising or falling SMA can filter long and short signals by trend direction.
- The script exposes trade direction, trading hours, stop distance, and optional profit target controls.
- The source is truncated before the complete signal execution logic and provides no backtest evidence.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.