ATR Breakout Trend Strategy by Harshal_choudhari
By Harshal_choudhari
Performance Metrics
- Author: Harshal_choudhari
- Symbol: DELTAIN:SOLUSD.P
- Timeframe: 4 hours
Description
OVERVIEWThis strategy trades trend-filtered channel breakouts and sizes every position from a fixed fraction of equity at risk. It builds on the classic Donchian channel breakout idea (popularised by the Turtle Trading rules) and combines it with three things that are usually handled separately: a long-term trend filter, volatility-based risk sizing with a leverage cap, and on-chart zones that show each trade's initial risk and projected reward in R multiples.The goal is not to predict tops or bottoms. It is to participate in sustained directional moves with a defined, consistent risk on every trade, and to step aside when the move ends.HOW IT WORKS1. Entry signalA long signal occurs when the bar closes above the highest high of the previous N bars (Entry channel length, default 20). A short signal is the mirror image: a close below the lowest low of the previous N bars. The signal only counts on the bar where price crosses the channel, not on every bar that stays beyond it.2. Trend filterLongs are only allowed while the close is above a simple moving average (Trend SMA length, default 200). Shorts are only allowed while the close is below it. This filters out breakouts that run against the dominant trend, which are the most common source of false signals for channel systems. Short trades can be disabled entirely.3. Initial stopAt entry, a protective stop is placed a fixed multiple of ATR away from the signal close (default 2 x ATR, where ATR is a simple moving average of true range over 20 bars). Because the stop scales with volatility, it is wider in turbulent markets and tighter in quiet ones.4. Position sizingPosition size is calculated so that hitting the initial stop costs a chosen percentage of current equity (default 1%). Quantity = (equity x risk %) / (stop distance x point value). A maximum exposure setting (default 100% of equity) caps the position's notional value so volatile or low-priced instruments cannot produce excessive leverage. When the cap applies, the actual risk on that trade is smaller than the target.5. ExitsA position is closed by whichever comes first:- The protective stop is hit.- The bar closes back through the opposite channel of the previous M bars (Exit channel length, default 20). For longs, a close below the prior 20-bar low. For shorts, a close above the prior 20-bar high.- An opposite breakout signal, which reverses the position.An optional ATR trailing stop can ratchet the stop toward price as the trade moves in your favour. It never loosens.6. Visuals- Trend SMA line.- For the latest trade: a red zone showing initial risk (entry to stop) and a green zone showing a projected reward of 2R. The reward zone is for reference only. The strategy does NOT take profit at that level; it exits only by the rules above.- Optional line showing the active stop.HOW TO USE IT- Designed for trending instruments on intraday to daily timeframes. It was developed and tested on crypto perpetual futures on the 1-hour chart.- Expect a low win rate. Trend-following systems typically lose on most trades and rely on a small number of large winners. Skipping signals, or exiting early, removes exactly the trades the system depends on.- Adjust the risk % to your own tolerance. Long losing streaks are normal for this type of system, so size so that ten or more consecutive losses remain acceptable.- Test on your own instrument and timeframe before relying on it. Results vary widely between markets.DEFAULT STRATEGY PROPERTIES (used for the published results)- Initial capital: 10,000 USD- Order size: calculated by the script from 1% equity risk per trade, capped at 100% of equity in notional- Commission: 0.06% per order- Slippage: 2 ticks- Orders are processed on bar close (process_orders_on_close = true); stops are evaluated intrabar on subsequent bars- Pyramiding: off (one position at a time)LIMITATIONS- Performance depends heavily on a few strong trends. In ranging markets the strategy produces repeated small losses.- Stops can fill worse than the stop price during gaps or fast markets, so realised losses can exceed the target risk %.- Fractional quantities are used for sizing; instruments with large minimum contract sizes may not allow the exact calculated size.- Past results do not guarantee future performance. This script is for educational and research purposes and is not financial advice.