Range Extension Levels
Asia 5m fib extensions · Monday 30m body overlap · Indicator-matched confluence logic
Asia 5m
Session00:00–06:00 GMT+1
Rangemax(O,C) – min(O,C)
Fib calclow + range × level
Confluencetoday vs yesterday
SL base1.5 × 5m ATR
Monday 30m
RangeFull Monday body H/L
Measurement30m candle bodies only
Confluencecurr Mon vs prev Mon
On MondayUses prev week levels
SL base1.5 × 30m ATR
⬡ Real hit detection — 5m bar wicks determine whether price reached each level
Configuration guide — what every setting does
▼
Data & API
Pair
The instrument being tested. This matters beyond just the symbol — it controls the pip size used throughout the engine. EUR/USD and GBP/USD use 0.0001 per pip, JPY pairs use 0.01, and Gold (XAU/USD) uses 1.0. Getting this right ensures confluence distances, SL sizes, and P&L calculations are all in correct pip terms for that instrument.
Lookback
How many weeks of historical bars to pull from Twelve Data and run the backtest over. More weeks means more trades and more statistically meaningful results, but uses more of your 800 daily API calls. 8 weeks is a good starting point. 24 weeks gives you a proper sample across different market conditions. Note: each run uses 1–2 API calls regardless of lookback length because bars are fetched in a single request up to the 5000-bar limit.
Method
Which of the two strategies to run. Asia 5m uses the 00:00–06:00 GMT+1 session body range on 5-minute bars, projecting fib multiples above and below. Monday 30m uses the full Monday candle body high/low on 30-minute bars, comparing this week's Monday against last week's. Both runs them together so you can compare them side by side in the breakdown tables — useful for seeing which method carries more edge on a given pair.
Bar timeframes — what is actually fetched
The backtester fetches two timeframes from Twelve Data: 5m bars for the Asia session method and 30m bars for the Monday range method. No 15m bars are used.
Note on the 15m question: the original lesson description mentioned pulling Monday ranges on a 15-minute chart. When the actual Pine Script indicator code was checked, it uses
request.security(syminfo.tickerid, "30", ...) — 30-minute bars — for all Monday body high/low tracking. The 15m reference in the lesson was either an approximation or an earlier version of the indicator. The backtester matches the actual indicator source, so 30m is correct.Why fib extensions are multiples — the core concept
The indicator does not use traditional Fibonacci retracement levels (0.618, 0.382 etc). Instead it repurposes the fib tool as a range projector. The Asia session body range — say it measures 12 pips — becomes the unit of measurement. That 12 pips is then projected forward repeatedly into price space above and below the session boundary:
1× = 12 pips beyond Asia high/low — one full session range extended
2× = 24 pips — two full ranges
3× = 36 pips — three full ranges, and so on
2× = 24 pips — two full ranges
3× = 36 pips — three full ranges, and so on
So a 2× level means price has traveled twice the distance of the entire Asia session from the session boundary. These are exhaustion zones — structural levels where the market has extended significantly and may run out of momentum. They are forward projections of today's volatility, not historical statistical measures.
Min ATR distance from open
Filters out confluence levels that are too close to where price currently is. If a level sits less than 0.5× ATR from the bar's open, there isn't enough room between entry and the SL to make the trade viable — the stop would need to be inside the noise. Default 0.5× ATR. Set to 0 to trade all levels regardless of proximity. Raise to 1.0× to only trade levels with meaningful distance from current price.
Replaces the old min/max fib filter — proximity to price is a more structurally sound filter than which fib multiple a confluence happens to fall at.
Level re-entry
Controls how many times the same confluence level can be traded in a single day. Once only — the level is locked after the first touch regardless of outcome. Twice — allows one re-entry after price has left the level and returned. Unlimited — every valid approach to the level is a trade.
Re-entry mechanics: after a trade exits (TP, SL, BE-stop, or EOD), the level is marked as "not cleared." A re-entry only fires once price has moved at least 0.5× ATR away from the level — confirming it genuinely left the zone. The direction check still applies on re-entry, so price must approach from the correct side. The trade log shows a # column — 1 = first entry, 2 = re-entry, highlighted in orange so you can filter re-entry performance separately.
The unlimited setting is useful for testing the theoretical max — but in practice a level that's been stopped through twice in a day is probably in a trending move and shouldn't be faded a third time. The kill switches act as the backstop regardless.
Confluence — the indicator's signal tiers
Signal filter
Maps directly to the three line colours on the TradingView indicator. Tight only (green lines) — today's fib level and yesterday's are within 10% of the pip threshold of each other. If threshold is 2 pips, tight means within 0.2 pips. These are the highest conviction setups — two independent session projections landing almost exactly on the same price. Fewest signals, highest expected edge. All confluence (orange + green) — includes both tight and normal overlaps within the full pip tolerance. All levels — trades every fib extension regardless of confluence, useful as a baseline to measure how much the confluence filter is actually adding.
Confluence threshold (pip)
The tolerance window for calling two extension levels "confluent." If today's 2.5× level lands at 1.08420 and yesterday's 2.5× level lands at 1.08435, the difference is 1.5 pips — within the 2 pip threshold, so they're marked confluent. 2 pips is the lesson's specification for EUR/USD and is the indicator's default. Tightening to 1 pip gives fewer but cleaner confluences. Widening to 3 pips gives more signals but some overlaps will be loose.
Important: the engine also applies a cap — if the range is very small, confluence distance is capped at 50% of the minimum fib gap to prevent adjacent levels from falsely merging. This matches the indicator's exact logic.
Tight threshold % of main
Defines what separates a "tight" (green line) confluence from a "normal" (orange line) one. At 50% of a 2 pip threshold, tight means the two session levels are within 1 pip of each other. At 10%, tight means within 0.2 pips — very few confluences will qualify. The default is 50% which gives a meaningful split between the two tiers. Raise toward 100% to classify more confluences as tight; lower to make tight very selective. The Signal filter "Tight only (green)" will only trade levels flagged as tight or triple — so if this threshold is too low, almost nothing passes and the trade count drops to near zero.
The indicator uses 10% as its visual default because on screen you want to highlight only the very sharpest alignments. For backtesting, 50% is more useful — it gives enough tight signals to measure performance meaningfully.
Trade management
Min SL (pips)
A floor on the stop loss regardless of what the ATR calculation produces. If the 5m ATR on a very quiet Asian session comes out at 3 pips, the system would set SL at 4.5 pips (1.5 × 3). The minimum SL of 7 pips overrides that to prevent stops so tight they get hit by normal bid/ask noise. Raising this reduces trades in very low volatility conditions. The SL is always calculated on the same timeframe as the method — 5m ATR for Asia trades, 30m ATR for Monday trades.
Risk per component (%)
What percentage of the account is risked on each individual trade signal. At 0.25%, if both an Asia level and a Monday level fire on the same day, up to 0.5% is at risk before kill switches engage. This value flows directly into the kill switch calculation — raising it means you hit daily/weekly limits faster. At 0.75% risk you'd hit the default 2% daily kill in just 3 consecutive losses instead of 9.
The equity curve and P&L figures in the results are illustrative — they show the shape of performance but the actual account impact depends on your real position sizing.
ATR period (bars)
How many bars to use when calculating the Average True Range for stop loss sizing. The ATR is always measured on the matching timeframe — 5m bars for Asia method, 30m bars for Monday method. Shorter periods (5–8) make the SL more reactive to recent volatility, widening in active sessions and tightening in quiet ones. Longer periods (20–50) smooth that out for more consistent stop sizes across conditions. 14 bars is the indicator's default.
Volatility regimes
Regimes are determined automatically from the daily pip range at the time of each trade — you don't set them manually. They change two things: the break-even partial trigger (the R-multiple at which the engine locks in profit and takes a partial) and the SL/TP sizes (which scale automatically because they're ATR-based).
High vol: BE at 2.0R — market is moving freely, give it room before locking in
Med vol: BE at 1.5R — standard conditions
Low vol: BE at 1.0R — compressed market, protect profit sooner as extensions are harder to sustain
Med vol: BE at 1.5R — standard conditions
Low vol: BE at 1.0R — compressed market, protect profit sooner as extensions are harder to sustain
Kill switches
Circuit breakers that stop trading once losses hit a threshold within a period. They reset automatically — daily at midnight London, weekly on Monday, monthly on the 1st. Each switch is independent: hitting the daily limit doesn't reset the weekly counter.
Daily %: tightest switch — fires most often, protects against a bad single day
Weekly %: catches runs of bad days that individually stayed under the daily limit
Monthly %: hardest stop — once hit, no more trades for the rest of the calendar month
Weekly %: catches runs of bad days that individually stayed under the daily limit
Monthly %: hardest stop — once hit, no more trades for the rest of the calendar month
The Kill% column in the regime breakdown shows what percentage of trades in that category were immediately preceded by a kill switch firing — useful for identifying which conditions tend to cluster into the losing runs that trigger them. You can adjust all three thresholds freely in the sidebar.
How real hit detection works
This version replaces probabilistic simulation entirely with actual 5m price data. No random numbers are used for hit detection or trade outcomes.
Step 1 — Hit detection: for each fib extension level, every 5m bar in the entry window (07:15–20:00 London) is scanned. A level is hit when a bar's wick crosses the fib price — bar high for short setups, bar low for long setups. If price never reaches the level that day, no trade is recorded.
Step 2 — Outcome walk: from the touching bar, the engine walks forward bar by bar checking SL and TP against real highs and lows. Break-even fires once price reaches beR × SL distance, moving the stop to entry + 1 pip. Exit is at SL, TP, BE-stop, or 22:00 London EOD — whichever comes first.
Step 3 — Exit types: TP (full target hit), SL (stopped out before BE), BE (moved to breakeven then stopped), EOD (open at session close). These appear in the trade log and fib breakdown table.
Step 2 — Outcome walk: from the touching bar, the engine walks forward bar by bar checking SL and TP against real highs and lows. Break-even fires once price reaches beR × SL distance, moving the stop to entry + 1 pip. Exit is at SL, TP, BE-stop, or 22:00 London EOD — whichever comes first.
Step 3 — Exit types: TP (full target hit), SL (stopped out before BE), BE (moved to breakeven then stopped), EOD (open at session close). These appear in the trade log and fib breakdown table.
The entry direction (short vs long) is determined by whether the level is above or below the Asia range midpoint — the correct structural logic. The one remaining limitation: 5m OHLC bars don't tell you the intrabar sequence of high vs low. If a bar has both its high and low beyond your SL and TP, the engine assumes TP was hit first (slightly optimistic). Real tick data would resolve this ambiguity but is behind a paywall on all providers.
No data yet
Enter your Twelve Data API key in the sidebar,
select a pair and lookback period, then run.
select a pair and lookback period, then run.