Coil Breakout Strategy [AlgoNexta] by AlgoNexta
By AlgoNexta
Performance Metrics
- Author: AlgoNexta
- Symbol: OANDA:XAUUSD
- Timeframe: 1 day
- Profit Factor: 2.04
Description
Coil Breakout looks for quiet periods: stretches where the market's range is among the narrowest it has been on this chart. Ranges tend to alternate between contraction and expansion, so the strategy waits for a narrow range, draws it as a box, and trades the first close outside it in the direction of the trend.What is different"Narrow" is not a fixed number of points or a fixed Bollinger width. The width of the last 20 bars is ranked against the widths of the previous 200 bars, so the same rule adapts to gold, indices, crypto or FX, and to any timeframe. Each coil can trigger one trade only, and a coil that does not break within 60 bars is cancelled.CoilWidth = (highest high - lowest low of the last 20 bars) / close.A coil starts when this width is in the narrowest 15% of the last 200 bars. The box is the high and low of those 20 bars.The box stays armed until a bar closes outside it, or for at most 60 bars.EntryLong when a bar closes above the box; short when a bar closes below it.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.ExitInitial stop: the opposite side of the box (or the middle of the box, as an option). This distance is 1R.Default exit: a trailing stop 3 ATR(14) from price that only moves in the trade's favour.Option: a fixed target at a multiple of the initial risk (default 2R), and an optional time exit.Risk managementEach position risks 1% of equity between entry and initial stop, capped at 0.9 times equity.A status table shows whether a coil is open, the current width rank, the box height and the risk per trade.Backtest settingsInitial capital 10,000, risk 1% per trade, commission 0.05% 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. The commission is set on the high side on purpose; spot gold, index and FX CFDs usually cost less. The published chart is gold (OANDA:XAUUSD) on the daily timeframe with these defaults.What our tests showedGold daily, all available history: 145 trades, profit factor 2.04, maximum drawdown 9.0%. Most of that profit came from the 1960s and 1970s; from 2006 to 2026 the same settings made 54 trades with a profit factor of 2.02 and a 3.7% drawdown.Gold 4-hour: profit factor 1.05. BTCUSDT 4-hour: profit factor 1.84. Nasdaq 100 daily: profit factor 1.35.Gold 15-minute and Nasdaq 4-hour were slightly negative: costs are large compared with the risk of each trade on low timeframes. This is a swing strategy, not a scalping one.Removing the trend filter and the trailing stop made the gold results roughly flat; no other parameter was tuned.Behaviour to expectFew trades: coils that line up with the trend are not frequent, especially on the daily chart.Win rate is below 50%; the result comes from the breakouts that turn into trends.A breakout can fail and come back into the box; the initial stop at the opposite side limits that loss.NotesBacktest results describe the past only and do not predict future results. This script is for research and education and is not financial advice.