Breakout Ladder: Channel Breakout Strategy [AlgoNexta] by AlgoNexta

By AlgoNexta

Performance Metrics

Description

Breakout Ladder is a channel breakout strategy in the spirit of the classic trend-following rules, with a scaled exit: part of the position is banked at fixed targets and the rest rides the trend until the exit channel closes it.What is differentA plain channel breakout script opens and closes the whole position at once. Here the entry rule is deliberately the classic one, and the work is in the exit and risk layer: the position size is calculated from the stop distance, the position is closed in one to four steps, the stop can follow the targets that were reached, and the last part can leave at a fixed target, at a trailing stop placed on the exit channel, or on a close beyond the exit channel. Setting "Number of targets" to 1 turns the ladder off, so both approaches can be compared on the same chart.EntryLong when a bar closes above the highest high of the previous 55 bars; short when it closes below the lowest low.Trend filter (on by default): longs only above the 200 EMA, shorts only below it.One position at a time. Signals use closed bars and orders fill on the next bar's open.Exit in three steps (default)Initial stop: 2 ATR(20) from the signal close. This distance is 1R.Target 1 at 1.5R closes 30% of the position, and the stop moves to the entry price.Target 2 at 3R closes another 30%.The remaining 40% has no target. It leaves when a bar closes beyond the 20-bar exit channel (below the 20-bar low for a long), or at the stop.The number of steps (1 to 4), their R levels and sizes, and how the last part exits (fixed target, trailing stop, or the strategy's own exit) can all be changed.Risk managementEach position risks 1% of equity between entry and initial stop, capped at 0.9 times equity.Optional daily guard: maximum new positions per day and a daily loss limit, for prop-firm style rules.Alerts on every entry and on every target reached. Create one alert on the strategy and select "alert() function calls only".Backtest settingsInitial capital 10,000, risk 1% per trade, commission 0.01% per order, slippage 2 ticks, no pyramiding, default margin of 100% (no leverage). The script calculates the position size itself from the risk input, so the "Order size" field in the Properties tab is not used. These costs match spot gold, index and FX CFDs. For crypto, set the commission to 0.05% to 0.1%. The published chart is gold on the daily timeframe with these defaults.Behaviour to expectBuilt for 4-hour and daily charts on markets that trend, such as gold, major crypto and stock indices.Win rate is modest; most of the result comes from a few long trends, and long flat periods are normal.On range-bound FX pairs and on low timeframes, results in our tests were weak or negative.Scaling out lowers the drawdown and raises the share of winning trades, but it can also lower the total return compared with holding the full position. Compare both with the "Number of targets" input.TradingView counts every partial exit as a separate trade in the Strategy Tester.NotesBacktest results describe the past only and do not predict future results. This script is for research and education and is not financial advice.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView