Apex Edge - Trend BreakoutApex Edge — Trend Breakout
A with-trend channel breakout system with a 30-symbol radar and a dual-window, cost
adjusted backtest.
Indicator Guide - Apex Edge
This guide explains exactly what the indicator does, how every number is calculated, why the backtest is built the way it is, and how to trade it. Nothing here is hidden behind a black box — the whole point of the tool is that you can see the workings and judge the edge for yourself.
1. What it is
Apex Edge — Trend Breakout is a single overlay indicator that does four jobs at once:
Signals trades when price breaks the recent range in the direction of the dominant trend.
Manages the trade with a chandelier trailing stop, so winners are allowed to run and losers are cut quickly.
Scans a 30-symbol watchlist (the Radar), ranking what is trending and flagging what is about to break.
Tests the rules on the chart symbol across two separate date windows and reports the result as average R and sample size — then auto-grades it Red, Amber or Green.
The thesis.
Most price action is noise. Occasionally a market trends, and when it does, a break of the
recent range tends to continue. The edge of such a system does not come from being right often — it comes from a fat right tail: many small losses when breaks fail, paid for by the occasional large runner that the trailing stop rides for multiples of the initial risk. The tool is built end-to-end to find that behaviour and to stop you fooling yourself about whether it is really there.
2. What appears on your chart
Green and red rails — the upper and lower edges of the breakout channel. A close beyond a
rail is a potential trigger.
Up / down triangles — confirmed entries (a close-break that agrees with the trend).
Orange line — the live trailing stop for the most recent signal. This is where your protective
order goes.
HUD (top-right by default) — the chart symbol's trend, distance to its rail, current setup state, last signal and a running long/short signal count.
Radar — the 30-symbol scanner with score, direction, state and a Red/Amber/Green
“Go” column.
Backtest panel — two date windows side by side, each showing average R and
trade count per side, plus an automatic verdict.
3. The entry signal — how it is calculated
3.1 The breakout channel
The rails are the highest high and lowest low of the last N bars (default 20), measured up to the
previous bar so they never repaint:
upBreak = highest(high, 20) of the prior bar
dnBreak = lowest(low, 20) of the prior bar
A long trigger is a close crossing above the upper rail; a short trigger is a close crossing below the lower rail. Because the test is on the close, an intrabar wick through a rail that closes back inside does not trigger — only a genuine close beyond the range counts.
3.2 The dominant-trend filter
A breakout alone is not enough; it must agree with the trend. Trend is defined by a long EMA (default 200) and that EMA's slope, so a flat market counts as no trend:
Uptrend = close > EMA(200) AND EMA(200) rising over the last 5 bars
Downtrend = close < EMA(200) AND EMA(200) falling over the last 5 bars
Requiring both price position and EMA slope filters out the chop that ruins most breakout systems: if the EMA is flat, neither condition is true and no trades are taken.
3.3 Optional higher-timeframe agreement
You can additionally require the higher timeframe (default daily) to agree, using its last closed bar's EMA so it cannot repaint. With it on, a 4H long also needs the daily to be pointing up. Off by default.
3.4 The final rule
Long = close-break of the upper rail AND dominant uptrend
Short = close-break of the lower rail AND dominant downtrend
With “with-trend only” enabled (the default), counter-trend and flat-market breaks are blocked entirely. The triangle only prints when both halves line up.
4. The exit — chandelier trailing stop, and what “R” means
Risk is defined the moment you enter. The initial stop sits a multiple of Average True Range away from entry (default 1.5 × ATR(14)). That distance — entry to initial stop — is one R. Every outcome the tool reports is measured in multiples of that initial risk.
Once in the trade, the stop trails using a chandelier: it hangs a multiple of ATR (default 3 × ATR)
below the highest high reached since entry (mirrored for shorts). It only ever moves in your favour — it ratchets, never loosens. You exit when price touches the line.
A loss is roughly −1R: the break fails and price falls back to the initial stop.
A win is whatever the trail captures — often small, occasionally very large when a real trend
develops. There is no fixed profit target; capping the winners would throw away the exact tail
the system exists to harvest.
Note Live, you place a resting stop on the orange line and step it along as the line moves. The
backtest exits on the same intrabar touch, so what you test is what you trade.
5. The Market Radar — how the scan is built
The Radar pulls 30 symbols on the scan timeframe (default 4H) and ranks them so you watch the right markets. Four numbers drive it.
5.1 Trend-strength score
The score blends how cleanly a market is moving with how strongly:
Efficiency Ratio (ER) — net distance travelled divided by the total path taken, over a lookback
(default 20). A straight move scores high; a market that thrashes back and forth to end up in the same place scores low.
ER = |close − close | / sum of |bar-to-bar moves over 20 (as a %)
ADX — the standard directional-strength index (default 14).
The two are scaled and blended 55% ER / 45% ADX, calibrated so a market in a genuine trend reads roughly 60–70. Only symbols above the score threshold (default 50) are shown, strongest first.
5.2 Direction, NEAR and the Go grade
Direction comes from the same dominant-EMA logic as the chart (up, down, or flat).
NEAR flags a symbol that is trending and within a set distance of its breakout rail in the trend
direction (default 0.5 × ATR) — i.e. about to trigger.
Go (Red / Amber / Green) is read from your own curated lists. You tell the indicator which
symbols you trade long and short at Green (confirmed) and Amber (testing) confidence; the Go
column then lights up only for those symbols in that direction.
Note The Radar does not grade edges for you — you populate the Green/Amber lists from your own backtest sweep (Section 6). The Go column simply surfaces your decisions on the live scan.
6. The backtest engine and the Auto verdict
This is where you decide whether a symbol earns a place on your lists. For the chart symbol, the engine replays every historical signal forward (up to 60 bars), simulates the exact chandelier trail with intrabar touch exits, deducts your cost per trade, and records each result in R.
It does this across two independent date windows and reports, for each window and each side
(long / short / all):
Avg R — the average result per trade, net of cost. This is the system's expectancy.
N — the number of trades in that window. This tells you whether to believe the Avg R.
The Auto column then turns that into a verdict using two thresholds (defaults shown), applied to both windows:
Verdict/Condition:
GREEN
Avg R ≥ 0.10 AND N ≥ 50 in BOTH windows — a real, repeatable edge
AMBER
Qualifies in one window, or only marginally — promising, not proven
no
Fails the bar — no demonstrated edge this way
A Green therefore is not a single good run; it is an edge that survived two separate market periods with a large enough sample in each. That is the bar a symbol must clear before it goes on your Green list.
Note - Cost is entered in price units and applies to the chart symbol, so set it to that instrument's realistic round-trip spread before trusting a marginal (Amber) result. A couple of pips is what flips a thin edge from positive to negative — which is exactly the truth you want before risking money.
7. Why those default backtest dates?
The two windows default to 2019–2021 and 2022–present, and the split is deliberate. These are not two halves of one stretch — they are two genuinely different market regimes:
2019–2021 spans the late-cycle calm, the COVID crash and the violent recovery — a high
volatility, strong-trend era.
2022–present is the rate-hiking regime: broad USD strength, a real equity bear in 2022, and a
different volatility character.
A set of rules that prints a profit in one regime might simply be tuned, by luck or by hand, to that regime. The only honest test is whether the same untouched rules also work in a different one.
Requiring an edge to clear the bar in both windows is the out-of-sample check built directly into the panel. The dates are adjustable — what matters is that the two windows cover different conditions, not the exact years.
8. Why we judge by R and N, not win rate
Win rate is the most quoted and least useful statistic in trading. On its own it tells you almost nothing, and for a system like this it actively misleads.
8.1 Win rate hides the size of wins and losses
Two systems can have wildly different win rates and the opposite profitability. Expectancy — average R per trade — is what actually ties to your account:
Example:
System - “High win rate” (avg win +0.5R, avg loss −5R)
Win rate - 90%
Expectancy -0.05R
Reality - Loses money
System - Trend breakout (avg win +3R, avg loss −1R)
Win rate - 40%
Expectancy - 0.60R
Reality - Strong edge
The 90%-winner loses on the rare 5R disaster; the 40%-winner thrives because its winners dwarf its losers. Judge either by win rate and you draw the wrong conclusion. Expectancy = (win% × avg win) − (loss% × avg loss), expressed in R, is the number that matters.
8.2 This system is meant to be a low win-rate system
A trend-breakout-with-trail design is designed to win less than half the time. Most breakouts fail and cost ~1R; a minority become trends and the trail rides them for many R. The profit lives entirely in those few big winners — the fat right tail. Win rate cannot see that tail; only average R can.
Optimising for win rate would push you to cap winners and widen stops, destroying the very edge this tool is built to capture.
8.3 N is what makes the average believable
An average R is only as trustworthy as the number of trades behind it. A +0.8R average on 8 trades is a coin landing heads a few times in a row — it tells you nothing. The same average on 120 trades is a genuine signal. That is why the Auto grade refuses to certify anything below N ≥ 50 per window, no matter how attractive the Avg R looks. Small samples are where traders fool themselves most, so the tool simply will not show Green there.
8.4 How to read an Avg R figure
Avg R (net of cost) Read it as
≤ 0 No edge
+0.05 to +0.10 Marginal — cost and slippage can erase it
+0.10 to +0.20 Workable edge
+0.20 to +0.40 Strong
+0.40 and up Suspect — check for look-ahead, tiny N, or an error
Bigger is not automatically better. A sustained average above ~+0.40R on a simple system is more often a sign of a mistake than a goldmine, and should be interrogated, not celebrated.
9. How to trade it
The workflow separates the slow, careful job (deciding what to trade) from the fast one (executing when it triggers).
1. Weekly — curate. Flick through your watchlist. On each symbol read the Auto panel and note
the verdict per side. Add Green symbols to the matching Green list (long or short) in settings,
and Amber symbols to the Amber lists. Skip the reds.
2. Set once — the blanket alert. On a 4H chart create the “Watchlist near breakout” alert, set to Once Per Bar Close. It pings only for your Green/Amber symbols when one is trending and
nearing its rail.
3. On the ping — find the trade. Open the Radar. Confirm the symbol shows Green/Amber Go +
NEAR + the right direction.
4. Arm the entry. On that symbol's chart set the “Breakout Long/Short” alert, also Once Per Bar
Close, so only a close beyond the rail can fire it (no wicks).
5. Enter. When the triangle prints, take the trade and place your stop on the orange trailing line.
6. Manage. Step the stop along with the line as it moves your way — never against you. Exit on the touch. No fixed target; let the trail decide.
10. Trading rules and risk discipline
Trade Green in the validated direction. Amber is watch-and-small-size. Red is no trade.
A break against the trend is not your trade. Skip it, however tempting.
Judge over a batch of trades, never one. A single loss says nothing about a positive
expectancy system; variance is the cost of admission.
One settings set for all symbols. Never tune the inputs per symbol to flatter the past — that is
curve-fitting. If you change a strategy setting, re-test both date windows before trusting it again.
Size correlated instruments as one position. A basket of yen crosses, or a basket of equity
indices, is one bet wearing several names. Three 1% longs that all rise and fall together is a 3%
bet on one theme, not three diversified trades.
11. Settings reference
Setting Default What it does
Breakout channel 20 Bars used for the high/low rails
Near-break heads-up 0.5 ATR How close to the rail counts as NEAR
Dominant EMA 200 The trend reference line
EMA slope lookback 5 Bars used to judge the EMA's slope
With-trend only On Blocks counter-trend and flat-market breaks
Higher timeframe Off / 1D Optionally require the daily to agree
Initial stop 1.5 ATR Defines one R (entry to stop)
Chandelier trail 3.0 ATR Trailing distance below the running extreme
Trade window 60 bars How far the backtest follows each signal
Cost per trade 0 Round-trip cost in price units (set per instrument)
Test windows A / B 2019–21 / 22–now The two regimes the Auto grade checks
Qualify Avg R / N 0.10 / 50 Thresholds for a Green verdict, per window
Scan timeframe 4H Timeframe the Radar evaluates
Score threshold 50 Minimum trend score to appear on the Radar
12. Non-repainting, and honest limitations
Non-repainting by design. Signals use closed-bar prices and the prior-bar channel, the higher
timeframe pull uses the last closed bar, and the backtest only ever replays bars that were already in the past relative to each signal. What you see on history is what you would have seen live.
What a backtest can and cannot tell you. The replay is a simulation. It assumes fills at the touched price and a fixed cost; live trading adds variable spread, slippage, gaps and partial fills. Treat the Avg R as an estimate of edge and direction, not a promise of returns. Forward-test before you scale.
The Green/Amber lists are your own settings inputs — the tool surfaces your decisions, it does not validate them for you.
Correlated symbols inflate the apparent number of edges; the count is not the same as
diversification.
A strong directional drift in an asset class (equities up, for example) can make a one-sided
system look better than the rule itself is.
This indicator is a decision-support and research tool. It is not financial advice and does not place trades. Markets carry risk; past performance does not guarantee future results. You are responsible for your own decisions and risk.
Apex Edge — Trend Breakout Radar finds the trend Auto/Go says if it pays Arrow times entry Orange line manages Exit
Pine Script® indicator






















