Butterworth Spectral Trend [QuantAlgo]🟢 Overview
The Butterworth Spectral Trend is a trend-following indicator built on a 2-pole Butterworth SuperSmoother rather than fixed moving averages or crossover logic. It extracts a low-noise spectral trend path from price, optionally stretches or compresses that path’s cutoff from residual signal-to-noise conditions, then converts filter slope into direction with hysteresis and hold controls so traders can separate genuine trend turns from short-lived noise across every timeframe and market.
🟢 How It Works
The foundation of the indicator is a classic 2-pole Butterworth SuperSmoother. Coefficients are derived from the live cutoff period and a damping factor (√2 by default for the maximally flat Butterworth response), then applied recursively to the selected price source, with an optional Nyquist average of the current and prior sample to suppress 2-bar oscillation:
butterworth_coefficients(float period, float damping) =>
float safe_period = math.max(period, 2.0)
float argument = damping * math.pi / safe_period
float alpha = math.exp(-argument)
float c2 = 2.0 * alpha * math.cos(argument)
float c3 = -alpha * alpha
float c1 = 1.0 - c2 - c3
A provisional filter always runs at the base cutoff. Residual energy (price minus provisional filter) and provisional slope energy are tracked with EMA-style RMS estimates. Their ratio maps market conditions into a noise weight that lengthens the cutoff when residuals dominate and shortens it when directional slope energy is cleaner:
float residual = price_source - provisional_filter
float signal_to_noise = residual_rms > 0 ? slope_rms / residual_rms : 10.0
float noise_weight = 1.0 / (1.0 + math.min(math.max(signal_to_noise, 0.05), 10.0))
float target_cutoff = min_cutoff + (max_cutoff - min_cutoff) * noise_weight
float desired_cutoff = adaptive_cutoff ? base_cutoff * (1.0 - adapt_strength) + target_cutoff * adapt_strength : float(base_cutoff)
The live cutoff is blended toward that target with a smoothing factor so period changes do not jump bar to bar. The final spectral filter is then computed from those adaptive coefficients. When adaptivity is disabled, the filter always uses the fixed base cutoff period.
Direction is read from the spectral filter’s slope, not from price-versus-line crossovers. Optional hysteresis requires opposite slope to exceed a multiple of its typical recent magnitude before a flip is allowed, and a minimum hold bar count enforces a cooldown after each flip:
float filter_slope = spectral_filter - nz(spectral_filter , spectral_filter)
float deadband = hysteresis * typical_slope
bool opposite_move = slope_direction != 0 and slope_direction != trend_direction
bool clears_deadband = abs_filter_slope > deadband or hysteresis == 0.0
bool hold_complete = bars_since_flip >= min_hold_bars
if opposite_move and clears_deadband and hold_complete
trend_direction := slope_direction
bars_since_flip := 0
This design means the trend path is spectral (period-based smoothing), while state flips are slope-gated. Clean directional conditions can tighten the cutoff for faster response; noisy conditions can lengthen it for more stability. Hysteresis and hold bars further reduce clustered flips without changing the underlying filter math.
Direction state is tracked through an integer trend direction, with signal conditions derived from comparing the current and prior bar states:
turned_bullish = trend_direction == 1 and trend_direction != 1
turned_bearish = trend_direction == -1 and trend_direction != -1
trend_changed = turned_bullish or turned_bearish
🟢 Signal Interpretation
▶ Bullish Trend (Green/Bullish palette): When spectral filter slope turns positive and clears any active hysteresis and hold constraints, the indicator enters bullish mode with bullish colouring applied across the SuperSmoother line, optional spectral bodies, gradient fill, and BUY label. This state persists until slope reverses with enough strength (and after enough bars) to satisfy the signal filters, allowing shallow noise wiggles in the filter to occur without flipping direction.
▶ Bearish Trend (Red/Bearish palette): When spectral filter slope turns negative under the same constraints, the indicator enters bearish mode with bearish colouring across all visual elements. A confirmed opposite slope move is required to exit this state and print a SELL signal.
🟢 Features
▶ Preconfigured Presets: Three parameter sets cover different trading approaches. "Default" targets swing trading on 1-hour to daily charts with a balanced base cutoff, moderate residual adaptivity, and lookback. "Fast Response" shortens the cutoff and strengthens adaptivity for intraday charts from 5-minute to 1-hour, where earlier turns matter more than flip sparsity. "Smooth Trend" lengthens the cutoff, softens adaptivity, and adds light hysteresis plus a short hold for position trading on daily and weekly timeframes, where false flips are more costly than delayed ones. Selecting a preset overrides the corresponding core, adaptivity, and signal inputs.
▶ Built-in Alerts: Three alert conditions cover all directional states. "Bullish Trend Signal" fires on the bar where trend direction confirms bullish. "Bearish Trend Signal" fires on the bar where it confirms bearish. "Any Trend Change" combines both into a single condition for traders who want a unified notification regardless of direction. Alerts continue to work even when signal labels are hidden.
▶ Visual Customisation: Six colour presets (Classic, Aqua, Cosmic, Cyber, Neon, and Custom) apply coordinated bullish and bearish colour schemes across the SuperSmoother line, spectral bodies, gradient fill, signal labels, and optional bar and background colouring. Bar colouring tints price candles with the active trend colour at a configurable transparency level, and background colouring extends the directional tint across the full chart pane.
Indicator

Strong Gold NN Forecast | ProjectSyndicateStrong Gold NN Forecast turns the last five days of Gold into a single question, answered by a genuine neural network: where are today's HIGH and LOW most likely to land? Instead of a restyled oscillator, it runs a real multi-layer perceptron — trained offline on XAUUSD daily history, its weights baked into the script — and performs the forward pass live on your chart. Every new daily candle, it reads only completed bars, locks a forecast for that day's High, Low and Close at the open, and never moves it again. The whole network is drawn on the chart as an inspectable diagram — input, three hidden layers, output — with every node lit by its live activation and every connection weighted by the signal flowing through it. And every forecast that resolves is scored on a live accuracy panel against a naïve baseline — hits and misses alike — so you judge it on the instrument you trade, not on a number typed into a description.
🧠 Neural Core — the model is a 6·6·6·6·3 multi-layer perceptron: six inputs, three hidden layers of six tanh neurons, and three linear outputs, for 147 trained weights and biases. Its lifecycle each bar is FEATURE ▸ NORMALISE ▸ FORWARD ▸ RECONSTRUCT. The network was trained by backpropagation offline on XAUUSD daily data; the learned weight matrices are embedded directly in the script and the on-chart forward pass — weighted sums, biases, and tanh activations, layer by layer — reproduces the trained model exactly. Nothing is trained on your chart, so the mapping is fixed and deterministic.
🔢 Feature Anatomy — the fingerprint is six percentage-based ingredients, all derived from the last five completed days of OHLC plus RSI: 5-day momentum (mean daily return), range position (where the last close sits inside the 5-day high-low range), RSI(14) centred at 50, the 5-day average daily range %, the 5-day average candle body %, and a short-vs-medium momentum acceleration. Working in percentage space rather than raw price is what lets a model learn from a market that ran from the 2,600s into the 4,000s without the price level itself dominating the signal.
🧊 Frozen at the Open — this indicator does not repaint. Every input is read from candles that have already closed, and the forecast is anchored to the last completed close. That means the projected High, Low and Close for the current day are computed once when the candle opens and stay fixed until it closes — no sliding lines, no intrabar drift, no numbers that quietly improve as the session plays out.
🧭 No-Lookahead Normalisation — the part most on-chart ML gets wrong. Each feature is standardised against a causal rolling window of past bars only, computed live and identically to training. No future statistic ever touches a historical prediction: the forecast printed on any past bar is identical whether or not the bars after it exist. This is verified, not assumed.
📐 Volatility-Normalised Targets — the network does not predict raw High% and Low%; it predicts each excursion in units of the recent daily range, which the script measures live. The output is then rebuilt into a four-digit Gold price. Because the size of the move is expressed relative to current volatility, the same learned shape adapts automatically as the market shifts between calm and violent regimes instead of freezing the behaviour of the period it was trained on.
🕸️ Live Network Map — the model is not a black box. The full network is drawn to the right of price: an input column labelled with each feature, three hidden columns, and an output column carrying the four-digit High, Low and Close. Every node is shaded by its live activation and every connection is coloured by weight sign and brightened by the signal passing through it, so you can watch which inputs and pathways are actually driving today's forecast.
📊 Live Accuracy Panel — a compact dashboard reports, in real time: the setup and anchor close, the frozen High/Low/Close forecast with its implied % move and range, each input as a live z-score, and a running mean absolute error of the High and Low forecasts measured against the actual bars — shown next to the error of a naïve recent-range baseline. Every resolved forecast is counted, winners and misses in full, so the number is built live on your symbol and timeframe rather than advertised in advance.
🎚️ Controls — the map's size, horizontal position, column spacing, connection glow, node values and connection drawing are all adjustable, as are the forecast projection length, the shaded High-Low range, the historical prediction track, line width, two themes, and the dashboard's position and size. None of these change the model — they change how you read it.
🎯 Why this is different — most "AI" indicators restyle an oscillator and call the top; most that claim a neural network never show one. This runs an actual trained MLP, draws it live, normalises its inputs causally so there is no lookahead, freezes each forecast at the open so it cannot repaint, and reports an honest error tracked against a baseline instead of a marketing figure. You can see the network, see the inputs, and see how it has actually done on your chart.
🚀 Where to use it — the model was trained specifically on XAUUSD on the Daily timeframe, and that is where it is designed to run; the dashboard flags the setup when the symbol or timeframe differs. The first bars of any chart are a warm-up while the causal normalisation window fills, after which the forecast and the live accuracy panel come alive.
🎯 How to trade it
1 Apply it to XAUUSD on the Daily chart and let the causal window warm up until the dashboard reads a live forecast and the accuracy panel starts counting.
2 At each new daily candle, read the frozen High / Low / Close forecast and the shaded projected range — it is locked at the open and will not move.
3 Check the Live Accuracy panel: the High and Low mean-absolute-error against the naïve baseline tells you, on your own data, whether the model is adding anything right now.
4 Use the projected High and Low as context for where the session may stretch to — a reference for targets, fades, and stop placement — not as an automatic entry.
5 Combine the forecast with your own structure, levels, and risk management. It describes a likely daily envelope; it is not an entry-and-exit system on its own.
⚠️ Important — this is a decision-support tool, not a standalone buy/sell system, and it makes no performance guarantees. It is a fixed, pre-trained model: the weights were learned once on XAUUSD daily history and do not adapt on your chart, so bars inside that training period are in-sample by nature — genuine out-of-sample behaviour is what you see going forward on the live panel. In leakage-free walk-forward testing the network's High/Low error modestly beat a naïve recent-range baseline (strongest on the Low), at roughly 0.7–0.9% of price; that is a small, real edge, not a crystal ball, and on some periods it will sit close to the baseline. Forecasting a single day's exact high and low is inherently hard, and a sharp regime shift or a shock can run straight through any daily envelope. It is deliberately a small network — larger nets overfit this much daily data and test worse. Always wait for the candle to open so the forecast is frozen, and test it on your own data before trading it live. Indicator

Volume Profile Anchored VWAP, AVWAP Bands & Deviation [LunqFX]Most anchored VWAP tools make you drag the anchor by hand, and it goes stale the moment structure changes. This one places the anchor automatically at confirmed swing pivots, wraps it in volume weighted standard deviation bands, hangs the leg's volume profile off the right edge, and then measures whether those bands are being respected on the symbol in front of you.
The annotated charts below explain the script's output element by element.
❶ AUTO ANCHORED VWAP
An anchored VWAP is only meaningful from a point that mattered. Anchor it at an arbitrary bar and it describes nothing; anchor it where the market last turned and it becomes the average price everyone trading THIS leg is carrying — which is exactly the level they defend.
The anchor is placed at confirmed swing pivots, with two guards that matter more than they sound:
▸ MINIMUM LEG — a fresh pivot cannot take over until the running leg has had room to form. Without that rule a cluster of pivots chops the curve into stubs and the VWAP never describes anything. ▸ MAXIMUM LEG — a leg that outlives its usefulness resets rather than growing into a whole-history average.
Session, weekly and monthly anchors are available for traders who prefer calendar anchoring.
❷ STANDARD DEVIATION BANDS
Around the anchored VWAP the script draws volume weighted standard deviation bands at three depths, filled as a gradient so distance from fair value is readable without measuring. Three details make them behave:
▸ WARM-UP — at the anchor the deviation is zero by definition, so the first bars of every leg would draw as a collapsing funnel. Those bars are still measured; they are simply not drawn. ▸ MINIMUM WIDTH — an ATR floor stops the bands pinching shut during dead stretches. ▸ DISPLAY SMOOTHING — the deviation path is box-filtered for drawing only. The VWAP itself and every statistic use the raw values, so nothing you act on is smoothed.
❸ VOLUME FLOW
Each bar's participation is drawn as fine texture reaching inward from the band edges: buy pressure rises from the lower edge, sell pressure falls from the upper one, split by where the bar closed inside its own range. The bands are the baseline, so the leg's pressure reads along the structure instead of on a separate pane.
❹ VOLUME PROFILE OF THE LEG
At the right edge the script hangs the volume distribution of the whole leg, split buy against sell, with a seam line at the join and a traced outline. Each bar is binned against its OWN slice of the channel rather than a fixed price grid, so a sloping leg does not smear the distribution — a detail most profile overlays skip, and the reason the shape stays honest on a trending market.
❺ BAND REACTION STATISTICS
Bands tell you where price is. They do not tell you what that has meant here. So the script measures it: for every touch of the chosen band inside the current leg it checks whether price returned to the VWAP within your window, and reports the share that did, together with the number of touches.
That single number changes how the same picture is read. A leg where touches of the upper band came back to VWAP most of the time is mean-reverting, and the band is a fade. A leg where they did not is trending, and the same touch is continuation. Samples too small to conclude anything from are marked with a tilde rather than presented as a result.
❻ WHAT YOU SEE ON THE CHART
▸ Dashed vertical line with the ANCHOR badge — where the current leg begins. ▸ Three teal bands below and three red bands above, filled as a gradient — deviation depth from the VWAP. ▸ Dark line through the middle — the anchored VWAP itself. ▸ Fine ticks along the band edges — per-bar buy and sell participation. ▸ Horizontal rows at the right edge — the leg's volume profile, teal for buy, red for sell. ▸ Panel — side of the VWAP, distance in σ with a position ruler, the VWAP and band levels, and the reaction statistics.
❼ HOW TO TRADE IT
1 — Read the header. Above or below the anchored VWAP is the leg's bias; the σ figure is how stretched price is right now. 2 — Check the reaction row before deciding what a band touch means. High return rate means the bands are fades. Low return rate means they are continuation. 3 — Use the VWAP as the leg's fair value. Pullbacks into it in the direction of the leg are the cleanest entries this tool produces. 4 — Use the volume profile to find where the leg actually traded. Thin rows are areas price passed through quickly and tends to pass through quickly again. 5 — Watch the anchor. A new anchor means structure turned and the previous leg's levels stopped applying.
❽ NON-REPAINTING
This is the part that separates an anchored VWAP from a rolling regression channel, and it is worth being precise about. The anchor is a CONFIRMED pivot and only ever moves forward. A VWAP is cumulative, so once a bar closes its contribution to the average is fixed forever — every band value already printed stays exactly where it is. Nothing is recalculated behind you. Every statistic is built from closed bars only.
SETTINGS
▸ Anchor — anchor mode (swing pivot, session, week, month), pivot length, minimum and maximum leg. ▸ Bands — three deviation depths, warm-up bars hidden, minimum width in ATR, display smoothing, gradient fill and VWAP line toggles. ▸ Volume Flow — texture height in ATR and thickness. ▸ Volume Profile — rows, width, thickness, seam and outline toggle. ▸ Band Reaction — which band counts as a touch, the reaction window, optional touch markers. ▸ Visuals — candle colouring, anchor marker, dashboard position.
ALERTS — upper band touch, lower band touch, VWAP reclaimed, VWAP lost, and new anchor. All fire on closed bars only.
WHY THESE PARTS ARE ONE SCRIPT
They describe one object at four resolutions. The anchor defines the leg; the standard deviation bands measure dispersion inside it; the flow and the volume profile show where its volume actually went; and the reaction statistics say whether that structure is being respected. Take the anchor away and the VWAP averages a period nobody traded as a unit. Take the profile away and the bands float above an unknown distribution. Take the statistics away and the bands become decoration you have to interpret by feel. None of them stands alone, which is why they ship together.
Works on any symbol with volume — forex, metals, indices, crypto and stocks — on intraday and higher timeframes alike. Symbols without real volume data will report a flat profile.
This indicator is an educational market-analysis tool, not financial advice. The reaction statistics describe the recorded historical behaviour of the current leg on the loaded chart; past behaviour does not predict future results. Always confirm with your own analysis and manage your risk. Indicator

Strong Gold H4 Pressure Zones | ProjectSyndicateStrong Gold H4 Pressure Zones
Strong Gold H4 Pressure Zones maps the gold trading day the way it actually moves — split into its true H4 rhythm — and reads three institutional layers on every candle slot: which parts of the session run hot, where the previous candle's wick left unfinished business, and where price gapped away from value. It is built to run on the M5 timeframe — M5 is the execution resolution the whole engine is calibrated to, while it thinks in H4, so you see the higher-timeframe structure forming live on your chart. Load it on an M5 XAUUSD chart for correct slot alignment and zone behaviour.
Most session tools just draw a box around the day. This one grades every H4 slot, projects the pressure the last candle built, and marks the gaps — all anchored to the daily candle open, identical for every trader on the planet.
🕐 True Gold-Day Slot Engine — the core. The gold day (≈23h with its 1-hour technical break) is sliced into six real periods: an H3 opening block, then five H4 candles — aligned to the actual 04:00 / 08:00 / 12:00 / 16:00 / 20:00 boundaries, not a naïve 4-hour count. Every slot is drawn as a shaded box built live from that slot's own high/low, anchored to the daily candle's open so the zones are the same in Miami, Dubai or Singapore regardless of chart timezone.
⏱️ Runs on M5 — by design. This indicator is meant to be applied on the M5 timeframe. The six H4 slots are built up tick by tick from M5 candles, and the pressure, volatility and FVG zones are all calibrated to that resolution. Apply it to an M5 chart — other timeframes will not slice the gold day correctly.
📊 20% Increment Grid — read position at a glance. Each slot box is split by horizontal guides at 0 / 20 / 40 / 60 / 80 / 100% of its range, labelled on the right. Instantly see whether price is pressing the extremes of the current H4 or coiling in the middle — the exact levels institutions lean on within a candle.
🌋 30-Day Session Volatility Profile — the rhythm read. This is not the current candle's volatility. Each of the six slots is averaged over the last 30 days and the six averages are ranked against each other 0–10, printing a fixed grade on every slot — CALM, MODERATE, HIGH, EXTREME. You learn which H4 windows of the gold session typically explode and which drift, so you size and time around the day's real character instead of guessing. The rank is static and colour-graded (calm teal → extreme purple), only drifting slowly as the rolling window updates.
🧲 Prior-Candle Pressure Zones — the wick memory. The heart of the tool. The moment a slot closes, it's read as a single composite H4 candle and its dominant wick is projected forward as a fixed pressure band inside the next slot:
A strong upper wick on the prior candle → SELL PRESSURE zone near the top (rejection from above — supply left overhead).
A strong lower wick on the prior candle → BUY PRESSURE zone near the bottom (rejection from below — demand left beneath).
Each band is graded 0–10 on wick dominance and printed with its score (▲ BUY PRESSURE 8.4/10 · ▼ SELL PRESSURE 7.2/10), opacity scaling with strength. These are fixed the instant the prior candle closes — they never repaint.
🔀 Prior-Slot Fair Value Gap — the imbalance carry-over. A true three-candle FVG detected on the H4 slots themselves (the slots are the candles), projected as a clean Fair Value Gap zone into the current slot, normalized to one uniform ATR-based height so no single gap swallows the chart. An optional gap-size filter keeps the noise out. You see the imbalance the last three candles left, drawn where it matters, without the clutter.
🎨 Fully Themed & Configurable. Volatility-graded box tones, custom buy/sell pressure and FVG colours, neutral increment grid, adjustable opacities, 2× increment and rank label sizing, per-module toggles, configurable opening-block / break / slot hours, volatility lookback, wick thresholds, FVG ATR length / extend / height, and sessions-to-plot depth.
🔒 Honest, Fixed-Zone Core. The live slot box repaints in price as the candle forms — inherent to showing a real-time H4 building on M5, not a defect. But every fixed output — the pressure bands, the FVG, the volatility rank — is locked to the prior completed candle and never redraws to flatter the chart. The 0–10 scores are descriptive ranking frameworks for directing attention, not backtested signals.
🚀 Built for XAUUSD on the M5 timeframe — the slot model matches gold's 23-hour day and 1-hour break out of the box. Use it on an M5 gold chart (adjust the hour inputs for other instruments).
🎯 How To Trade It — Pressure From The Prior H4
⏱️ Load the indicator on an M5 XAUUSD chart before anything else — the entire slot model is built for M5.
Everything hinges on one read: the last H4 candle told you where price got rejected — trade the current candle expecting that pressure to hold, or break with conviction when it fails.
◾ 1) Fade into a prior-candle pressure zone (the core thesis)
Use when the previous H4 left a strong wick and the current slot rotates back into that band.
▪️ The prior candle prints a strong lower wick → a graded BUY PRESSURE zone sits in the lower portion of the current slot. Buyers already defended there once. ▪️ Wait for price to rotate down into that band inside the current slot — ideally near the 0–20% increment level. ▪️ Entry: long as price reacts inside the buy-pressure zone; the higher the score (7+), the more the prior candle insisted on that level. ▪️ Stop: below the zone — if price closes through and accepts beneath it, the demand failed; stand aside. ▪️ Target: the mid-grid (50%) first, the opposite edge / prior-candle high on extension.
The mirror applies for a strong upper wick → SELL PRESSURE zone up top: fade rallies into it, stop above, target back down through the grid.
◾ 2) Weight it with the session profile
▪️ A pressure zone landing in a HIGH / EXTREME volatility slot means the reaction can be violent — expect follow-through and give the target room. ▪️ The same zone in a CALM slot means muted rotation — take the mid-grid and don't overstay. ▪️ The volatility rank tells you how hard the day's structure usually moves in that window before you commit.
◾ 3) Read the FVG as the pull
▪️ An unfilled Fair Value Gap projected into the current slot is where price is imbalanced — it often gets revisited. A buy-pressure zone below an open bullish FVG is confluence: rejection level plus imbalance both pointing up. ▪️ When a pressure zone and the FVG point opposite ways, that's conflict — let the slot resolve before committing.
◾ 4) Stand down — the map says wait
▪️ Prior candle closed as a clean body with no dominant wick → no pressure zone drew → no edge from rejection this slot. ▪️ Price already accepted through the pressure band → the level's spent. ▪️ CALM slot with no FVG and price mid-range → nothing worth risking on; let it develop.
Rule of thumb: ⭐ Strong prior-candle wick + price rotating into that graded pressure zone + a HIGH-volatility slot or aligned FVG → trade the rejection with the pull. ⭐ No wick, consumed zone, or dead CALM mid-range → stand down until the next candle sets the map.
⚠️ IMPORTANT NOTICE: Strong Gold H4 Pressure Zones is a structure-mapping tool designed for the M5 timeframe on XAUUSD. Pressure zones are projected from the prior H4 candle's wick geometry, the volatility rank is a 30-day per-slot average, and FVGs are drawn from three-candle gap logic — a model of behaviour, not exchange order-book data. The 0–10 scores are descriptive ranking frameworks for directing attention — NOT backtested signals and NOT standalone trade triggers. Fading into prior-candle pressure still carries real risk of failed levels and stop-outs. Always combine it with your own strategy, price-action analysis and risk management. Past behaviour does not guarantee future results. Indicator

Market Structure Trend [QuantAlgo]🟢 Overview
The Market Structure Trend tracks the dominant directional bias of price by detecting confirmed swing highs and lows and maintaining an active structure level that only flips on a genuine break of that level. Rather than reacting to every minor high or low, it waits for a pivot to lock in after a defined number of bars on either side, then holds the resulting structure until price closes beyond it by an optional confirmation buffer. The result is a clean, non-repainting structure line that stays aligned with the prevailing market structure while filtering out stop hunts and marginal pokes through key levels. This makes the prevailing bias readable at a glance across any instrument or timeframe.
🟢 How It Works
The indicator begins by identifying pivot highs and pivot lows using the selected left and right structure bars. These pivots become the swing points that define market structure:
pivot_high = ta.pivothigh(high, left_bars, right_bars)
pivot_low = ta.pivotlow(low, left_bars, right_bars)
When a new pivot is confirmed, the corresponding swing high or swing low is updated. The active structure range is calculated as the absolute distance between the current swing high and swing low, and a confirmation buffer is derived as a percentage of that range:
structure_range = math.abs(swing_high - swing_low)
confirm_buffer = structure_range * buffer_pct / 100.0
Break levels are then offset by this buffer so that a downside break sits below the swing low and an upside break sits above the swing high. On every confirmed bar the script checks whether the chosen source (or the high or low when Break On Wick is enabled) has crossed the relevant break level. A successful cross reverses structure direction and reassigns the structure level to the opposite swing. If no break occurs, the structure level simply continues to track the swing consistent with the current direction.
Structure direction is seeded on the first ready bar by comparing price to the midpoint of the swing range, establishing an initial bias. From that point forward flips are gated strictly by confirmed breaks, so the state never repaints or changes mid-bar.
The structure level is drawn as a continuous line with a soft glow underneath. When radial layering is enabled, four concentric fills are drawn between the structure level and the bar midpoint, with transparency increasing outward. This produces a stepped radial field that visually maps distance from the active structure boundary rather than a single flat zone.
🟢 Signal Interpretation
▶ Bullish Structure (Structure Line at Swing Low with Bullish Color): When structure direction is bullish the line sits at the most recent confirmed swing low. Price is considered to remain in an uptrend structure as long as it stays above the buffered downside break level. The bullish state holds until a confirmed downside break occurs, at which point the line moves to the swing high and the color transitions.
▶ Bearish Structure (Structure Line at Swing High with Bearish Color): When structure direction is bearish the line sits at the most recent confirmed swing high. Price remains in a downtrend structure until a confirmed upside break flips the state. The bearish state persists through subsequent bars until an upside break is registered.
🟢 Features
▶ Preconfigured Presets: Three parameter sets cover a range of trading styles and timeframes. Default uses the manual Left Structure Bars, Right Structure Bars, and Confirmation Buffer values and is balanced for swing trading on 1-hour and daily charts. Fast Response shortens the structure legs for scalping and intraday use on 1-minute to 1-hour charts, registering minor swings so the structure trend flips earlier. Smooth Trend lengthens the legs for position trading on daily and weekly charts, tracking only major swings and holding through pullbacks with the confirmation buffer.
▶ Built-in Alerts: Three alert conditions support automated monitoring of structure flips. Bullish Structure Shift fires on the first bar that structure direction changes from bearish to bullish. Bearish Structure Shift fires on the opposite transition. Any Structure Shift triggers on either flip for traders who prefer a single unified alert. All messages include the exchange, ticker, and timeframe for immediate context.
▶ Visual Customization: Six color presets (Classic, Aqua, Cosmic, Cyber, Neon, and Custom) supply coordinated bullish and bearish color pairings suited to different chart themes. Selecting Custom unlocks independent color pickers for full manual control. Optional bar coloring tints each candle with the active structure color at a configurable transparency, and optional background coloring extends the same tint across the full chart pane. Radial layering, structure shift markers, and the structure line itself all inherit the active color pair so the entire visual system remains consistent.
Indicator

Time-of-Day/Session Performance Stats [QuantAlgo]🟢 Overview
The Time-of-Day/Session Performance Stats is a comprehensive time-based analysis tool built for traders who want clear, ranked insight into when markets actually move. It measures average range, volume, bullish bias, and drift across every hour of the day and the four major sessions, then surfaces the strongest and weakest windows so you can focus activity where the data supports it. Whether you trade crypto around the clock or equity and forex sessions on a weekday schedule, the indicator turns raw historical bars into practical rankings, session comparisons, and non-repainting chart overlays.
🟢 What is Time-of-Day and Session Performance?
Markets are not uniform across the 24-hour cycle. Liquidity, volatility, and participation concentrate in specific hours and sessions. Sydney is typically the thinnest of the four major centers, Tokyo drives Asian activity, London often produces the widest ranges of the day, and the London-New York overlap is usually the busiest window. By averaging range, volume, the share of up closes, and net drift for each hour and each session over a configurable lookback, this tool converts those recurring patterns into ranked statistics instead of leaving you to rely on memory or anecdotal observation.
🟢 How It Works
The indicator walks a configurable window of past bars (limited by lookback days and a hard max-bar ceiling) in the timezone you select. Every usable bar is assigned to its hour of day and to any sessions it falls inside. Range can be measured in percent of close or in raw price units. Volume, directional closes, and drift are accumulated in parallel. Hours that do not meet a minimum bar-count threshold are dropped from every ranking so tiny samples cannot distort the boards.
Five ranking boards are produced: Activity (average range), Volume (when the symbol reports it), Bias (percentage of directional bars that closed higher), Drift (mean close-minus-open percentage), and Aggregated (the mean percentile of range, volume, and directional edge). Sessions are ranked solely on average range per bar and can be toggled or given custom windows. Overlaps count toward every session involved rather than being forced into one.
Chart overlays read a trailing window of the same length rather than the final ranking, so background shading and bar coloring never repaint. The Focus Hours panel converts the Aggregated ranking into three practical allocation plans plus the single quietest hour to avoid.
🟢 Key Features
▶ Ranking Boards
Five independent boards list every qualifying hour from strongest to weakest.
1. Activity Ranking: Orders hours by average bar range. Rank 1 is the hour with the most room; the last row is the quietest. This is the simplest and often most useful single board.
2. Volume Ranking: Orders hours by average volume. Read it alongside Activity. High range on low volume signals thin participation. The board is hidden automatically on symbols that report no volume.
3. Bias Ranking: Orders hours by the percentage of directional bars that closed above their open. Flat bars are excluded, so the figure reflects only bars that actually moved. There is no separate bearish column; the bottom of the board is the most bearish reading.
4. Drift Ranking: Orders hours by mean percentage change from open to close. An hour can post a high bull rate yet still show negative drift if its losing bars are larger than its winning ones. Divergences between Bias and Drift are often the most interesting signals.
5. Aggregated Ranking: Combines percentile ranks of range, volume (when present), and directional edge into a single composite score. This is the ranking that feeds both the Focus Hours panel and the Aggregated overlay option.
▶ Session Ranking Panel
The four major sessions are ranked by average range per bar and displayed with their window, bull rate, drift, and bar count. Rank 1 takes the bullish color and the last rank takes the bearish color on the same continuous gradient used by the boards. Because a bar inside an overlap is counted toward every session it belongs to, session bar totals can exceed the overall sample size.
▶ Focus Hours Panel
The Aggregated ranking is translated into four labeled plans: Aggressive (top hour only), Mix (top two with 80/20 weights), Conservative (top three with 50/30/20 weights), and Avoid (the single quietest hour by average range). Each row shows the relevant hours, their session affiliation, bull rate, drift, and score so the reading can be acted on immediately.
▶ Chart Overlay
Background shading and price-bar coloring can be driven independently by Session Ranking, Activity Ranking, Volume Ranking, Bias Ranking, Drift Ranking, Aggregated Ranking, or Focus Hours. All overlays are computed from a trailing window so they never repaint. Transparency controls let you keep the ranking obvious or keep it subtle enough not to compete with price.
▶ Session and Filter Controls
Sydney, Tokyo, London, and New York can each be enabled or disabled and given custom HHMM-HHMM windows in the selected timezone. A weekdays-only filter removes weekend bars for forex, futures, and equities while leaving crypto fully intact. The Bars To Include setting can restrict the entire study to all bars, any enabled session, or one named session.
▶ Built-in Alerts
Ready-made alert conditions fire when price enters the peak activity hour, the quietest hour, the peak volume hour, the most bullish or most bearish hour, or the top Aggregated hour. Separate alerts cover the open and close of each individual session, any session start or end, and the start and end of the London-New York overlap.
▶ Color Presets
Six presets (Classic, Aqua, Cosmic, Cyber, Neon, Custom) apply a continuous gradient from the bullish color at rank 1 to the bearish color at the last rank across every board, panel, and overlay. Custom mode exposes individual bullish and bearish color pickers; text contrast is calculated automatically so any chosen colors remain readable.
▶ Interval Warning
When the chart interval is higher than 1 hour, most of the 24 hour buckets never receive a bar, leaving the rankings incomplete. The indicator displays a clear warning label on the chart that explains the limitation and recommends switching to 5m, 15m, 30m, or 1h, for example. The warning can be turned off once the restriction is understood and a clean chart is preferred.
Indicator

ICT Entry Model Liquidity Sweep, MSS & FVG [LunqFX]A smart-money entry is never a single signal — it is a sequence. Price runs the stops beyond a swing, structure shifts the other way, and the entry is taken from the imbalance that shift left behind. Most ICT indicators draw one of those pieces and leave you to assemble the rest by hand. This one tracks the whole sequence live and finishes it with an actual trade: entry, stop, target and a quality score that tells you whether the setup was worth taking at all.
❶ THE FOUR STAGES
▸ LIQUIDITY SWEEP — price trades beyond a swing high or low, takes the stops resting there, and closes back inside. The sweep is marked and the level it raided is drawn. This is the manipulation leg, and it is where the stop for the trade will sit.
▸ MSS (MARKET STRUCTURE SHIFT) — after the sweep, price closes through the last short-term swing in the opposite direction. This is the confirmation that the sweep was a reversal and not a continuation. Note that the shift is measured against internal structure, not the major swing: waiting for a major swing to break would put the entry far too late, which is the single most common mistake in automated ICT tools.
▸ FVG ENTRY — the displacement that broke structure leaves a three-candle imbalance. That gap is the entry zone, drawn as a box, because price commonly returns to fill it before continuing.
▸ RISK AND TARGET — the stop goes beyond the sweep extreme, the target is your chosen R multiple. Both are drawn as filled zones running back to the entry, so the whole trade reads as one object instead of a set of loose lines.
❷ SETUP QUALITY 0–100
Not every sequence deserves a trade, and this is where the indicator does something no other entry tool does. Every setup is graded on four measurable properties:
▸ SWEEP DEPTH — how far beyond the level price actually ran, in ATR. A deeper raid means more stops were genuinely taken. ▸ DISPLACEMENT — how decisively the structure was broken, in ATR. A weak break is a weak setup. ▸ FVG SIZE — how large the imbalance is. A bigger gap is a stronger entry. ▸ SPEED — how quickly the shift followed the sweep. A fast reversal is aggressive; a slow one has lost its edge.
The four are blended into a single 0–100 score shown on every entry tag and in the dashboard. Set the minimum quality in the settings and weak sequences simply stop being drawn — you trade the good ones instead of every arrow.
❸ HOW TO TRADE IT
1 — Wait for the SWEEP marker. The dashboard turns amber and reads SWEEP · WAITING MSS. Nothing to do yet: the manipulation has happened but it is not confirmed.
2 — Wait for MSS. When structure shifts, the setup is drawn and the dashboard turns green for a long or red for a short. If structure does not shift within the allowed window, the sweep is discarded and the model resets — no stale signals.
3 — Check the quality score before committing. High scores come from a deep sweep, a decisive break and a clean imbalance. If the number is low, the sequence was technically valid but structurally weak.
4 — Place the trade from the ticket. Entry at the FVG edge, stop beyond the sweep, target at your R multiple. The dashboard shows all three plus the exact risk in price, so the position size follows directly.
5 — Let price come to you. The FVG is a limit entry, not a market entry. If price never returns to the gap, the setup is simply skipped — that is the model working as intended.
❹ HOW IT WORKS
Liquidity swings and internal structure are detected with confirmed pivots, so a level only exists once the bars on both sides of it have closed. A sweep requires a bar to trade beyond the swing and close back inside it, and it is only registered when the shift level is still unbroken — otherwise the sequence could confirm itself on the very next bar. The structure shift requires a close through that internal level within your chosen window. The imbalance is found in the displacement leg using the standard three-candle definition. The stop is the sweep extreme, the target is the entry plus or minus the risk times your R multiple, and setups whose stop would be smaller than a fraction of ATR are rejected as untradeable. The quality score is a weighted blend of the four properties above, each normalised by ATR so the score behaves the same on every symbol and timeframe.
Works on any market and timeframe — forex, gold, indices, crypto and stocks. Intraday charts from 5m to 4h suit the model best, since that is where liquidity raids and structure shifts happen most often.
SETTINGS — liquidity swing length, internal structure length, maximum bars from sweep to shift, R multiple for the target, minimum stop distance, minimum quality, number of setups kept, level extension, FVG and level visibility, candle colouring and dashboard position.
ALERTS — long setup confirmed, short setup confirmed, and any setup confirmed. All fire on closed bars only.
NON-REPAINTING — every stage is validated on bar close and built from confirmed pivots. A setup that has printed never moves, never changes its levels and never disappears.
The four stages are not four indicators bundled together — they are four steps of one entry model, and none of them is tradeable alone. The sweep without the shift is just a wick; the shift without the sweep is just a break; the imbalance without either is just a gap. That is why they belong in a single tool.
This indicator is an educational market-analysis tool, not financial advice. The quality score describes the structure of a setup and does not predict its outcome. Always confirm with your own analysis and manage your risk. Indicator

Pivot Sniper Method [trade_w_samet]🎯 Pivot Sniper Method
Pivot Sniper Method is a confirmed pivot-reversal, signal-quality, session-filtering, trade-mapping, alert, and loaded-history statistics indicator designed to convert confirmed price pivots into a structured chart-review workflow.
The script is built around one central idea:
Not every confirmed pivot should be treated as an equal-quality reversal setup.
Instead of displaying every pivot as an identical signal, Pivot Sniper Method evaluates each confirmed pivot through a five-part Signal Strength model, applies the selected directional and session rules, maps a complete Entry / Stop Loss / TP1 / TP2 / TP3 structure, manages optional Break-Even behavior, and records the result through an internal R-based tracker.
When an eligible pivot is confirmed, the script can:
• Display a confirmed BUY or SELL label
• Show the calculated Signal Strength percentage directly below the direction label
• Evaluate Pivot Distance, Wick Quality, Confirmation Candle, Volume Participation, and Trend Alignment
• Apply Bullish, Bearish, or Both directional bias
• Restrict new signals to London, New York, London + New York, All Sessions, or a Custom session
• Apply an adjustable signal cooldown
• Calculate the Entry at the confirmation-candle close
• Calculate Stop Loss using ATR, Pivot Level, Pivot + ATR Buffer, or Signal Candle
• Calculate independently adjustable TP1, TP2, and TP3 targets
• Move the active Stop Loss to Break-Even after TP1 or TP2
• Add an optional favorable Break-Even tick offset
• Replace the current active tracked trade when a new eligible signal appears
• Display active Entry, Stop / Break-Even, TP1, TP2, and TP3 lines and labels
• Remove the separate Entry line and label after Break-Even becomes active
• Display compact tooltips containing signal, price, risk, target, and status information
• Track Trades, Win Rate, NET R, Average R, TP1 / TP2 / TP3 hit rates, and Break-Even results
• Display a compact premium desktop dashboard
• Display a reduced Phone Mode dashboard
• Move the dashboard to any chart corner
• Support Auto, Dark, Light, and Phone visual modes
• Support static alertcondition() events
• Support one combined “Any alert() function call” workflow
• Include symbol, timeframe, strength, Entry, Stop, targets, Stop Loss mode, Break-Even mode, and session context in dynamic alerts
The purpose of the script is to provide a transparent framework for studying confirmed pivots, setup quality, session context, predefined risk, multiple reward targets, Break-Even behavior, and bar-based historical outcomes.
It is not financial advice.
It is not an automated trading system.
It does not execute broker orders.
It does not calculate position size.
It does not guarantee that a confirmed pivot will produce a reversal.
It does not guarantee that historical Win Rate or NET R will continue in future market conditions.
It does not include spread, commission, slippage, latency, financing, taxes, partial fills, or broker-specific execution.
It does not reconstruct the exact intrabar path inside historical candles.
━━━━━━━━━━━━━━━━━━━━━━
📌 OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━
At a high level, Pivot Sniper Method performs the following sequence:
• Searches price for confirmed pivot lows and pivot highs.
• Requires the selected number of completed candles on the right side of a pivot.
• Rejects simultaneous bullish and bearish pivot confirmation on the same calculation.
• Evaluates the selected Trend Bias.
• Evaluates the selected Trading Session.
• Evaluates the signal cooldown.
• Calculates a 0–100 Signal Strength score.
• Rejects signals below the selected minimum strength when the strength filter is enabled.
• Displays a BUY or SELL label only when all active signal rules pass.
• Opens a tracked trade at the close of the confirmation candle.
• Selects a Stop Loss using the active Stop Loss Mode.
• Uses ATR as a safety fallback when a structural Stop Loss is invalid.
• Calculates TP1, TP2, and TP3 from the actual Entry-to-Stop risk distance.
• Tracks target and stop touches from the candle after entry.
• Moves the active Stop Loss to Break-Even after the selected target condition.
• Replaces an active tracked trade at the current close when a new eligible signal appears.
• Records each completed trade in R.
• Updates a compact dashboard with state, trade, performance, and quality information.
• Generates static and dynamic PulseWire alert events.
The script does not use machine learning.
It does not claim to predict every market reversal.
Its dashboard is not PulseWire Strategy Tester.
Its statistics are calculated internally from the script’s own confirmed-signal, OHLC-touch, replacement-exit, and Break-Even rules.
━━━━━━━━━━━━━━━━━━━━━━
🧠 CORE IDEA
━━━━━━━━━━━━━━━━━━━━━━
A pivot low identifies a price point that is lower than the selected number of candles on both sides.
A pivot high identifies a price point that is higher than the selected number of candles on both sides.
Confirmed pivots can provide useful reversal context, but a pivot alone does not answer:
• whether the setup agrees with the selected directional bias
• whether the setup occurs during the selected trading session
• whether the pivot candle contains a meaningful rejection wick
• whether price has moved sufficiently away from the confirmed pivot
• whether the confirmation candle supports the intended direction
• whether volume participation is elevated or ordinary
• whether price and the selected EMA structure support the direction
• where Stop Loss should be placed
• how the trade should be mapped in R
• when Break-Even should become active
• how a new signal should affect an existing tracked trade
• how the setup behaved under the script’s historical bar-touch rules
Pivot Sniper Method therefore treats the pivot as the first stage of a complete process rather than the final decision.
The complete workflow is:
potential pivot
→ right-side pivot confirmation
→ same-bar conflict rejection
→ directional-bias validation
→ session validation
→ cooldown validation
→ five-part quality scoring
→ minimum-strength validation
→ BUY or SELL signal
→ confirmation-candle Entry
→ Stop Loss selection
→ TP1 / TP2 / TP3 mapping
→ active-trade management
→ optional Break-Even
→ TP3, Stop, Break-Even, or replacement exit
→ internal R result
→ dashboard update
→ alert event
━━━━━━━━━━━━━━━━━━━━━━
🧩 WHY THIS IS NOT A SIMPLE PIVOT MARKER
━━━━━━━━━━━━━━━━━━━━━━
A basic pivot script can stop after placing a shape on a confirmed swing high or swing low.
Pivot Sniper Method continues beyond pivot detection.
Each eligible setup passes through a coordinated structure:
confirmed price pivot
→ 0–100 quality evaluation
→ bias and session permission
→ structured Entry
→ selectable Stop Loss model
→ independent TP1, TP2, and TP3 targets
→ optional Break-Even transition
→ live target-status updates
→ active-trade replacement logic
→ historical R accounting
→ compact statistics dashboard
→ static and dynamic alerts
The pivot module defines the confirmed reversal location.
The Signal Strength module evaluates quality.
The Trend Bias module controls permitted directions.
The Time Filter controls when new setups may be accepted.
The trade-mapping module converts the setup into explicit price levels.
The Break-Even module changes active risk only after the selected target is confirmed.
The statistics module summarizes the exact results produced by those rules.
The alert module communicates signal and trade-management events.
These modules are not unrelated indicators placed together.
They form one process for identifying, filtering, mapping, monitoring, and reviewing confirmed pivot-reversal setups.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ HOW THE SCRIPT WORKS
━━━━━━━━━━━━━━━━━━━━━━
The script runs directly on the main price chart.
It calculates confirmed price pivots using independently adjustable left-side and right-side lengths for highs and lows.
The default pivot configuration is:
• Pivot High Left Bars: 10
• Pivot High Right Bars: 10
• Pivot Low Left Bars: 10
• Pivot Low Right Bars: 10
The signal engine then combines:
• confirmed pivot status
• Bullish / Bearish / Both bias permission
• selected session permission
• Signal Strength threshold
• cooldown permission
• same-bar dual-pivot rejection
• confirmed chart-bar status
A BUY signal is based on a confirmed pivot low.
A SELL signal is based on a confirmed pivot high.
The signal label is placed on the confirmation candle, not on the original historical pivot candle.
The Entry is also stored at the close of the confirmation candle.
This separation is important:
Pivot Price
The historical swing level that became confirmed after the selected right-side bars.
Signal Candle
The later candle where the script knows the pivot exists and all active filters pass.
Entry Price
The close of that later signal-confirmation candle.
━━━━━━━━━━━━━━━━━━━━━━
🔍 PIVOT DETECTION MODEL
━━━━━━━━━━━━━━━━━━━━━━
Pivot High Left Bars determines how many candles to the left must have lower highs than a potential pivot high.
Pivot High Right Bars determines how many completed candles must form to the right before the potential pivot high is confirmed.
Pivot Low Left Bars determines how many candles to the left must have higher lows than a potential pivot low.
Pivot Low Right Bars determines how many completed candles must form to the right before the potential pivot low is confirmed.
Higher left and right values generally identify larger and less frequent swing structures.
Lower values generally identify smaller and more frequent structures.
The high and low settings are independent.
This allows users to study symmetrical configurations such as 10 / 10 for both directions, or asymmetrical configurations when market behavior requires different sensitivity for pivot highs and pivot lows.
The central pivot calculation is:
float confirmedPivotHigh = ta.pivothigh(
high,
leftHighInput,
rightHighInput
)
float confirmedPivotLow = ta.pivotlow(
low,
leftLowInput,
rightLowInput
)
bool rawBuySignal =
barstate.isconfirmed and
not na(confirmedPivotLow)
bool rawSellSignal =
barstate.isconfirmed and
not na(confirmedPivotHigh)
These functions return a confirmed pivot value only after the required right-side bars exist.
A confirmed pivot does not automatically become a signal.
It must still pass:
• same-bar conflict rejection
• Trend Bias
• Trading Session
• Signal Strength
• cooldown
━━━━━━━━━━━━━━━━━━━━━━
⏳ PIVOT CONFIRMATION AND SIGNAL TIMING
━━━━━━━━━━━━━━━━━━━━━━
This section is essential for correct interpretation.
The script uses confirmed pivot functions.
A pivot is not known on the original pivot candle.
For example, with Pivot Low Right Bars set to 10:
• the potential pivot low occurs
• ten additional candles must complete to its right
• the pivot becomes confirmed on the later calculation candle
• the BUY candidate can then be evaluated
The signal label is displayed on the later confirmation candle.
The trade Entry is stored at the close of that confirmation candle.
The script does not backdate the BUY or SELL trade label to the original pivot candle.
This means:
• the pivot price belongs to an earlier historical candle
• the signal becomes available later
• the displayed Entry reflects the later confirmation close
• increasing right-side bars increases confirmation delay
• decreasing right-side bars confirms smaller structures earlier
The script also requires barstate.isconfirmed for raw pivot candidates.
Signals are therefore based on completed chart candles.
This reduces unfinished current-candle changes, but it does not remove the inherent delay required by pivot confirmation.
━━━━━━━━━━━━━━━━━━━━━━
🟢 CONFIRMED BUY LOGIC
━━━━━━━━━━━━━━━━━━━━━━
A BUY candidate begins when a pivot low is confirmed.
The candidate is rejected when a pivot high is also confirmed on the same calculation.
The remaining BUY candidate must satisfy:
• Trend Bias is Bullish or Both
• the selected Trading Session is active
• the BUY Signal Strength meets the minimum threshold when filtering is enabled
• the cooldown is ready
• the chart bar is confirmed
When accepted, the script displays:
▲ BUY
strength%
The strength percentage appears on the second line to keep the label compact.
The compact two-line BUY label is constructed as:
string buyLabelText =
showStrengthOnSignalInput
? "▲ BUY " + str.tostring(buySignalStrength) + "%"
: "▲ BUY"
The SELL label uses the mirrored ▼ SELL format.
The label is placed below the signal candle.
The BUY tooltip can display:
• Confirmed BUY
• Signal Strength
• Confirmed Pivot price
The tracked Entry is the signal-confirmation candle close.
The BUY Stop Loss is placed below Entry using the selected Stop Loss Mode.
TP1, TP2, and TP3 are calculated above Entry from the actual Entry-to-Stop risk distance.
━━━━━━━━━━━━━━━━━━━━━━
🔴 CONFIRMED SELL LOGIC
━━━━━━━━━━━━━━━━━━━━━━
A SELL candidate begins when a pivot high is confirmed.
The candidate is rejected when a pivot low is also confirmed on the same calculation.
The remaining SELL candidate must satisfy:
• Trend Bias is Bearish or Both
• the selected Trading Session is active
• the SELL Signal Strength meets the minimum threshold when filtering is enabled
• the cooldown is ready
• the chart bar is confirmed
When accepted, the script displays:
▼ SELL
strength%
The strength percentage appears on the second line.
The label is placed above the signal candle.
The SELL tooltip can display:
• Confirmed SELL
• Signal Strength
• Confirmed Pivot price
The tracked Entry is the signal-confirmation candle close.
The SELL Stop Loss is placed above Entry using the selected Stop Loss Mode.
TP1, TP2, and TP3 are calculated below Entry from the actual Entry-to-Stop risk distance.
━━━━━━━━━━━━━━━━━━━━━━
💪 SIGNAL STRENGTH MODEL
━━━━━━━━━━━━━━━━━━━━━━
Signal Strength is a 0–100 quality score.
The final score contains five components worth up to 20 points each:
1. Pivot Distance
2. Wick Quality
3. Confirmation Candle
4. Volume Participation
5. Trend Alignment
The score is intended to compare the internal characteristics of confirmed pivot setups under the same script rules.
It is not a probability forecast.
A 75% label does not mean there is a guaranteed 75% probability of profit.
It means the setup received 75 points out of the script’s 100-point quality model.
The Minimum Signal Strength input controls the required score.
Default:
55
When the filter is enabled:
• scores below the minimum are rejected
• scores equal to or above the minimum are eligible
• lower thresholds generally create more signals
• higher thresholds generally create fewer signals
The strength percentage can be hidden from the BUY / SELL label without disabling the strength filter.
The five component values are combined into the final score:
int buySignalStrength = int(math.round(
math.min(
buyPivotDistanceScore +
buyWickScore +
buyCandleScore +
volumeScore +
buyTrendScore,
100.0
)
))
int sellSignalStrength = int(math.round(
math.min(
sellPivotDistanceScore +
sellWickScore +
sellCandleScore +
volumeScore +
sellTrendScore,
100.0
)
))
A score is therefore the sum of five internal measurements, capped at 100.
━━━━━━━━━━━━━━━━━━━━━━
📏 PIVOT DISTANCE COMPONENT
━━━━━━━━━━━━━━━━━━━━━━
Pivot Distance evaluates how far the confirmation-candle close is from the confirmed pivot relative to ATR.
For BUY candidates, the model measures the distance from the confirmed pivot low to the current close.
For SELL candidates, it measures the distance from the current close to the confirmed pivot high.
The normalized value is capped internally.
The maximum contribution is 20 points.
This component does not claim that a larger distance is always better.
It only measures the amount of price separation used by this quality model.
━━━━━━━━━━━━━━━━━━━━━━
🕯️ WICK QUALITY COMPONENT
━━━━━━━━━━━━━━━━━━━━━━
Wick Quality evaluates the rejection wick on the original pivot candle.
For BUY candidates:
• lower wick size is compared with the full pivot-candle range
For SELL candidates:
• upper wick size is compared with the full pivot-candle range
A larger relevant wick can contribute more points, up to 20.
This component attempts to represent rejection behavior at the confirmed swing.
A large wick does not guarantee reversal continuation.
━━━━━━━━━━━━━━━━━━━━━━
📊 CONFIRMATION CANDLE COMPONENT
━━━━━━━━━━━━━━━━━━━━━━
The Confirmation Candle component evaluates the candle where the pivot becomes confirmed and the signal is processed.
The model considers:
• body size relative to the full candle range
• bullish close direction for BUY candidates
• bearish close direction for SELL candidates
The body ratio contributes most of the component score.
A directional close can add an additional internal bonus.
The maximum contribution is 20 points.
The confirmation candle is not the original pivot candle.
━━━━━━━━━━━━━━━━━━━━━━
🔊 VOLUME PARTICIPATION COMPONENT
━━━━━━━━━━━━━━━━━━━━━━
Volume Participation compares current volume with an adjustable volume average.
Default volume length:
20
Higher relative volume can contribute more points, up to 20.
The component is internally capped.
When usable volume data is unavailable, the script applies a neutral fallback contribution instead of automatically assigning zero.
Volume behavior differs across asset classes and data feeds.
For some symbols, displayed volume can represent exchange volume.
For others, it can represent tick activity or a provider-specific value.
━━━━━━━━━━━━━━━━━━━━━━
📈 TREND ALIGNMENT COMPONENT
━━━━━━━━━━━━━━━━━━━━━━
Trend Alignment uses an adjustable EMA.
Default EMA length:
50
For BUY candidates, the component evaluates:
• whether price is above the EMA
• whether the EMA is rising
For SELL candidates, it evaluates:
• whether price is below the EMA
• whether the EMA is falling
Each condition contributes part of the 20-point component.
This EMA is used as one component of Signal Strength.
It is not a separate hard directional filter.
A setup can still receive points from the other four components when Trend Alignment is weak.
━━━━━━━━━━━━━━━━━━━━━━
🧭 TREND BIAS
━━━━━━━━━━━━━━━━━━━━━━
Trend Bias controls which signal directions are permitted.
Available modes:
• Bullish
• Bearish
• Both
Bullish
Allows only confirmed BUY signals.
Bearish
Allows only confirmed SELL signals.
Both
Allows confirmed signals in both directions.
Trend Bias does not change pivot detection.
It changes which confirmed candidates are allowed to become signals and tracked trades.
The final signal gate combines pivot confirmation, directional permission, session permission, Signal Strength, and cooldown:
bool buySignal =
buyCandidate and
bullishBiasAllowed and
timeFilterPassed and
buyStrengthPassed and
cooldownReady
bool sellSignal =
sellCandidate and
bearishBiasAllowed and
timeFilterPassed and
sellStrengthPassed and
cooldownReady
Only candidates that pass every active condition become BUY or SELL signals.
━━━━━━━━━━━━━━━━━━━━━━
🕒 SESSION FILTER
━━━━━━━━━━━━━━━━━━━━━━
The Trading Session input controls when new signals can be accepted.
Available modes:
• All Sessions
• London
• New York
• London + New York
• Custom
London uses:
08:00–17:00
Europe/London time
New York uses:
09:30–16:00
America/New_York time
London + New York accepts signals during either defined session.
Custom allows the user to define a session and select:
• Exchange
• UTC
• Europe/London
• America/New_York
• Europe/Istanbul
• Asia/Tokyo
The session filter affects new entries only.
An already active tracked trade continues to be managed outside the selected session.
The dashboard displays whether the current session rule is OPEN or CLOSED.
━━━━━━━━━━━━━━━━━━━━━━
⏳ COOLDOWN AND CONFLICT HANDLING
━━━━━━━━━━━━━━━━━━━━━━
Signal Cooldown Bars defines the minimum number of completed candles required between accepted signals.
Default:
0
A value of 0 disables additional cooldown filtering.
Higher values reduce how frequently new signals can be accepted.
When a pivot high and pivot low are both confirmed on the same calculation, the script rejects both candidates.
This prevents contradictory BUY and SELL signals from being accepted on the same candle.
━━━━━━━━━━━━━━━━━━━━━━
🎯 ENTRY AND ACTIVE-TRADE REPLACEMENT MODEL
━━━━━━━━━━━━━━━━━━━━━━
The Entry is stored at the close of the accepted signal candle.
The script maintains one active tracked trade.
However, new eligible signals are not ignored while a trade is active.
When a new eligible BUY or SELL signal appears:
• the current active trade is valued at the new signal candle’s close
• its current R result is added to statistics
• its active lines and labels are removed
• the new signal opens a new tracked trade
This behavior applies to eligible same-direction and opposite-direction signals.
The replacement exit is not a broker fill.
It is an internal close-based accounting rule used to keep only one active tracked trade.
Because replacement exits can occur before TP3, Stop Loss, or Break-Even, NET R can include partial positive or negative R outcomes.
━━━━━━━━━━━━━━━━━━━━━━
🛑 STOP LOSS SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The script includes four Stop Loss modes:
• ATR
• Pivot Level
• Pivot + ATR Buffer
• Signal Candle
ATR
BUY:
Entry − ATR × multiplier
SELL:
Entry + ATR × multiplier
Default ATR length:
14
Default ATR multiplier:
2.0
Pivot Level
BUY:
confirmed pivot low
SELL:
confirmed pivot high
Pivot + ATR Buffer
BUY:
confirmed pivot low − ATR × pivot buffer
SELL:
confirmed pivot high + ATR × pivot buffer
Default pivot buffer:
0.25 ATR
Signal Candle
BUY:
signal candle low
SELL:
signal candle high
The script validates the selected Stop Loss.
For BUY, Stop Loss must be meaningfully below Entry.
For SELL, Stop Loss must be meaningfully above Entry.
When the selected structural stop is invalid, the script uses the ATR Stop Loss as a safety fallback.
The actual risk distance is:
absolute difference between Entry and the validated Stop Loss
That distance becomes 1R for all target calculations.
The requested Stop Loss is selected from the active mode:
requestedStopPrice :=
stopLossModeInput == "ATR"
? activeEntryPrice - atrFallbackDistance
: stopLossModeInput == "Pivot Level"
? confirmedPivotLow
: stopLossModeInput == "Pivot + ATR Buffer"
? confirmedPivotLow - atrValue * pivotBufferATRInput
: low
For SELL trades, the same logic is mirrored above Entry.
The script then validates the requested structural stop.
When the selected price is not on the correct side of Entry, ATR is used as the fallback.
━━━━━━━━━━━━━━━━━━━━━━
🏆 TP1 / TP2 / TP3 SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
TP1, TP2, and TP3 are independently adjustable.
Default values:
• TP1: 1R
• TP2: 2R
• TP3: 3R
For BUY:
target = Entry + risk distance × selected R multiple
For SELL:
target = Entry − risk distance × selected R multiple
TP1 and TP2 are intermediate target events.
TP3 is the final target and closes the active tracked trade.
When TP3 is touched:
• TP1 is also recorded if it was not already recorded
• TP2 is also recorded if it was not already recorded
• TP3 is recorded
• the trade closes at the selected TP3 R value
Users should normally keep:
TP1 < TP2 < TP3
The script allows independent values, so users are responsible for maintaining a logical target sequence.
After the validated Stop Loss is stored, the script defines 1R and calculates each target:
activeRiskDistance :=
math.max(
math.abs(activeEntryPrice - activeStopPrice),
syminfo.mintick
)
activeTP1Price :=
activeTradeDirection == 1
? activeEntryPrice + activeRiskDistance * tp1RRInput
: activeEntryPrice - activeRiskDistance * tp1RRInput
activeTP2Price :=
activeTradeDirection == 1
? activeEntryPrice + activeRiskDistance * tp2RRInput
: activeEntryPrice - activeRiskDistance * tp2RRInput
activeTP3Price :=
activeTradeDirection == 1
? activeEntryPrice + activeRiskDistance * tp3RRInput
: activeEntryPrice - activeRiskDistance * tp3RRInput
The target calculations therefore remain proportional to the actual Entry-to-Stop distance.
━━━━━━━━━━━━━━━━━━━━━━
🟡 BREAK-EVEN SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
Break-Even Mode includes:
• Off
• After TP1
• After TP2
After TP1
The Stop Loss moves to Entry after the TP1-touch candle closes.
After TP2
The Stop Loss moves to Entry after the TP2-touch candle closes.
The updated Break-Even stop applies from the following candle.
An optional favorable tick offset can be added.
For BUY:
Break-Even = Entry + offset
For SELL:
Break-Even = Entry − offset
When Break-Even becomes active:
• the Stop Loss line changes to the Break-Even color
• the Stop label changes from SL to BE
• the separate Entry line is deleted
• the separate Entry label is deleted
• only the BE level remains at or near Entry
This prevents Entry and Break-Even labels from overlapping at the same price.
A Break-Even stop with zero offset produces approximately 0R.
A positive favorable offset can produce a small positive R result.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ SAME-CANDLE STOP AND TARGET HANDLING
━━━━━━━━━━━━━━━━━━━━━━
Historical OHLC candles do not reveal the exact sequence of all intrabar price movement.
A candle can include both the active Stop price and one or more target prices.
When the active Stop and a target are both touched inside the same historical candle, the script uses a conservative rule:
The active Stop receives priority.
This applies to the original Stop Loss and the active Break-Even stop.
Trade-management checks begin on the candle after Entry.
The Entry candle cannot immediately close the new tracked trade.
The conservative priority rule can produce different results from lower-timeframe reconstruction or tick-level execution data.
━━━━━━━━━━━━━━━━━━━━━━
📐 ACTIVE TRADE VISUAL SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
While a tracked trade is active, the script can display:
• Stop Loss or Break-Even line
• Entry line
• TP1 line
• TP2 line
• TP3 line
• Stop Loss or Break-Even label
• Entry label
• TP1 label
• TP2 label
• TP3 label
The lines project to the right by the selected number of bars.
Default:
20 bars
Stop and Entry use solid lines.
Targets use dashed lines.
After TP1 or TP2 is reached:
• the corresponding target label changes to a completed state
• the corresponding line becomes more transparent
After Break-Even activates:
• the Entry line and Entry label disappear
• the active Stop line and label become BE
When the trade closes or is replaced:
• active trade lines are deleted
• active trade labels are deleted
The script does not preserve completed trade lines as permanent historical drawings.
━━━━━━━━━━━━━━━━━━━━━━
🏷️ LABELS, TOOLTIPS, AND TEXT
━━━━━━━━━━━━━━━━━━━━━━
BUY and SELL labels use two lines when strength display is enabled:
direction
strength%
Available Label Size values:
• Tiny
• Small
• Normal
• Large
• Huge
The setting controls:
• BUY
• SELL
• Entry
• Stop Loss
• Break-Even
• TP1
• TP2
• TP3
Phone Mode overrides the selected label size with Tiny.
Visible chart labels use bold and italic formatting.
Signal tooltips can show:
• direction
• strength
• pivot price
Trade-level tooltips can show:
• Entry strength
• risk distance
• Stop Loss mode
• Stop or BE price
• target R value
• target price
• target status
• Break-Even tick offset
Tooltips are informational chart elements.
They do not represent broker orders.
━━━━━━━━━━━━━━━━━━━━━━
📟 COMPACT PREMIUM DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━
The desktop dashboard is divided into four sections:
STATE
• symbol and timeframe
• active signal and strength
• current trade status
• session status
TRADE
• active Stop Loss mode
• Entry and Stop / Break-Even
• TP1 / TP2 / TP3 scale
• live R
PERFORMANCE
• total trades started
• closed trades
• Win Rate
• NET R
• Average R
• TP1 / TP2 / TP3 hit rates
QUALITY
• latest strength
• Trend component
• Volume component
• Wick component
• Confirmation Candle component
• Pivot Distance component
• Trend Bias
• Break-Even mode
• Minimum Strength
Quality components are displayed in a compact format:
T = Trend
V = Volume
W = Wick
C = Candle
P = Pivot Distance
The dashboard can be positioned at:
• Top Right
• Bottom Right
• Top Left
• Bottom Left
The selected input is translated into a PulseWire table position:
string dashboardTablePosition =
dashboardPositionInput == "Top Right" ? position.top_right :
dashboardPositionInput == "Top Left" ? position.top_left :
dashboardPositionInput == "Bottom Left" ? position.bottom_left :
position.bottom_right
if barstate.islast
table.set_position(
statisticsTable,
dashboardTablePosition
)
━━━━━━━━━━━━━━━━━━━━━━
📊 STATISTICS METHODOLOGY
━━━━━━━━━━━━━━━━━━━━━━
The statistics are produced by the script’s internal bar-based tracker.
They are not imported from a broker.
They are not verified account results.
They are not PulseWire Strategy Tester results.
Total Trades Started
Number of accepted signals that opened a tracked trade.
Total Trades Closed
Number of tracked trades closed by:
• Stop Loss
• Break-Even
• TP3
• active-trade replacement
TP1 Hit Rate
TP1 touches divided by Total Trades Started.
TP2 Hit Rate
TP2 touches divided by Total Trades Started.
TP3 Hit Rate
TP3 touches divided by Total Trades Started.
NET R
Sum of all recorded closed-trade R outcomes.
Average R
NET R divided by Total Trades Closed.
Win Rate
Positive-R trades divided by positive-R plus negative-R trades.
Exact 0R Break-Even results are excluded from the Win Rate denominator.
A favorable Break-Even offset can produce a small positive R result and can therefore be classified as a positive-R trade.
Replacement exits use the close of the new signal candle and can contribute partial R.
Statistics depend on:
• loaded chart history
• symbol
• timeframe
• exchange or broker feed
• left and right pivot settings
• Trend Bias
• session setting
• cooldown
• strength threshold
• EMA and volume lengths
• ATR settings
• Stop Loss mode
• target settings
• Break-Even settings
• replacement-signal sequence
Changing any of these inputs can change historical results.
━━━━━━━━━━━━━━━━━━━━━━
🎨 THEME SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The script includes:
• Auto
• Dark Mode
• Light Mode
• Phone Mode
Auto
Detects the chart background and selects the corresponding light or dark visual palette.
Dark Mode
Uses:
• darker green and red signal colors
• dark dashboard surfaces
• white chart-label text
• dark Entry color
• muted dashboard text
• red brand header
Light Mode
Uses:
• brighter green and red signal colors
• light dashboard surfaces
• dark BUY text where required
• adjusted Entry and dashboard colors
• red brand header
Theme selection changes presentation.
It does not change pivot detection, Signal Strength, trade levels, statistics, or alerts.
━━━━━━━━━━━━━━━━━━━━━━
📱 PHONE MODE
━━━━━━━━━━━━━━━━━━━━━━
Phone Mode is designed for smaller chart areas.
It uses:
• Tiny signal labels
• Tiny active-trade labels
• one-pixel trade-level lines
• dark visual palette
• compact dashboard text
• reduced dashboard rows
The Phone Mode dashboard displays:
• Signal and Strength
• Status
• Win Rate and NET R
• Session
The compact layout intentionally removes most desktop details.
Phone Mode changes presentation only.
It does not change calculations.
━━━━━━━━━━━━━━━━━━━━━━
🚨 ALERT SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The script includes static PulseWire alert conditions for:
• Confirmed BUY
• Confirmed SELL
• Stop Loss Hit
• Break-Even Activated
• Break-Even Hit
• TP1 Hit
• TP2 Hit
• TP3 Hit
Static BUY and SELL messages can include:
• exchange
• ticker
• timeframe
• Signal Strength
• Entry
• Stop
• TP1
• TP2
• TP3
The script also includes dynamic alert() events for:
• BUY signal
• SELL signal
• Stop Loss hit
• Break-Even activation
• Break-Even hit
• TP1 hit
• TP2 hit
• TP3 hit
Dynamic signal messages can include:
• trade_w_samet identifier
• event type
• direction
• symbol
• timeframe
• Signal Strength
• Entry
• Stop
• TP1
• TP2
• TP3
• Stop Loss Mode
• Break-Even Mode
• Trading Session
• session OPEN / CLOSED state
Dynamic trade-management messages preserve the active trade’s stored values before the trade state is reset.
Alert events use once-per-bar-close frequency.
A dynamic signal message is assembled from the stored trade values:
string buyEntryAlertMessage =
"trade_w_samet | Pivot Sniper Method" +
" Event: BUY SIGNAL" +
" Direction: BUY" +
" Symbol: " + syminfo.tickerid +
" Timeframe: " + timeframe.period +
" Strength: " + str.tostring(buySignalStrength) + "%" +
" Entry: " + str.tostring(activeEntryPrice, format.mintick) +
" SL: " + str.tostring(activeStopPrice, format.mintick) +
" TP1: " + str.tostring(activeTP1Price, format.mintick) +
" TP2: " + str.tostring(activeTP2Price, format.mintick) +
" TP3: " + str.tostring(activeTP3Price, format.mintick)
alert(
message=buyEntryAlertMessage,
freq=alert.freq_once_per_bar_close
)
The complete live message also includes Stop Loss Mode, Break-Even Mode, and session context.
Alerts are monitoring tools.
They do not execute or modify broker orders.
━━━━━━━━━━━━━━━━━━━━━━
🔔 HOW TO USE ALERTS
━━━━━━━━━━━━━━━━━━━━━━
For a specific static event:
1. Add Pivot Sniper Method to the chart.
2. Open PulseWire’s Create Alert window.
3. Select the indicator as the condition.
4. Select the required BUY, SELL, Stop, Break-Even, TP1, TP2, or TP3 event.
5. Select the notification method.
6. Test the alert before relying on it.
For one combined dynamic workflow:
1. Add the indicator to the chart.
2. Open Create Alert.
3. Select Pivot Sniper Method .
4. Select Any alert() function call.
5. Configure the delivery method.
6. Test signal and trade-management messages.
PulseWire saves a snapshot of the script, its inputs, and chart context when an alert is created.
After materially changing the script, symbol, timeframe, or inputs, delete and recreate the alert so it uses the intended configuration.
━━━━━━━━━━━━━━━━━━━━━━
🧪 PRACTICAL WORKFLOW
━━━━━━━━━━━━━━━━━━━━━━
A practical review process:
1. Add Pivot Sniper Method to a standard candlestick chart.
2. Select Auto, Dark, Light, or Phone Mode.
3. Start with symmetrical pivot settings.
4. Observe how right-side bars affect confirmation delay.
5. Select Both Trend Bias when studying raw signal behavior.
6. Select Bullish or Bearish when reviewing one direction only.
7. Begin with All Sessions when studying general behavior.
8. Test London, New York, or Custom session filtering.
9. Begin with the default Minimum Signal Strength.
10. Compare signal frequency at higher and lower thresholds.
11. Review the strength percentage below each BUY or SELL label.
12. Use the tooltip to inspect the confirmed pivot price.
13. Compare the five quality components in the dashboard.
14. Select the preferred Stop Loss Mode.
15. Verify that the structural stop is logically positioned.
16. Review the ATR fallback behavior.
17. Set TP1, TP2, and TP3 in increasing order.
18. Select the Break-Even rule.
19. Review when the Entry label disappears and BE replaces it.
20. Observe how new eligible signals replace an active tracked trade.
21. Review Live R and historical NET R.
22. Review failed setups as well as successful setups.
23. Create and test alerts.
24. Define personal position size independently.
25. Account for spread, commission, liquidity, news, and execution conditions.
The indicator is designed for structured study and monitoring.
It should not be treated as an automatic decision-maker.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS REFERENCE
━━━━━━━━━━━━━━━━━━━━━━
📈 Trend Bias
Trend Bias
• Bullish
• Bearish
• Both
━━━━━━━━━━━━━━━━━━━━━━
⚙️ Pivot Settings
Pivot High Left Bars
Default:
10
Pivot High Right Bars
Default:
10
Pivot Low Left Bars
Default:
10
Pivot Low Right Bars
Default:
10
━━━━━━━━━━━━━━━━━━━━━━
🚨 Signal Settings
Show BUY / SELL Signals
Shows or hides signal labels.
Signal Cooldown Bars
Default:
0
━━━━━━━━━━━━━━━━━━━━━━
🕒 Time Filter
Trading Session
• All Sessions
• London
• New York
• London + New York
• Custom
Custom Session
Default:
08:00–17:00
Custom Session Time Zone
• Exchange
• UTC
• Europe/London
• America/New_York
• Europe/Istanbul
• Asia/Tokyo
━━━━━━━━━━━━━━━━━━━━━━
💪 Signal Strength
Enable Signal Strength Filter
Default:
On
Minimum Signal Strength
Default:
55
Show Strength on Signal
Default:
On
Strength Trend Length
Default:
50
Strength Volume Length
Default:
20
━━━━━━━━━━━━━━━━━━━━━━
📦 Trade Levels
Show Active Trade Levels
Default:
On
Stop Loss Mode
• ATR
• Pivot Level
• Pivot + ATR Buffer
• Signal Candle
ATR Length
Default:
14
Stop Loss ATR Multiplier
Default:
2.0
Pivot ATR Buffer
Default:
0.25
TP1 Risk / Reward
Default:
1.0R
TP2 Risk / Reward
Default:
2.0R
TP3 Risk / Reward
Default:
3.0R
Level Projection Bars
Default:
20
━━━━━━━━━━━━━━━━━━━━━━
🟡 Break-Even
Break-Even Mode
• Off
• After TP1
• After TP2
Default:
After TP1
Break-Even Offset Ticks
Default:
0
━━━━━━━━━━━━━━━━━━━━━━
📊 Statistics Dashboard
Show Statistics Dashboard
Default:
On
Dashboard Position
• Top Right
• Bottom Right
• Top Left
• Bottom Left
━━━━━━━━━━━━━━━━━━━━━━
🎨 Visual Settings
Theme Mode
• Auto
• Dark Mode
• Light Mode
• Phone Mode
Label Size
• Tiny
• Small
• Normal
• Large
• Huge
Phone Mode always uses Tiny.
━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Settings
Enable BUY Alerts
Default:
On
Enable SELL Alerts
Default:
On
Enable Dynamic Alerts
Default:
On
All public input values are hidden from PulseWire’s status line to reduce chart-header clutter.
━━━━━━━━━━━━━━━━━━━━━━
🧠 WHAT MAKES THIS SCRIPT ORIGINAL
━━━━━━━━━━━━━━━━━━━━━━
Pivots, ATR, EMA, volume comparison, session filters, risk/reward levels, Break-Even, alerts, and performance statistics are established technical-analysis concepts.
These concepts are not unique by themselves.
The originality of Pivot Sniper Method lies in the coordinated implementation applied to them:
confirmed high and low pivots
→ same-bar directional-conflict rejection
→ Bullish / Bearish / Both permission
→ session filtering
→ cooldown
→ five-part 0–100 quality model
→ minimum-quality acceptance
→ compact two-line BUY / SELL labels
→ confirmation-close Entry
→ four selectable Stop Loss models
→ ATR structural-stop validation fallback
→ independently adjustable TP1 / TP2 / TP3
→ target-state visual updates
→ TP1- or TP2-based Break-Even
→ Entry-to-BE visual replacement
→ active-trade replacement at current close
→ internal partial-R accounting
→ desktop and Phone dashboards
→ theme-aware colors
→ dashboard-corner selection
→ detailed static and dynamic alerts
Distinctive implementation features include:
• using five quality dimensions inside one pivot-reversal workflow
• separating pivot confirmation from Entry timing
• using the original pivot candle for wick quality
• using the later confirmation candle for candle quality and Entry
• applying session control only to new entries
• supporting four Stop Loss construction methods
• validating structural stops and falling back to ATR when required
• removing the Entry visual after Break-Even replaces it
• tracking replacement exits in R
• showing latest quality components in a compact dashboard
• supporting both individual events and one combined dynamic-alert workflow
The script is not a collection of unrelated indicators.
Every component supports the same objective: evaluating and managing a confirmed pivot-reversal setup under explicit, reviewable rules.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT PRACTICAL NOTES
━━━━━━━━━━━━━━━━━━━━━━
Signal frequency depends on:
• symbol
• timeframe
• data provider
• pivot left and right settings
• Trend Bias
• selected session
• cooldown
• minimum strength
• EMA length
• volume length
• ATR availability
• historical data availability
Higher right-side pivot values increase confirmation delay.
Higher strength thresholds reduce accepted signals.
Session filtering can remove otherwise valid setups.
The strength score is not a probability forecast.
The Trend component is part of the score, not a separate hard trend filter.
The script replaces an active tracked trade when a new eligible signal appears.
The script does not retain completed trade lines historically.
Dashboard statistics use loaded chart history only.
Different exchanges, brokers, and data feeds can produce different:
• highs
• lows
• closes
• pivots
• wick measurements
• volume values
• ATR values
• EMA values
• signals
• stop levels
• target levels
• replacement exits
• historical statistics
Changing available history can change the first eligible setup and later active-trade sequencing.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ LIMITATIONS AND SHORTCOMINGS
━━━━━━━━━━━━━━━━━━━━━━
This script has important limitations.
It does not guarantee profitable trades.
It does not predict future price movement with certainty.
It does not execute orders.
It does not place broker Stop Loss orders.
It does not place broker Take Profit orders.
It does not calculate position size.
It does not calculate account risk.
It does not include spread.
It does not include commission.
It does not include slippage.
It does not include latency.
It does not include swap or financing.
It does not include taxes.
It does not model partial fills.
It does not model order rejection.
It does not model contract specifications.
It does not model tick-by-tick execution.
It uses historical OHLC bars.
It cannot always determine whether Stop or target occurred first inside one candle.
It resolves same-candle ambiguity in favor of the active Stop.
It begins trade-management checks on the candle after Entry.
It requires right-side pivot confirmation.
It cannot identify a confirmed pivot on the original pivot candle.
It can react with delay when larger right-side values are used.
It rejects simultaneous high and low pivot confirmation.
It can reject setups through bias, session, strength, or cooldown rules.
It replaces an active tracked trade when a new eligible signal appears.
A replacement exit can close a trade before its mapped Stop or TP3.
Its Signal Strength is an internal score, not a probability.
Its volume component depends on available volume data.
Its dashboard is not Strategy Tester.
Its statistics are not audited.
Its Win Rate excludes exact 0R Break-Even results.
A positive Break-Even offset can classify a BE hit as positive R.
Its target hit rates use total trades started.
Its statistics depend on loaded chart history.
Changing settings recalculates historical behavior.
Alerts depend on PulseWire and user configuration.
Alerts do not guarantee broker execution.
━━━━━━━━━━━━━━━━━━━━━━
👤 WHO THIS SCRIPT MAY BE USEFUL FOR
━━━━━━━━━━━━━━━━━━━━━━
This script may be useful for traders who:
• understand pivot confirmation
• want BUY and SELL signals based on confirmed price pivots
• prefer a quality score instead of equal treatment for every pivot
• want separate Bullish and Bearish direction controls
• want London, New York, or Custom session filtering
• want selectable ATR or structural stops
• want independently adjustable R targets
• want TP1- or TP2-based Break-Even
• want active trade levels on the chart
• want compact tooltips
• want loaded-history R statistics
• want a compact desktop dashboard
• want a reduced Phone Mode
• want detailed PulseWire alerts
• understand that historical chart results are not verified execution
It may be less suitable for users who:
• want signals on the original unconfirmed pivot candle
• want no pivot delay
• want tick-level backtesting
• want multiple simultaneous tracked trades
• want new signals ignored while a trade is active
• want historical completed-trade lines preserved
• want automatic broker execution
• want position sizing
• want commission and slippage modeling
• want guaranteed reversal signals
• interpret Signal Strength as win probability
• expect historical Win Rate to continue unchanged
━━━━━━━━━━━━━━━━━━━━━━
🧭 BEST-PRACTICE SUGGESTIONS
━━━━━━━━━━━━━━━━━━━━━━
For studying pivot sensitivity:
• begin with equal high and low pivot settings
• compare smaller and larger left / right values
• remember that right-side values directly affect delay
For studying raw signal behavior:
• use Both Trend Bias
• use All Sessions
• use a moderate minimum strength
• review every accepted BUY and SELL
For directional study:
• use Bullish or Bearish
• compare results separately
• do not assume one direction will remain superior
For session-based review:
• compare All Sessions with London or New York
• use the exchange’s actual liquidity characteristics
• remember that active trades remain managed outside the session
For Signal Strength:
• begin with 55
• compare frequency at 45, 55, and 65
• review the five components
• do not interpret the percentage as guaranteed probability
For risk mapping:
• begin with ATR 14 and 2.0 multiplier
• compare ATR with Pivot Level
• compare Pivot Level with Pivot + ATR Buffer
• maintain logical TP1 < TP2 < TP3 values
For Break-Even:
• compare Off with After TP1
• test After TP2 for wider trade development
• keep the tick offset realistic for the instrument
For chart clarity:
• use Auto for general use
• use Dark or Light when manual control is preferred
• use Phone Mode on smaller screens
• move the dashboard away from important price action
• adjust label size according to chart density
Always:
• wait for confirmed signals
• review broader market structure
• review liquidity and volatility
• review news risk
• define personal account risk
• calculate position size independently
• test the exact symbol, timeframe, and data feed
• inspect failed trades as well as successful trades
• recreate alerts after important configuration changes
━━━━━━━━━━━━━━━━━━━━━━
🔓 PUBLICATION NOTE
━━━━━━━━━━━━━━━━━━━━━━
Pivot Sniper Method is published as an educational pivot-confirmation, signal-quality, session-filtering, risk-mapping, Break-Even, statistics, and alert tool.
The purpose of this description is to explain:
• how pivots are confirmed
• why signals appear after the original pivot
• how BUY and SELL candidates are formed
• how simultaneous pivot conflicts are rejected
• how Trend Bias affects eligibility
• how session filtering affects new entries
• how cooldown affects frequency
• how the five Signal Strength components work
• why Signal Strength is not a probability
• how Entry is defined
• how each Stop Loss Mode works
• how invalid structural stops fall back to ATR
• how TP1, TP2, and TP3 are calculated
• how Break-Even activates
• why Entry disappears after BE becomes active
• how same-candle Stop / target ambiguity is handled
• how active trades are replaced by new eligible signals
• how internal R statistics are calculated
• what the dashboard displays
• how Phone Mode differs
• what alerts include
• what the script does not simulate
• why historical results can change
The script is designed to support structured review.
It does not promise profitable results.
It does not remove market risk.
It does not replace independent analysis.
It does not replace personal risk management.
━━━━━━━━━━━━━━━━━━━━━━
🕒 REPAINTING, BACKPLOTTING, AND TIMING DISCLOSURE
━━━━━━━━━━━━━━━━━━━━━━
Pivot Sniper Method uses confirmed price pivots.
Pivot confirmation requires future candles relative to the original pivot location.
The number of required right-side candles is controlled independently for pivot highs and pivot lows.
The script does not know that a pivot exists on the original pivot candle.
After the required right-side candles complete:
• the pivot becomes confirmed
• the candidate is evaluated
• Signal Strength is calculated
• filters are applied
• the BUY or SELL label can appear on the confirmation candle
• the tracked Entry can open at the confirmation-candle close
The BUY or SELL trade label is not plotted back on the original pivot candle.
The Entry is not backdated.
Signals require confirmed chart bars.
This reduces unfinished current-bar variation.
It does not remove:
• pivot confirmation delay
• differences between historical OHLC and tick sequence
• data-feed differences
• changes caused by settings
• changes caused by loaded history
• market risk
Historical results can change when:
• pivot settings change
• Trend Bias changes
• session settings change
• cooldown changes
• strength settings change
• ATR settings change
• Stop Loss Mode changes
• target settings change
• Break-Even settings change
• symbol changes
• timeframe changes
• exchange or broker feed changes
• available chart history changes
Users should interpret the original pivot price as historical structure and the later BUY / SELL candle as the actual confirmed signal timing.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━
Pivot Sniper Method is provided for educational and informational purposes only.
It does not constitute financial, investment, trading, legal, accounting, or tax advice.
No indicator can guarantee future results.
Markets are uncertain.
Price structure changes.
Volatility changes.
Liquidity changes.
Volume behavior changes.
Session behavior changes.
Historical chart behavior does not ensure future performance.
Every user is responsible for their own:
• analysis
• validation
• symbol selection
• timeframe selection
• pivot settings
• directional bias
• session selection
• quality threshold
• Stop Loss selection
• target planning
• Break-Even selection
• position sizing
• risk management
• alert configuration
• trading decisions
• broker execution
• legal obligations
• tax obligations
The pivots, BUY labels, SELL labels, Signal Strength values, Entry levels, Stop Loss levels, Break-Even levels, TP1 levels, TP2 levels, TP3 levels, active lines, labels, tooltips, dashboard values, Win Rate, NET R, Average R, target hit rates, and alerts are visual analysis tools only.
A confirmed pivot is not a guaranteed reversal.
A high Signal Strength value is not a guaranteed winning trade.
A TP label is not proof of an actual broker fill.
A Stop Loss event is not proof of an actual broker fill.
The dashboard is not verified account performance.
The statistics are not audited.
The script does not include spread, commission, slippage, latency, financing, taxes, partial fills, order rejection, position sizing, account equity, or broker-specific execution.
Use the script as a structured pivot-reversal review, trade-mapping, and monitoring framework—not as a promise of profitability or a substitute for independent judgment.
Indicator

Indicator

Market Structure BOS, CHoCH, HH HL LH LL & Trend Health [LunqFX]Market structure is the skeleton of every trend: a series of higher highs and higher lows, or lower highs and lower lows, until a break says the trend has changed. This indicator maps that skeleton automatically — labelling every swing as HH, HL, LH or LL, drawing each Break of Structure (BOS) and Change of Character (CHoCH) — and adds one thing no other structure tool has: it tells you the trend is failing BEFORE the structure actually breaks.
❶ THE STRUCTURE MAP
▸ SWING LABELS — every confirmed swing point is labelled HH (higher high), HL (higher low), LH (lower high) or LL (lower low). The sequence of those four labels IS the trend, and having it on the chart removes the guesswork from reading price action.
▸ BOS — Break of Structure. Price closes through the last swing level in the direction of the trend: the trend is continuing. Drawn as a dashed line from the broken level with a BOS label.
▸ CHoCH — Change of Character. Price closes through the last swing level against the trend: the trend has flipped. Drawn as a solid, highlighted line — this is the reversal signal smart-money traders wait for.
▸ STRUCTURE CANDLES — the candles themselves are coloured by the structural trend, not by whether each bar closed up or down. Green means the market structure is bullish, violet means bearish, so the regime is obvious at a single glance. Their brightness fades as Trend Health falls.
❷ TREND HEALTH 0–100 — THE EARLY WARNING
Every other structure tool tells you a trend has ended after CHoCH prints. By then the move is already gone. Trend Health measures the two things that decay before every structure break:
▸ EXPANSION — in a healthy trend each new extreme clears the previous one by at least as much as the last leg did. When new highs barely exceed the old ones, the trend is running out of fuel.
▸ RETRACEMENT — in a healthy trend pullbacks stay shallow. When each pullback eats deeper into the previous leg, control is shifting to the other side.
Both are measured on the live leg, normalised by ATR so the score behaves the same on any symbol and timeframe, and blended into a single 0–100 reading. When it drops below your threshold the dashboard flags WEAKENING — while the trend is still technically intact. That is the warning CHoCH cannot give you, because CHoCH is confirmation, not anticipation.
❸ THE STRUCTURE TAPE
Instead of a table of numbers, the dashboard shows a timeline of the last five structure events, oldest to newest: BOS ▲ · BOS ▲ · CHoCH ▼ · BOS ▼. Reading the sequence tells you instantly whether the market is trending cleanly (a run of BOS in one direction) or chopping (CHoCH flipping back and forth) — context you cannot get from a single label on the chart.
❹ HOW TO TRADE IT
1 — Establish the bias from MARKET STRUCTURE in the panel. Bullish structure = look for longs, bearish = look for shorts. Do not fight it.
2 — Use BOS as continuation. A BOS in the direction of your bias confirms the trend is intact; the broken level often becomes support or resistance on the retest.
3 — Use CHoCH as the reversal trigger. A CHoCH against the prevailing trend is the earliest confirmed signal that structure has flipped. Wait for it before trading a reversal.
4 — Use TREND HEALTH for timing and risk. Health above 65 with a run of BOS on the tape = a clean trend, hold your position and trail. Health falling into WEAKENING = tighten stops, take partials, and stop adding — the structure is decaying and a CHoCH becomes more likely.
5 — Read the tape for market state. Several BOS in a row = trending market, trade continuations. Alternating CHoCH = choppy market, stand aside or trade the range instead.
❺ HOW IT WORKS
Swing points come from confirmed pivots, so a swing only exists once the bars on both sides of it have closed. The most recent swing high and swing low become the active structure levels. When a bar CLOSES beyond one of them (a wick-based mode is available), the break is registered: in the direction of the current trend it is a BOS, against it a CHoCH, and the trend state flips. Trend Health compares the size of the current expansion leg with the previous one in ATR units, and the depth of the latest pullback against the leg it retraced, then blends them 60/40 into the 0–100 score. Immediately after a CHoCH there is no second leg to compare yet, so the panel honestly reports NEW TREND instead of a misleading health reading.
Works on every symbol and timeframe — forex, gold, indices, crypto and stocks — because every threshold is either structural or ATR-normalised, with nothing to configure per market.
SETTINGS — swing length (how major a swing must be), break on close or wick, the health threshold that flags weakening, swing labels and BOS/CHoCH lines on/off, number of events kept, structure candles on/off, and dashboard position.
ALERTS — BOS up, BOS down, CHoCH up, CHoCH down, and Structure Weakening (the early warning).
NON-REPAINTING — swings are built from confirmed pivots and every break is validated on bar close. A label or line that has printed never moves or disappears.
Every component here describes the same object — the market's structure — at a different resolution: the swings build it, BOS and CHoCH break it, Trend Health measures its condition, and the tape is its history. That is why they belong in one tool rather than five.
This indicator is an educational market-analysis tool, not financial advice. Trend Health describes the current structure's condition and does not predict future prices. Always confirm with your own analysis and manage your risk.
Pre-publish checklist Indicator

Aquile Reali Days and WeeksAquile Reali — Days and Weeks
A clean, non-intrusive tool that plots the key reference levels of the current and previous day and week directly on the chart, without cluttering price action.
What it shows:
Previous Day High / Low (PDH / PDL) and Previous Week High / Low (PWH / PWL) — the levels institutional order flow reacts to most often, drawn as solid lines with price labels.
Current Day and Week High / Low (DH / DL, WH / WL) — updated live as the session develops, shown as dotted lines so they never compete visually with the previous levels.
Vertical session dividers marking the open and close of each day and week, with the date printed on the line.
How it stays readable:
Every label is offset to the right of the last bar and staggered by category, so previous-day, current-day, previous-week and current-week labels never overlap — even when their prices coincide. Line width, style and color are fully configurable for each element.
Day and week boundaries are defined on a fixed timezone, keeping session opens consistent regardless of the chart's local setting.
Who it's for:
Intraday and swing traders working with market structure and liquidity. PDH/PDL and PWH/PWL act as natural liquidity pools and reaction zones; having them mapped automatically — alongside the levels still forming in the current session — keeps the top-down read fast and the chart uncluttered.
🦅 Aquile Reali nate per volare, nate per osare.
🦅 Be Stable. Be Strong. Indicator

Recursive Kernel Trend [QuantAlgo]🟢 Overview
The Recursive Kernel Trend is a trend-following indicator built on a recursive residual estimator with adaptive rate scheduling. It applies one of six selectable filter structures to a residual-corrected recursion, modulates the update rate according to efficiency and volatility conditions, and confirms directional state through slope persistence. The result is a responsive yet controlled trend line that adapts its tracking behavior to market regime while filtering noise-driven fluctuations across every timeframe and instrument.
🟢 How It Works
The calculation begins with a residual between the selected price source and the current estimate. This residual drives a base recursive update whose rate is not fixed but scheduled on every bar:
resid = src - estimate
base = estimate + kern_rate * resid
The scheduled rate is produced by combining two adaptive weights. Efficiency weighting measures the ratio of net directional progress to total price path over a lookback window, raising the rate when movement is clean and lowering it during chop. Volatility weighting compares current ATR against a longer baseline and reduces the rate when volatility expands. The combined rate is then bounded by floor and ceiling limits and further scaled by an optional directional bias that applies different multipliers depending on whether price sits above or below the estimate:
eff_weight = eff_floor + (1.0 - eff_floor) * eff_ratio
vol_weight = math.min(math.max(1.0 / vol_ratio, 0.50), 1.75)
rate_sched = math.min(math.max(base_rate * eff_weight * vol_weight, rate_floor), rate_ceil)
kern_rate = rate_sched * bias
Six filter structures can be applied to the base update. Standard uses a single pass. Wilder halves the rate for smoother behavior. Double and Triple apply successive lag-compensated stages. Gaussian cascades four poles without compensation. Hull combines fast and slow passes then re-smooths the result. All structures receive the live scheduled rate so the adaptive weighting remains active.
A residual accumulator runs in parallel with the recursion. It retains a decaying memory of past residuals and applies a correction term that closes persistent offset during sustained trends. An optional ATR-based limiter can bound the accumulator to prevent overshoot after gaps or parabolic moves:
corr_acc := corr_acc * corr_decay + resid
estimate := kern_out + corr_weight * corr_acc
Directional state is derived from the slope of the finished estimate after a short smoothing window. A consecutive run of bars in the same slope direction must reach a confirmation threshold before the state is allowed to flip. This step prevents single-bar noise from reversing the trend color or firing alerts.
🟢 Signal Interpretation
▶ Bullish Trend (Long/Buy): When the smoothed slope of the estimate remains positive for the required number of confirmation bars, the indicator enters bullish state. The trend line and gradient layers switch to the bullish color. This condition identifies potential long or buy opportunities and remains active until an equal run of negative slope bars confirms a reversal.
▶ Bearish Trend (Short/Sell): When the smoothed slope remains negative for the required confirmation bars, the indicator enters bearish state. The visual elements switch to the bearish color. This condition identifies potential short or sell opportunities and holds until a confirmed positive run occurs.
🟢 Features
▶ Preconfigured Presets: Three parameter sets cover different trading approaches. Default targets swing trading on 1H to daily charts with balanced rate and confirmation. Fast Response raises the recursion rate and shortens confirmation for intraday charts where the indicator needs to adapt to shorter-duration moves. Smooth Trend lowers the rate and lengthens confirmation for position trading on daily and weekly timeframes, where the cost of a false flip is higher than the cost of a delayed one. Selecting a preset overrides the individual rate, efficiency, and state detection inputs.
▶ Built-in Alerts: Three alert conditions are provided. Bullish State Signal fires when the trend state flips from bearish to bullish. Bearish State Signal fires on the opposite transition. Any State Change combines both into a single notification.
▶ Visual Customization: Six color presets (Classic, Aqua, Cosmic, Cyber, Neon, Custom) coordinate the trend line and gradient layers. Optional bar coloring tints candles with the active state color at a configurable transparency.
*Tips: Layer the Recursive Kernel Trend with complementary analysis rather than treating it as a standalone trading tool. State flips hold most reliably when backed by participation, so combine each change with volume context, since a flip on expanding volume is far more likely to sustain than one on thin flow, and read the move against market structure, as a reversal that aligns with a clear swing high or low carries more significance than one in open space. Pairing this script with volume, open interest, CVD, market structure, and mean reversion indicators from our QuantAlgo toolkit can further validate a directional shift before entry. Indicator

Previous Day High Low Key Levels, Reach Stats & Alerts [LunqFX]The previous day high and previous day low — PDH and PDL — are the first two levels most intraday traders mark on the chart, together with the previous week high and low. They are not hand-drawn support and resistance: they are objective facts of what the market did, which is exactly why price keeps reacting to them. This indicator plots those key levels automatically on any symbol and any timeframe, shades the previous day's range, tracks which levels are still untested, and answers the question no other levels tool answers — how often price actually reaches them on the instrument you are trading.
❶ THE LEVELS IT PLOTS
Every level is taken straight from the instrument's own higher-timeframe candles, so nothing needs configuring and it works the same on forex, gold, indices, crypto and stocks.
PDH and PDL — previous day high and low. The core intraday support and resistance levels.
PWH and PWL — previous week high and low. Higher-timeframe context for swing trading.
PMH and PML — previous month high and low, optional, for the bigger picture.
Each level is labelled with its name and exact price, and each timeframe gets its own label column on the right, so levels sitting at almost the same price never overlap.
❷ UNTESTED vs TESTED — WHICH LEVEL STILL MATTERS
This is the difference between a level that will move price and one that already has.
UNTESTED — price has not returned to it in the current period. It is drawn bright, solid and glowing. Untested levels are the strongest magnets, because the orders resting there have not been filled yet.
TESTED ✕ — price has already traded through it. The line turns dashed and dim, and the label gets a ✕. Its pull is spent, so you stop treating it as a fresh level.
The dashboard also names the NEAREST MAGNET: the closest untested level above or below price, which is the most likely place price travels to next.
❸ REACH STATS — WHAT MAKES THIS DIFFERENT
Most key-level indicators simply draw lines and stop there. This one measures how your symbol actually behaves, over the last 100 completed days:
PDH reached — the share of days on which price traded all the way up to the previous day's high.
PDL reached — the same for the previous day's low.
Break rate — of the days that did reach the level, how often price closed through it instead of rejecting from it.
That turns a line into a decision. If the previous day high is reached on 68% of days but broken on only 27% of them, a rejection is far more likely than a breakout — so you plan a fade, not a chase. On another symbol the numbers flip, and so does the plan.
❹ HOW TO TRADE IT
1 — Read the DAY RANGE state. INSIDE RANGE means balance and rotation: fade the edges back toward the middle. EXPANSION means price has left yesterday's range and the day is trending: trade continuation, not reversals.
2 — Pick the target. The NEAREST MAGNET is the closest untested level — use it as the objective for a trade you are already in.
3 — Check the stats before you commit. High reach rate with a low break rate favours fading the level; a high break rate favours trading the breakout through it.
4 — Trade the reaction. Wait for price to arrive at an untested PDH, PDL, PWH or PWL, then enter on the rejection or on the break, using the level itself as your invalidation.
5 — Look for confluence. Weekly and monthly levels outrank daily ones, and when a daily level sits right on top of a weekly level, that is the strongest zone on the chart.
❺ HOW IT WORKS
Each level is read from the previous completed higher-timeframe candle, using the offset pattern that keeps higher-timeframe data fixed, so a level never changes after it is drawn. A level is flagged tested the moment price trades through it, and resets when the new period begins. The reach statistics are calculated only from completed daily candles: the share of days whose high reached the prior day's high, whose low reached the prior day's low, and — as a conditional rate — how many of those days closed beyond the level. Nothing repaints and nothing looks into the future.
SETTINGS — turn day, week and month levels on or off, hide tested levels, shade the previous day and week range with adjustable transparency, control level width, right extension and line thickness per timeframe, switch the custom candles off, and place the dashboard strip where you want it.
ALERTS — previous day high reached, previous day low reached. Both fire on closed bars only.
This indicator is an educational market-analysis tool, not financial advice. The reach statistics describe past behaviour on the current symbol and do not guarantee future results. Always confirm with your own analysis and manage your risk.
Indicator

RSI Divergence Entry Engine [trade_w_samet]🎯 RSI Divergence Entry Engine
RSI Divergence Entry Engine is a pivot-confirmed RSI divergence, optional trend-filtering, ATR-based trade-mapping, historical visualization, alert, and statistics indicator designed to help traders study how regular bullish and bearish RSI divergences can be converted into a structured chart workflow.
The script is built around one central idea:
A confirmed RSI divergence should be treated as analytical context first, and as a tracked trade setup only when the active direction filter and trade-state rules allow it.
The engine identifies regular RSI divergence between confirmed RSI pivots and corresponding price pivots.
When a divergence is confirmed, the script can:
• Display the divergence inside the RSI panel
• Fill the region between the RSI path and its divergence reference line
• Draw a three-layer neon divergence line directly between the corresponding price pivots on the main chart
• Evaluate the active trend-filter mode
• Open one tracked bullish or bearish setup when the signal is eligible
• Calculate an ATR-based Stop Loss
• Calculate TP1, TP2, and TP3
• Extend risk/reward boxes while the trade remains active
• Preserve completed trade boxes and historical TP price labels
• Track TP3 wins, Stop Losses, Win Rate, NET R, Average R, and Profit Factor
• Display a full desktop dashboard or a compact mobile dashboard
• Send separate PulseWire alert conditions
• Support one combined “Any alert() function call” workflow
• Apply Dark Mode, Light Mode, or Mobile Theme styling
The indicator includes:
• Fixed RSI 14 calculation using closing prices
• Pivot-based regular bullish divergence detection
• Pivot-based regular bearish divergence detection
• Adjustable Pivot Lookback
• Adjustable Confirmation Bars
• A fixed internal pivot-distance window
• Confirmed-bar divergence acceptance
• RSI-panel bullish and bearish divergence lines
• RSI-panel divergence-area fills
• Main-chart three-layer neon divergence lines
• Adjustable main-chart BULLISH / SELL label size
• Fixed compact RSI-panel labels
• Dark Mode
• Light Mode
• Mobile Theme
• EMA 200 Trend Filter
• Supertrend filter using ATR 10 and factor 3.0
• Higher-timeframe EMA 200 Trend Filter
• Adjustable higher timeframe
• ATR-based Stop Loss
• Adjustable ATR period
• Adjustable ATR Stop Loss multiplier
• Adjustable TP3 target from 1R to 7R
• Automatically calculated TP1 and TP2
• One active tracked trade at a time
• Conservative same-candle TP3 / SL handling
• Permanent historical TP / SL boxes
• Historical TP1, TP2, and TP3 price labels
• Dynamic active-trade price labels
• TP3 TARGET HIT labels
• Stop Loss result labels
• Full desktop statistics dashboard
• Two-row Mobile Theme dashboard
• Static alertcondition() support
• Dynamic alert() support
• “Any alert() function call” compatibility
• Bold-italic visual text
• Pure-white Dark Mode label text
• Hidden status-line input values
• Main-chart overlay visuals from a separate RSI pane
• Loaded-history trade statistics
The purpose of the script is to provide a transparent visual framework for reviewing confirmed RSI divergence, directional context, mapped risk, target structure, and bar-based historical outcomes.
It is not financial advice.
It is not an automated trading system.
It does not execute broker orders.
It does not calculate position size.
It does not guarantee that a divergence will produce a reversal.
It does not guarantee that the displayed Win Rate, NET R, or Profit Factor will continue in future market conditions.
It does not include spread, commission, slippage, latency, financing, or partial fills.
It does not reproduce the exact intrabar path inside historical candles.
━━━━━━━━━━━━━━━━━━━━━━
📌 OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━
At a high level, RSI Divergence Entry Engine does the following:
• Calculates RSI using a fixed 14-period length and closing prices.
• Searches the RSI series for confirmed pivot lows and pivot highs.
• Compares each confirmed RSI pivot with the previous eligible pivot of the same type.
• Compares the corresponding price low or high with the prior price pivot.
• Identifies regular bullish divergence when RSI forms a higher low while price forms a lower low.
• Identifies regular bearish divergence when RSI forms a lower high while price forms a higher high.
• Requires the distance between the two confirmed pivots to remain inside the fixed internal range window.
• Waits for the required right-side confirmation bars before accepting a pivot.
• Displays confirmed divergence inside the RSI panel.
• Draws the same confirmed price-pivot relationship on the main chart with a neon line.
• Evaluates the selected trend-filter mode.
• Rejects a tracked entry when the trend filter does not allow that direction.
• Rejects a tracked entry when an opposite divergence is simultaneously present.
• Rejects a tracked entry while another trade is active.
• Opens a tracked trade at the close of the divergence-confirmation candle.
• Calculates Stop Loss distance from ATR.
• Places TP1 and TP2 at proportional distances inside the final TP3 target.
• Tracks only TP3 as the winning exit.
• Tracks Stop Loss as a -1R loss.
• Extends the active profit and loss boxes until the trade closes.
• Preserves completed boxes as historical trade visuals.
• Preserves historical TP1, TP2, and TP3 price labels.
• Updates the dashboard with bar-based historical statistics.
• Provides separate static alerts and combined dynamic alerts.
The script does not use machine-learning prediction.
It does not claim that RSI divergence predicts the future with certainty.
Its dashboard is not PulseWire Strategy Tester.
Its statistics are calculated internally from the script’s own bar-touch rules.
━━━━━━━━━━━━━━━━━━━━━━
🧠 CORE IDEA
━━━━━━━━━━━━━━━━━━━━━━
RSI divergence describes disagreement between price direction and RSI pivot direction.
A regular bullish divergence occurs when:
• price forms a lower low
• RSI forms a higher low
A regular bearish divergence occurs when:
• price forms a higher high
• RSI forms a lower high
The divergence can indicate that momentum is not confirming the newest price extreme.
However, divergence alone does not answer:
• whether the broader trend supports the reversal
• whether price is above or below a long-term directional reference
• whether Supertrend agrees with the signal
• whether the selected higher timeframe agrees with the signal
• where a volatility-adjusted Stop Loss should be mapped
• where intermediate and final targets should be displayed
• whether another tracked trade is already active
• whether historical bar touches reached TP3 or Stop Loss first
• how the signal behaves across Dark, Light, or Mobile layouts
The script therefore combines the divergence calculation with an optional trend filter and a fixed trade-tracking model.
The complete workflow is:
RSI pivot confirmation
→ price-pivot comparison
→ regular divergence confirmation
→ RSI-panel visualization
→ main-chart neon price-divergence line
→ optional trend-filter validation
→ one-active-trade check
→ entry at confirmation-candle close
→ ATR-based Stop Loss
→ TP1 / TP2 / TP3 mapping
→ historical bar-touch tracking
→ TP3 or SL result
→ dashboard statistics
→ static and dynamic alerts
The modules are not intended to operate as unrelated indicators.
Each module supports the same process: identifying a confirmed divergence, deciding whether it is eligible for tracking, mapping the trade structure, and recording the result under explicit rules.
━━━━━━━━━━━━━━━━━━━━━━
🧩 WHY THIS SCRIPT IS NOT A SIMPLE RSI DIVERGENCE MARKER
━━━━━━━━━━━━━━━━━━━━━━
A basic RSI divergence script can stop after drawing a line between two oscillator pivots.
RSI Divergence Entry Engine continues beyond that step.
A confirmed divergence can move through the following stages:
RSI pivot appears
→ right-side confirmation bars complete
→ previous eligible RSI pivot is located
→ pivot distance is validated
→ corresponding price pivots are compared
→ bullish or bearish divergence is confirmed
→ RSI divergence region is displayed
→ main-chart neon price-divergence line is displayed
→ active trend filter is evaluated
→ opposite-direction conflict is rejected
→ existing active-trade state is checked
→ ATR risk distance is calculated
→ entry, SL, TP1, TP2, and TP3 are stored
→ trade boxes extend through time
→ TP3 or SL is detected
→ completed trade is added to statistics
→ historical TP prices remain visible
The RSI module identifies the momentum disagreement.
The trend-filter module defines whether the tracked entry is directionally permitted.
The ATR module adapts the Stop Loss distance to current volatility.
The target module translates the chosen TP3 R multiple into three visual target levels.
The trade-state module prevents overlapping tracked positions.
The statistics module summarizes the outcomes produced by those exact rules.
The alert module communicates divergence, entry, TP3, and Stop Loss events.
This coordinated process makes the publication an entry-engine framework rather than only a divergence drawing tool.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ HOW THE SCRIPT WORKS
━━━━━━━━━━━━━━━━━━━━━━
The indicator operates from a separate RSI pane while using force-overlay visuals for selected elements on the main chart.
The internal RSI configuration is:
• RSI length: 14
• Source: close
• Regular bullish divergence: enabled
• Regular bearish divergence: enabled
• Hidden bullish divergence: internally disabled
• Hidden bearish divergence: internally disabled
• Minimum pivot separation: 5 bars
• Maximum pivot separation: 60 bars
The user controls:
• Pivot Lookback
• Confirmation Bars
• Main-chart signal-label size
• ATR Period
• Stop Loss Distance in ATR
• TP3 Target in R
• Trend Filter
• Higher-Timeframe Trend Timeframe
• Theme Mode
First, the script calculates RSI:
osc = ta.rsi(close, 14)
The script then detects confirmed RSI pivots:
pivotLowValue = ta.pivotlow(osc, lbL, lbR)
pivotHighValue = ta.pivothigh(osc, lbL, lbR)
A pivot is not known on the pivot candle itself.
It becomes confirmed only after the selected Confirmation Bars have closed to its right.
The script then retrieves the previous confirmed pivot value, price value, and pivot bar.
Regular bullish divergence requires:
• current RSI pivot low above the previous RSI pivot low
• current price low below the previous price low
• valid pivot distance
• confirmed current chart bar
Regular bearish divergence requires:
• current RSI pivot high below the previous RSI pivot high
• current price high above the previous price high
• valid pivot distance
• confirmed current chart bar
The confirmed divergence is then displayed in two places:
• RSI pane
• Main price chart
The trend filter is applied only to the tracked trade entry.
This means a confirmed divergence can remain visible even when:
• the selected trend filter rejects the direction
• another trade is already active
• bullish and bearish conditions conflict on the same calculation
This separation is intentional.
The divergence visual represents analytical context.
The main-chart BULLISH or SELL trade label represents an entry that the tracking engine actually accepted.
━━━━━━━━━━━━━━━━━━━━━━
📉 RSI CALCULATION
━━━━━━━━━━━━━━━━━━━━━━
The Relative Strength Index is calculated from closing prices using a fixed length of 14.
The RSI line is displayed in blue.
The RSI pane includes:
• 70 Overbought line
• 50 Middle line
• 30 Oversold line
Dark Mode uses:
• black RSI-panel background
• red Overbought line
• white dotted Middle line
• green Oversold line
Light Mode uses:
• white RSI-panel background
• dark Middle line
• red Overbought line
• green Oversold line
The 70 and 30 lines provide visual context.
They are not mandatory divergence conditions.
A bullish divergence can be detected outside the Oversold region.
A bearish divergence can be detected outside the Overbought region.
The script does not require RSI to cross 30 or 70 before accepting a divergence.
━━━━━━━━━━━━━━━━━━━━━━
🔍 PIVOT DETECTION MODEL
━━━━━━━━━━━━━━━━━━━━━━
Pivot Lookback controls the number of candles examined on the left side of a potential RSI pivot.
The default value is 5.
Higher values generally produce larger and less frequent swing points.
Lower values generally produce smaller and more frequent swing points.
Confirmation Bars controls the number of completed candles required on the right side of the potential pivot.
The default value is 1.
A higher Confirmation Bars value provides more right-side confirmation but increases delay.
A lower value confirms earlier but can identify smaller structures.
The script also requires the previous pivot to be between 5 and 60 bars away.
These minimum and maximum distance values are fixed internally to keep the public settings panel compact.
The pivot model is symmetrical:
• pivot lows are used for bullish divergence
• pivot highs are used for bearish divergence
━━━━━━━━━━━━━━━━━━━━━━
🟢 REGULAR BULLISH DIVERGENCE
━━━━━━━━━━━━━━━━━━━━━━
A regular bullish divergence is confirmed when:
• a new RSI pivot low is confirmed
• the previous eligible RSI pivot low exists
• the current RSI pivot low is higher than the previous RSI pivot low
• the current corresponding price low is lower than the previous price low
• the pivot distance is between the fixed internal limits
• the current calculation bar is confirmed
Conceptually:
Price:
lower low
RSI:
higher low
The RSI pane displays:
• a green divergence line between the two RSI pivot values
• a translucent green fill between the real RSI path and the straight divergence reference
• a BULLISH label at the confirmed pivot location
The main chart displays:
• a three-layer green neon line between the corresponding price lows
A tracked bullish trade opens only when:
• the bullish divergence is not opposed by a bearish divergence on the same calculation
• the selected trend filter allows bullish entries
• no tracked trade is currently active
• another trade did not close on the same candle
• ATR is available and greater than zero
The tracked entry price is the close of the confirmation candle.
It is not the historical pivot-low price.
━━━━━━━━━━━━━━━━━━━━━━
🔴 REGULAR BEARISH DIVERGENCE
━━━━━━━━━━━━━━━━━━━━━━
A regular bearish divergence is confirmed when:
• a new RSI pivot high is confirmed
• the previous eligible RSI pivot high exists
• the current RSI pivot high is lower than the previous RSI pivot high
• the current corresponding price high is higher than the previous price high
• the pivot distance is between the fixed internal limits
• the current calculation bar is confirmed
Conceptually:
Price:
higher high
RSI:
lower high
The RSI pane displays:
• a red divergence line between the two RSI pivot values
• a translucent red fill between the real RSI path and the straight divergence reference
• a SELL label at the confirmed pivot location
The main chart displays:
• a three-layer red neon line between the corresponding price highs
A tracked bearish trade opens only when:
• the bearish divergence is not opposed by a bullish divergence on the same calculation
• the selected trend filter allows bearish entries
• no tracked trade is currently active
• another trade did not close on the same candle
• ATR is available and greater than zero
The tracked entry price is the close of the confirmation candle.
It is not the historical pivot-high price.
━━━━━━━━━━━━━━━━━━━━━━
⏳ PIVOT CONFIRMATION AND SIGNAL TIMING
━━━━━━━━━━━━━━━━━━━━━━
This section is important.
The script uses ta.pivotlow() and ta.pivothigh().
Pivot functions require candles to the right of the pivot before confirmation.
For example, when Confirmation Bars is 1:
• the potential pivot occurs
• one additional candle closes
• the pivot becomes confirmed
• the divergence condition can then be calculated
The RSI-panel divergence line and RSI divergence label are drawn at the original pivot-bar location after confirmation.
The main-chart neon divergence line also connects the original price-pivot bars after the divergence is confirmed.
This creates a historical visual relationship between the two pivots.
It does not mean the divergence was available in realtime on the original pivot candle.
The tracked trade entry is not placed back on the pivot.
The tracked entry occurs at the close of the later candle where the divergence confirmation becomes available.
Therefore, users must distinguish between:
Pivot Visualization
Shows where the confirmed historical pivots occurred.
Trade Entry Label
Shows the candle where the script actually accepted and opened the tracked setup.
Changing Confirmation Bars changes the confirmation delay.
Increasing Confirmation Bars can materially change signal timing and historical divergence output.
━━━━━━━━━━━━━━━━━━━━━━
✨ MAIN-CHART NEON DIVERGENCE VISUALS
━━━━━━━━━━━━━━━━━━━━━━
Confirmed RSI divergences are also displayed directly on the main price chart.
Bullish divergence:
• connects the two corresponding price lows
• uses green
• uses a three-layer neon appearance
Bearish divergence:
• connects the two corresponding price highs
• uses red
• uses a three-layer neon appearance
The neon effect is created from:
• a wide transparent outer glow
• a medium inner glow
• a bright two-pixel core line
The neon line is a historical divergence visual.
It is not an entry line.
It is not a Stop Loss.
It is not a support or resistance guarantee.
The line is created only after the RSI pivot and divergence have been confirmed.
Older line objects are removed when the configured internal object limit is exceeded.
Deleting an older visual object does not change the underlying signal calculation.
━━━━━━━━━━━━━━━━━━━━━━
🎨 RSI DIVERGENCE AREA SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
Inside the RSI pane, the script creates a filled polygon between:
• the actual RSI path from the first pivot to the second pivot
• the straight divergence line connecting those pivot endpoints
Bullish divergence uses a translucent green fill.
Bearish divergence uses a translucent red fill.
The purpose is to make the momentum disagreement easier to recognize than a thin line alone.
The fill does not measure probability.
A larger visual area does not automatically mean a stronger or more profitable divergence.
The fill depends on:
• RSI movement between the pivots
• distance between the pivots
• selected Pivot Lookback
• selected Confirmation Bars
• chart symbol
• timeframe
• loaded historical data
━━━━━━━━━━━━━━━━━━━━━━
🧭 TREND FILTER SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The trend filter determines whether a confirmed divergence is eligible to open a tracked trade.
Available modes are:
• Off
• EMA Trend
• Supertrend
• HTF Trend
The filter does not hide the confirmed divergence visuals.
It only changes whether the trade engine accepts the bullish or bearish entry.
This allows users to study:
• all confirmed divergence structures
• only the subset that passed the selected directional filter
The active trend reference is drawn on the main chart when a filter mode is selected.
The reference is green when the active filter state is bullish.
The reference is red when the active filter state is bearish.
━━━━━━━━━━━━━━━━━━━━━━
📈 EMA TREND FILTER
━━━━━━━━━━━━━━━━━━━━━━
EMA Trend uses a fixed chart-timeframe EMA 200.
Bullish entries are allowed when:
• chart close is above EMA 200
Bearish entries are allowed when:
• chart close is below EMA 200
When price equals the EMA exactly, neither directional condition is satisfied.
The EMA filter is intended to align bullish divergence tracking with price above a long-term average and bearish divergence tracking with price below it.
It does not guarantee that price will continue in the filtered direction.
A divergence rejected by the EMA filter can still remain visible as a divergence visual.
━━━━━━━━━━━━━━━━━━━━━━
📊 SUPERTREND FILTER
━━━━━━━━━━━━━━━━━━━━━━
Supertrend mode uses fixed internal parameters:
• ATR length: 10
• factor: 3.0
Bullish entries are allowed when the Supertrend state is bullish.
Bearish entries are allowed when the Supertrend state is bearish.
The Supertrend reference is displayed on the main chart.
The fixed parameters keep the public settings menu simple and make behavior consistent across users.
The Supertrend filter can react differently across symbols and timeframes because ATR and price structure differ.
A bullish Supertrend state does not guarantee a successful bullish divergence trade.
A bearish Supertrend state does not guarantee a successful bearish divergence trade.
━━━━━━━━━━━━━━━━━━━━━━
⏱️ HIGHER-TIMEFRAME TREND FILTER
━━━━━━━━━━━━━━━━━━━━━━
HTF Trend compares the selected higher-timeframe close with its EMA 200.
Bullish entries are allowed when:
• higher-timeframe close is above higher-timeframe EMA 200
Bearish entries are allowed when:
• higher-timeframe close is below higher-timeframe EMA 200
The default higher timeframe is 240 minutes.
The request uses:
• gaps_off
• lookahead_off
The script does not intentionally request future higher-timeframe data.
However, the currently forming higher-timeframe candle can continue changing until that higher-timeframe candle closes.
This means the realtime HTF filter state can change while the active higher-timeframe candle is still developing.
Users who require fully closed higher-timeframe confirmation should account for this timing characteristic when interpreting realtime signals.
Changing the HTF Trend Timeframe recalculates historical eligibility.
━━━━━━━━━━━━━━━━━━━━━━
🎯 ENTRY MODEL
━━━━━━━━━━━━━━━━━━━━━━
The indicator uses the close of the divergence-confirmation candle as the tracked entry reference.
A bullish trade is opened when:
• valid bullish divergence is confirmed
• no bearish divergence conflict exists
• bullish trend permission is true
• no trade is active
• no trade closed on the same candle
• ATR is valid
A bearish trade uses the mirrored conditions.
The entry is stored at close.
The script then calculates:
• ATR-based risk distance
• Stop Loss
• TP1
• TP2
• TP3
Only signals that actually open a tracked trade receive the main-chart BULLISH or SELL entry label.
A divergence visual without an entry label can therefore indicate:
• trend-filter rejection
• existing active trade
• same-candle direction conflict
• same-candle previous trade closure
• unavailable ATR
━━━━━━━━━━━━━━━━━━━━━━
🛑 ATR STOP LOSS MODEL
━━━━━━━━━━━━━━━━━━━━━━
Risk distance is calculated as:
ATR × Stop Loss Distance.
Default settings:
• ATR Period: 14
• Stop Loss Distance: 2.0 ATR
Bullish trade:
Stop Loss = entry − risk distance
Bearish trade:
Stop Loss = entry + risk distance
ATR adapts the raw price distance to current market volatility.
The script does not examine:
• market structure below the bullish signal
• market structure above the bearish signal
• spread
• instrument tick value
• account size
• position size
• broker margin
• contract specifications
The ATR Stop Loss is a visual and statistical model.
It is not a broker order.
━━━━━━━━━━━━━━━━━━━━━━
🏆 TP1 / TP2 / TP3 MODEL
━━━━━━━━━━━━━━━━━━━━━━
The user selects the final TP3 target from 1R to 7R.
The default is 2R.
TP1 and TP2 are placed automatically inside the final target distance.
TP1:
one-third of the TP3 distance
TP2:
two-thirds of the TP3 distance
For a 3R TP3 setting:
• TP1 = 1R
• TP2 = 2R
• TP3 = 3R
For a 2R TP3 setting:
• TP1 ≈ 0.67R
• TP2 ≈ 1.33R
• TP3 = 2R
TP1 and TP2 are visual guide levels.
The current statistics engine does not close partial positions at TP1 or TP2.
It does not move Stop Loss to break even after TP1 or TP2.
It does not add partial R profit when TP1 or TP2 is touched.
Only TP3 is counted as a winning trade.
A Stop Loss is counted as -1R.
━━━━━━━━━━━━━━━━━━━━━━
🚦 ONE ACTIVE TRADE AT A TIME
━━━━━━━━━━━━━━━━━━━━━━
The trade engine maintains one active tracked position.
While a trade is active:
• new bullish divergence entries are not opened
• new bearish divergence entries are not opened
• divergence visuals can still appear
• historical divergence lines can still be drawn
This prevents overlapping tracked positions from affecting the statistics model.
A new trade is also prevented from opening on the same candle that the previous trade closes.
The next eligible divergence must occur on a later candle.
This design keeps each tracked result independent under the script’s internal accounting rules.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ TP3 / SL SAME-CANDLE HANDLING
━━━━━━━━━━━━━━━━━━━━━━
Historical OHLC candles do not reveal the exact sequence of every intrabar price movement.
A candle can contain both:
• the TP3 price
• the Stop Loss price
When both are touched inside the same candle, the script cannot know from OHLC data which level occurred first.
The engine uses a conservative rule:
Stop Loss receives priority.
The trade is recorded as a loss.
TP3 and Stop Loss checks begin on the candle after entry.
The entry candle cannot immediately close the tracked trade.
This avoids assuming an unknown movement sequence inside the entry candle.
The conservative priority rule can produce different outcomes from lower-timeframe or tick-based execution reconstruction.
━━━━━━━━━━━━━━━━━━━━━━
📦 TRADE BOX VISUAL SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
Each tracked trade creates two main-chart boxes:
Profit Box
Extends from entry to TP3.
Stop Box
Extends from entry to Stop Loss.
Bullish and bearish trades use the same green profit-area and red risk-area color logic.
While the trade remains active, the boxes extend to the current bar.
When the trade closes, the boxes stop at the exit candle and remain visible historically.
The boxes help visualize:
• entry timing
• risk distance
• final target distance
• trade duration
• exit candle
The boxes are chart drawings.
They are not broker orders.
Older boxes are deleted when the internal historical object limit is exceeded.
━━━━━━━━━━━━━━━━━━━━━━
🏷️ ACTIVE AND HISTORICAL PRICE LABELS
━━━━━━━━━━━━━━━━━━━━━━
During an active tracked trade, the right side of the chart displays dynamic labels for:
• ENTRY
• SL
• TP1
• TP2
• TP3
Each label includes the current stored price.
The labels move to the newest bar while the trade remains active.
On the exit candle, the final prices remain visible for that calculation.
When the trade closes, permanent historical labels are created for:
• TP1
• TP2
• TP3
These historical labels remain attached to the completed trade’s right edge.
The purpose is to preserve the target-price structure after the active dynamic labels disappear.
Historical TP labels do not indicate that TP1 or TP2 was actually touched.
They display the planned target prices for the completed tracked trade.
The final result is determined only by TP3 or Stop Loss.
━━━━━━━━━━━━━━━━━━━━━━
✅ RESULT LABELS
━━━━━━━━━━━━━━━━━━━━━━
When TP3 is reached, the script prints:
TARGET HIT
The trade is counted as a win equal to the selected TP3 R value.
When Stop Loss is reached, the script prints:
SL
The trade is counted as a -1R loss.
Result labels are displayed at the corresponding exit price.
All visible chart labels use bold-italic typography.
Dark Mode label text uses pure white.
Light Mode uses dark text where required for contrast.
━━━━━━━━━━━━━━━━━━━━━━
🎨 THEME SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The indicator includes three theme modes:
• Dark Mode
• Light Mode
• Mobile Theme
Dark Mode
Designed for dark PulseWire layouts.
It uses:
• black RSI-panel background
• dark dashboard surface
• white dashboard text
• pure-white chart-label text
• red brand accents
• green bullish visuals
• red bearish visuals
Light Mode
Designed for light PulseWire layouts.
It uses:
• white RSI-panel background
• white dashboard surface
• dark dashboard text
• dark chart-label text where appropriate
• red brand accents
• adjusted divergence transparency
Mobile Theme
Designed for smaller screens.
It uses:
• compact main-chart labels
• smaller RSI labels
• tiny price labels
• a two-row dashboard
• Win Rate
• NET R
Mobile Theme does not display the full desktop statistics table.
Theme selection changes presentation.
It does not change the underlying divergence, trend-filter, or trade calculations.
━━━━━━━━━━━━━━━━━━━━━━
📟 DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━
Dark Mode and Light Mode display the full bottom-right dashboard.
The header displays:
• RSI DIVERGENCE
• selected TP3 R value
• active Trend Filter
The full dashboard includes:
Status
Possible values:
• NO ACTIVE TRADE
• ACTIVE BUY
• ACTIVE SELL
Closed Trades
Number of completed tracked trades.
TP3 Wins
Number of trades that reached TP3 before Stop Loss under the script’s bar-touch rules.
Losses
Number of trades recorded at Stop Loss.
Win Rate
TP3 Wins divided by Closed Trades.
NET R
Gross Profit R minus Gross Loss R.
Gross Profit
Sum of winning TP3 R values.
Gross Loss
Number of losing trades expressed as R because every Stop Loss equals -1R.
Average / Trade
NET R divided by Closed Trades.
Profit Factor
Gross Profit R divided by Gross Loss R.
Mobile Theme displays only:
• Win Rate
• NET R
The dashboard is placed on the main chart even though the indicator calculates in a separate RSI pane.
━━━━━━━━━━━━━━━━━━━━━━
📊 STATISTICS METHODOLOGY
━━━━━━━━━━━━━━━━━━━━━━
The statistics are produced by the script’s internal bar-based trade tracker.
They are not imported from a broker.
They are not verified account results.
They are not PulseWire Strategy Tester results.
Win Rate:
wins / closed trades
Gross Profit R:
wins × selected TP3 R
Gross Loss R:
losses × 1R
NET R:
Gross Profit R − Gross Loss R
Average R:
NET R / closed trades
Profit Factor:
Gross Profit R / Gross Loss R
When there are profitable trades but no recorded losses, the script displays 999 as a finite placeholder instead of mathematical infinity.
The statistics do not include:
• TP1 partial profits
• TP2 partial profits
• break-even exits
• trailing stops
• spread
• commission
• slippage
• swap
• latency
• order rejection
• partial fills
• position sizing
• account equity
• compounding
• taxes
Statistics depend on:
• loaded chart history
• selected symbol
• timeframe
• data provider
• Pivot Lookback
• Confirmation Bars
• Trend Filter
• HTF Trend Timeframe
• ATR Period
• Stop Loss multiplier
• TP3 target
• historical-data revisions
Changing any of these inputs can change historical results.
━━━━━━━━━━━━━━━━━━━━━━
🚨 ALERT SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The script includes static PulseWire alert conditions for:
• Regular Bullish Divergence
• Hidden Bullish Divergence
• Regular Bearish Divergence
• Hidden Bearish Divergence
• BUY Entry
• SELL Entry
• TP3 Hit
• Stop Loss Hit
Regular bullish and bearish divergence are enabled in the current public configuration.
Hidden bullish and hidden bearish divergence logic is internally disabled.
The hidden alert choices can therefore appear in PulseWire’s alert-condition list, but no hidden divergence event is produced while the internal hidden-divergence switches remain disabled.
The script also includes dynamic alert() calls for:
• BUY entry
• SELL entry
• TP3 hit
• Stop Loss hit
Dynamic BUY and SELL messages can include:
• tradewsamet identifier
• chart ticker
• chart timeframe
• entry price
• TP1 price
• TP2 price
• TP3 price
• Stop Loss price
• final R target
• active Trend Filter
This allows one PulseWire alert using:
Any alert() function call
to receive all dynamic entry and result events.
━━━━━━━━━━━━━━━━━━━━━━
🔔 HOW TO USE ALERTS
━━━━━━━━━━━━━━━━━━━━━━
For a specific static event:
1. Add RSI Divergence Entry Engine to the chart.
2. Open PulseWire’s Create Alert window.
3. Select the indicator as the condition.
4. Choose the required event.
5. Select the notification method.
6. Use an appropriate frequency.
7. Test the alert before relying on it.
For one combined dynamic workflow:
1. Add the indicator to the chart.
2. Open Create Alert.
3. Select RSI Divergence Entry Engine .
4. Select Any alert() function call.
5. Configure the delivery method.
6. Test BUY, SELL, TP3, and SL message handling.
When the script, settings, symbol, or timeframe changes materially, recreate existing alerts.
A PulseWire alert can continue using the script snapshot stored when the alert was created.
Alerts are monitoring tools.
They do not execute, modify, or close broker orders.
━━━━━━━━━━━━━━━━━━━━━━
🧪 HOW TO USE THE INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
A practical workflow:
1. Add RSI Divergence Entry Engine to a standard candlestick chart.
2. Select Dark Mode, Light Mode, or Mobile Theme.
3. Begin with Pivot Lookback set to 5.
4. Begin with Confirmation Bars set to 1.
5. Observe the RSI-panel divergence structures.
6. Observe the matching neon price-pivot lines on the main chart.
7. Remember that the pivot visual becomes available only after right-side confirmation.
8. Distinguish the neon divergence line from the later tracked entry label.
9. Begin with Trend Filter set to Off when studying raw divergence frequency.
10. Test EMA Trend for chart-timeframe directional alignment.
11. Test Supertrend for volatility-based directional alignment.
12. Test HTF Trend for higher-timeframe EMA context.
13. Verify the selected HTF timeframe.
14. Review the main-chart trend reference.
15. Observe whether a BULLISH or SELL entry label is accepted.
16. Review ENTRY, SL, TP1, TP2, and TP3 prices.
17. Observe the profit and risk boxes.
18. Remember that TP1 and TP2 are visual only.
19. Review the final TARGET HIT or SL result.
20. Review dashboard Win Rate and NET R.
21. Compare Dark/Light full dashboard with Mobile Theme.
22. Use alerts for monitoring rather than blind execution.
23. Review broader market structure independently.
24. Review spread, liquidity, volatility, and news conditions.
25. Define personal account risk and position size.
26. Test the exact symbol, timeframe, and data feed personally used.
The indicator is designed for structured study and monitoring.
It should not be treated as an automatic decision-maker.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS REFERENCE
━━━━━━━━━━━━━━━━━━━━━━
🎨 Theme
Theme Mode
Dark Mode
Uses the full dark visual profile.
Light Mode
Uses the full light visual profile.
Mobile Theme
Uses compact labels and a two-row dashboard.
━━━━━━━━━━━━━━━━━━━━━━
🎯 Signal Settings
Pivot Lookback
Controls the left-side pivot search width.
Default:
5
Higher values generally create larger and less frequent pivot structures.
Confirmation Bars
Controls the number of right-side completed candles required to confirm the RSI pivot.
Default:
1
Increasing the value increases confirmation delay.
Chart Signal Label Size
Controls the main-chart BULLISH and SELL entry-label size.
Available values:
• Tiny
• Small
• Normal
• Large
• Huge
Mobile Theme overrides the selected size with a compact layout.
━━━━━━━━━━━━━━━━━━━━━━
🧭 Trend Filter
Trend Filter
Available modes:
• Off
• EMA Trend
• Supertrend
• HTF Trend
Off
Allows tracked bullish and bearish entries without directional trend filtering.
EMA Trend
Uses chart close relative to EMA 200.
Supertrend
Uses ATR 10 and factor 3.0.
HTF Trend
Uses selected higher-timeframe close relative to higher-timeframe EMA 200.
HTF Trend Timeframe
Selects the higher timeframe used by HTF Trend.
Default:
240 minutes
This setting has no effect when HTF Trend is not selected.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ Trade Management
ATR Period
Controls the ATR used for risk-distance calculations.
Default:
14
Stop Loss Distance (ATR)
Multiplies ATR to calculate the Stop Loss distance.
Default:
2.0
TP3 Target (R)
Selects the final target from 1R to 7R.
Default:
2R
TP1 and TP2 are calculated automatically from the TP3 distance.
All public input values are hidden from PulseWire’s status line to reduce chart-header clutter.
━━━━━━━━━━━━━━━━━━━━━━
🧠 WHAT MAKES THIS SCRIPT ORIGINAL
━━━━━━━━━━━━━━━━━━━━━━
RSI, divergence, EMA, Supertrend, ATR, risk/reward targets, and trade statistics are established technical-analysis concepts.
These concepts are not unique by themselves.
The originality of RSI Divergence Entry Engine lies in the coordinated workflow applied to them:
fixed RSI calculation
→ confirmed oscillator pivots
→ price / RSI regular divergence comparison
→ pivot-distance validation
→ RSI-path divergence filling
→ main-chart three-layer neon pivot lines
→ optional chart or higher-timeframe trend filtering
→ one-active-trade state
→ confirmation-candle entry
→ ATR-normalized Stop Loss
→ proportional TP1 / TP2 placement
→ adjustable TP3 R target
→ conservative OHLC exit handling
→ permanent risk/reward history
→ historical target-price labels
→ theme-aware chart output
→ mobile-specific dashboard
→ internal R-based statistics
→ static and dynamic alert workflows
Distinctive implementation features include:
• separating divergence context from accepted tracked entries
• displaying the same confirmed divergence in the RSI pane and on the main chart
• filling the RSI path-to-divergence region
• using a three-layer neon price-divergence line
• preserving trade boxes after closure
• preserving TP1, TP2, and TP3 planned prices historically
• allowing multiple direction-filter models inside one entry workflow
• maintaining one tracked trade at a time
• applying conservative Stop Loss priority when TP3 and SL share a candle
• offering theme-specific dashboard behavior
• reducing the Mobile Theme dashboard to Win Rate and NET R
• supporting static conditions and combined dynamic alert() messages
• keeping public settings compact while documenting fixed internal values
The script is not a collection of unrelated indicators placed on one chart.
Every component supports the same objective: converting a confirmed RSI divergence into a transparent, filterable, volatility-mapped, historically reviewable entry framework.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT PRACTICAL NOTES
━━━━━━━━━━━━━━━━━━━━━━
Signal frequency depends on:
• symbol
• timeframe
• data provider
• Pivot Lookback
• Confirmation Bars
• fixed 5–60 bar pivot-distance window
• Trend Filter
• HTF Trend Timeframe
• existing active-trade state
• ATR availability
• available historical data
Higher Pivot Lookback values can reduce frequency.
Higher Confirmation Bars values increase delay.
EMA Trend can reject counter-position signals relative to EMA 200.
Supertrend can change direction after price movement.
HTF Trend can remain sensitive to the currently developing higher-timeframe candle.
Only one tracked trade can be active.
A divergence can therefore be visible without becoming a tracked trade.
TP1 and TP2 are not partial exits.
Historical TP1, TP2, and TP3 labels display planned prices, not proof that every level was touched.
Dashboard statistics use loaded chart history only.
Different brokers or exchanges can produce different:
• highs
• lows
• closes
• RSI pivots
• ATR values
• divergence signals
• trend-filter states
• TP3 / SL outcomes
• dashboard statistics
Changing the chart’s available history can change the first eligible pivot pair and all later trade-state sequencing.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ LIMITATIONS AND SHORTCOMINGS
━━━━━━━━━━━━━━━━━━━━━━
This script has important limitations:
It does not guarantee profitable trades.
It does not predict future price movement.
It does not execute orders.
It does not place broker Stop Loss orders.
It does not place broker Take Profit orders.
It does not calculate position size.
It does not calculate account risk.
It does not include spread.
It does not include commission.
It does not include slippage.
It does not include latency.
It does not include swap or financing.
It does not model partial fills.
It does not model order rejection.
It does not model contract specifications.
It does not model tick-by-tick execution.
It uses historical OHLC bars.
It cannot always determine whether TP3 or SL occurred first inside one candle.
It resolves same-candle TP3 / SL ambiguity in favor of Stop Loss.
It does not record TP1 or TP2 as partial profit.
It does not move Stop Loss to break even.
It does not trail Stop Loss.
It maintains one active tracked trade.
It can ignore otherwise valid new entries while a trade is active.
It uses pivot confirmation.
Pivot visuals are not available on the original pivot candle in realtime.
RSI pivot visuals are placed at the historical pivot location after confirmation.
Main-chart neon lines are created after divergence confirmation.
The HTF filter can change while the current higher-timeframe candle remains open.
A confirmed divergence can fail.
A trend-aligned divergence can fail.
A larger divergence area does not guarantee a stronger result.
A neon divergence line is not guaranteed support or resistance.
A TARGET HIT label is not broker-verified execution.
Dashboard statistics are not audited performance.
Profit Factor displays 999 when wins exist without recorded losses.
Changing settings recalculates historical conditions.
Changing symbol, timeframe, provider, or available history can change output.
Alert delivery depends on PulseWire and user configuration.
Alerts do not guarantee broker execution.
For these reasons, the indicator should be used as an educational decision-support and chart-review tool, not as a standalone automated strategy.
━━━━━━━━━━━━━━━━━━━━━━
👤 WHO THIS SCRIPT MAY BE USEFUL FOR
━━━━━━━━━━━━━━━━━━━━━━
This script may be useful for traders who:
• understand basic RSI divergence
• want regular bullish and bearish divergence visuals
• prefer pivot-confirmed structures
• want divergence displayed in both RSI and price
• want a clear neon main-chart divergence line
• want optional trend filtering
• use EMA 200
• use Supertrend
• use higher-timeframe direction
• want ATR-based risk mapping
• want adjustable R targets
• want historical risk/reward boxes
• want historical planned TP prices
• want one-active-trade statistics
• want Dark, Light, and Mobile themes
• want static alerts
• want one combined dynamic alert
• understand that chart statistics are not verified trading results
It may be less suitable for users who:
• want signals on the unconfirmed pivot candle
• want no pivot delay
• want hidden divergence enabled publicly
• want every divergence to open a trade
• want multiple overlapping tracked trades
• want partial TP accounting
• want automatic break-even management
• want trailing stops
• want tick-level backtesting
• want verified Strategy Tester results
• want broker execution
• want guaranteed reversal signals
• expect a high Win Rate to continue unchanged
• expect the HTF filter to remain fixed before the higher-timeframe candle closes
━━━━━━━━━━━━━━━━━━━━━━
🧭 BEST PRACTICE SUGGESTIONS
━━━━━━━━━━━━━━━━━━━━━━
For studying raw divergence behavior:
• use Trend Filter Off
• begin with Pivot Lookback 5
• begin with Confirmation Bars 1
• observe divergence visuals before evaluating trades
• distinguish pivot location from confirmation timing
For trend-aligned divergence:
• test EMA Trend
• test Supertrend
• compare signal frequency
• review whether the filter removes useful countertrend setups
For broader directional context:
• test HTF Trend
• use a higher timeframe meaningfully above the chart timeframe
• remember that the active HTF candle can change before closing
For trade mapping:
• begin with ATR 14
• begin with Stop Loss Distance 2.0 ATR
• begin with TP3 2R
• remember that TP1 and TP2 are visual only
• review same-candle TP3 / SL cases conservatively
For chart clarity:
• use Dark Mode on dark chart layouts
• use Light Mode on light chart layouts
• use Mobile Theme on small screens
• adjust the main-chart entry-label size
• use neon divergence lines as context, not automatic entries
Always:
• wait for divergence confirmation
• review broader price structure
• review liquidity and volatility
• review session conditions
• review news risk
• define personal account risk
• define personal position size
• test the exact symbol and timeframe
• verify alerts before relying on them
• remember that every divergence can fail
━━━━━━━━━━━━━━━━━━━━━━
🔓 PUBLICATION NOTE
━━━━━━━━━━━━━━━━━━━━━━
RSI Divergence Entry Engine is published as an educational RSI-divergence, directional-filtering, ATR trade-mapping, historical-visualization, and alert tool.
The purpose of this description is to explain:
• how RSI is calculated
• how RSI pivot lows and highs are confirmed
• how Pivot Lookback affects structure selection
• how Confirmation Bars affect delay
• how the fixed pivot-distance window works
• how regular bullish divergence is identified
• how regular bearish divergence is identified
• how divergence is displayed inside the RSI pane
• how the RSI divergence area is filled
• how corresponding price pivots are displayed with neon lines
• when the pivot visuals become available
• why pivot visuals appear at historical pivot locations
• why tracked entries are placed on confirmation-candle close
• how the trend filter affects entries without hiding divergence context
• how EMA Trend works
• how Supertrend works
• how HTF Trend works
• how currently forming higher-timeframe candles affect realtime context
• how ATR risk distance is calculated
• how Stop Loss is placed
• how TP1, TP2, and TP3 are calculated
• why TP1 and TP2 are visual only
• why only TP3 counts as a win
• how one-active-trade handling works
• how same-candle TP3 / SL ambiguity is resolved
• how historical trade boxes are retained
• what historical TP labels represent
• how Dark Mode, Light Mode, and Mobile Theme differ
• what the dashboard displays
• how Win Rate, NET R, Average R, and Profit Factor are calculated
• why the statistics are not broker-verified
• what static alert conditions are available
• how “Any alert() function call” works
• what the script does not simulate
• why the combined modules form one coordinated workflow
The script is designed to support structured review.
It does not promise profitable results.
It does not remove market risk.
It does not replace independent analysis.
It does not replace personal risk management.
━━━━━━━━━━━━━━━━━━━━━━
🕒 REPAINTING, BACKPLOTTING, AND TIMING DISCLOSURE
━━━━━━━━━━━━━━━━━━━━━━
RSI Divergence Entry Engine uses pivot functions.
Pivot confirmation requires future candles relative to the original pivot location.
The number of required right-side candles is controlled by Confirmation Bars.
The script does not know that a pivot exists on the original pivot candle.
After the right-side candles close:
• the pivot becomes confirmed
• the divergence can be calculated
• the RSI divergence line is displayed at the historical pivot locations
• the RSI divergence label is displayed at the confirmed pivot location
• the main-chart neon line connects the corresponding historical price pivots
This historical placement is a visual back-reference to the confirmed pivot structure.
It must not be interpreted as a realtime signal that was available on the original pivot candle.
The tracked trade entry is not backdated.
The tracked trade opens at the close of the later confirmation candle when all entry rules are valid.
The main-chart BULLISH or SELL entry label appears on that confirmation candle.
Trade outcome checks begin on the following candle.
The HTF Trend request uses lookahead_off.
It does not intentionally access future higher-timeframe values.
However, the current higher-timeframe candle can continue developing in realtime until it closes.
Historical results can change when:
• Pivot Lookback changes
• Confirmation Bars changes
• Trend Filter changes
• HTF Trend Timeframe changes
• ATR settings change
• TP3 target changes
• chart symbol changes
• timeframe changes
• exchange or broker feed changes
• historical data is revised
• available chart history changes
Confirmed chart-bar calculations reduce unfinished current-chart-candle changes.
They do not remove pivot confirmation delay, historical pivot placement, HTF live-candle variation, data-feed differences, or market risk.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━
RSI Divergence Entry Engine is provided for educational and informational purposes only.
It does not constitute financial, investment, trading, legal, accounting, or tax advice.
No indicator can guarantee future results.
Markets are uncertain.
Momentum changes.
Volatility changes.
Trend changes.
Liquidity changes.
Historical chart behavior does not ensure future performance.
Every user is responsible for their own:
• analysis
• validation
• symbol selection
• timeframe selection
• trend-filter selection
• execution planning
• Stop Loss placement
• target planning
• position sizing
• risk management
• alert configuration
• trading decisions
• broker execution
• legal obligations
• tax obligations
The RSI pivots, divergence lines, divergence fills, neon price-pivot lines, trend references, BULLISH labels, SELL labels, ENTRY labels, Stop Loss levels, TP1 levels, TP2 levels, TP3 levels, trade boxes, historical target labels, TARGET HIT labels, SL labels, dashboard statistics, Win Rate, NET R, Average R, Profit Factor, and alerts are visual analysis tools only.
A bullish divergence is not a guaranteed reversal.
A bearish divergence is not a guaranteed reversal.
An EMA-aligned signal is not guaranteed to succeed.
A Supertrend-aligned signal is not guaranteed to succeed.
A higher-timeframe aligned signal is not guaranteed to succeed.
A TARGET HIT label is not proof of an actual broker fill.
An SL label is not proof of an actual broker fill.
The dashboard is not verified account performance.
The statistics are not audited.
The script does not include spread, commission, slippage, latency, financing, partial fills, order rejection, position sizing, account equity, or broker-specific execution behavior.
Use the script as a structured RSI-divergence review, directional-filtering, trade-mapping, and monitoring framework—not as a promise of profitability or a substitute for independent judgment.
Indicator

Supply & Demand Zones Liquidity & Stop Hunt [LunqFX]Supply and demand zones are where price reacts — but most indicators draw every swing as a box and leave you to guess which one matters. Liquidity Zones ranks them: it marks the key supply and demand zones, scores each one by how much liquidity it holds, and shows whether it is still fresh — so you know which level to trade and which to ignore.
❶ WHAT EACH ZONE SHOWS
Every zone is a coloured block — magenta = SUPPLY (sellers, above), teal = DEMAND (buyers, below) — and carries three readings that are original to this script:
LIQ SCORE (0–100) — how much volume traded inside the zone versus the strongest zone on the chart. 100 = the heaviest zone (the real magnet); a low score = a thin, weak level.
VOLUME ▲ / ▼ — the up-volume vs down-volume that built the zone: did buyers or sellers do the work inside it.
FRESH / TESTED N× — FRESH = price has not returned yet (strongest reaction expected); TESTED N× = already retested N times, weaker each time.
❷ HOW TO TRADE IT
1 — Read the BIAS in the panel. ▲ BUY-SIDE = favour longs, ▼ SELL-SIDE = favour shorts. Trade with it, not against it.
2 — Pick a zone with a HIGH LIQ Score (70+). Low-score zones are thin and unreliable — skip them.
3 — Prefer FRESH zones. A FRESH high-LIQ zone is the highest-probability reaction. A many-times-TESTED zone is more likely to break than hold.
4 — Wait for price to return to that zone. The bright edge line is your reference level.
5 — Enter on the reaction: LONG — bias BUY-SIDE, price drops into a FRESH teal DEMAND zone, LIQ 80, Volume ▲ (buyers dominant). Long on the reaction, stop below the zone, target the next supply zone above. SHORT — bias SELL-SIDE, price rallies into a FRESH magenta SUPPLY zone, LIQ 76, Volume ▼ (sellers dominant). Short on the reaction, stop above the zone, target the next demand zone below.
❸ WHAT TO AVOID
Trading low-LIQ zones — they hold little liquidity. Fading a zone whose Volume split disagrees with its side (e.g. a supply zone built on heavy up-volume) — the level is weak. Chasing a many-times-TESTED zone expecting a clean bounce.
Works on any symbol and timeframe — forex, gold (XAUUSD), indices, crypto and stocks — intraday and higher timeframes alike.
❹ DASHBOARD
The panel lists every zone with its price, LIQ Score, FRESH/TESTED status and side (BUY/SELL), plus a LIQ-weighted overall bias — the full picture at a glance. Optional neon candles can be turned off to keep your own style.
❺ HOW IT WORKS
1 — Swing highs and lows are found from confirmed pivots (closed bars — no repainting). Each swing high opens a supply zone, each swing low a demand zone. 2 — Each zone is a block centred on the swing, its height scaled to ATR so it fits the instrument's volatility. 3 — For every zone the script measures the volume traded inside it, the up/down-volume split, and how many separate times price entered it. 4 — LIQ Score = the zone's volume ÷ the strongest zone's volume, scaled 0–100. 5 — The bias is weighted by LIQ Score, so one heavy zone counts for more than several thin ones — an honest read of whether liquidity leans buy or sell.
No repainting
Zones are built only from confirmed pivots and rendered on the last bar over a fixed lookback. A zone that appears in a screenshot is a zone that was there live — history is never recalculated.
This indicator is an educational market-analysis tool, not financial advice. Zone strength and past reactions describe historical behavior and do not guarantee future results. Always confirm with your own analysis and manage risk. Indicator

Strong Liquidity Outlook | ProjectSyndicateStrong Liquidity Outlook tracks the two opposed states of liquidity — the voids price must fill and the order shelves price must sweep — scores them on a single 0–10 scale, merges them where they agree, and projects a forward route through them. Every number on the panel is measured, not invented.
🟥🟩 IMPORTANT INFO: Because zone height, reach and distance are all ATR-derived, the engine self-calibrates to each symbol. Start on M5–H1. On daily charts raise Min Gap Size (%), as intraday voids become noise.
🧲 Two Draw Engines, One Scoreboard — the core of this tool. Most level tools track one thing. This one tracks the two opposed states of liquidity and forces them to compete on the same 0–10 scale. Imbalance zones are the voids — bar-to-bar gaps where no trade occurred, an absence price is drawn back to fill. Stop-pool zones are the opposite — dense shelves of resting orders sitting above swing highs and below swing lows, ATR-sized and volume-weighted. A gap is a vacuum; a pool is a wall. Both pull price, for opposite reasons, and until now you had to run two indicators to see them together.
🎯 Confluence Merging — where the real levels come from. Overlapping same-side zones do not stack into visual mush. They fuse. When a gap opens into the same pocket a stop pool already occupies, the two merge into one confluence zone, their volume mass adds, their scores compound, and the zone is tagged ×2 or ×3 on the chart. The levels that survive this merge are the ones two independent mechanisms agree on — and they rise to the top of the ranked panel automatically. No manual confluence hunting.
⭐ 0–10 Zone Strength Score. Every zone is graded on a transparent weighted blend of five factors: volume pressure at formation, zone size relative to ATR, number of tests it has survived, confluence depth, and proximity to current price. Optional idle decay bleeds a zone's score toward a floor while price ignores it, so a stale level cannot masquerade as a live one. Strong zones render sharp and opaque; weak ones fade. Every weight is exposed in settings.
♻️ Live Zone Lifecycle — INTACT → CONSUMED % → FILLED / SWEPT. A zone above price is eaten from its floor upward. A zone below price is eaten from its ceiling down. The script renders that literally: the bright remainder is the unworked part of the void, the dimmed slice behind it is what price has already consumed, and the label reports the exact percentage. When price closes fully through, an imbalance is marked FILLED and a pool is marked SWEPT. Every fresh re-entry — not just the first — counts as a new test and feeds the score.
🗺️ Scenario Builder — the powerful new part. This is not a hand-drawn arrow. The script walks your live zone map forward from the last bar and assembles a route from surveyed levels:
1 · TRIGGER — the nearest qualifying zone in the trigger direction. Price runs the stops first.
2 · REVERSE — a retrace of that leg. If a real zone sits within your ATR tolerance of that level, the waypoint snaps onto it and is flagged ⚑.
3 · RETEST — a partial recovery that deliberately fails short of the trigger extreme.
4 · TARGET — the strongest-scoring zone on the far side of price. Not the flashiest, not the furthest. The highest-graded one.
5 · EXTENSION — the next zone beyond target, if one exists.
Trigger direction defaults to Auto, taken from the live net-pull bias. Bars-per-leg are allocated proportionally to price travel, so steep legs stay steep and the path never looks synthetic.
🧮 Honest Path Confidence (0–100), never a fake "chance". Here is the rule the entire script is built on: if a leg is not anchored to a real, scored zone, it is drawn hollow and labelled as projected. If no zone exists on the far side, the target falls back to a measured move — and it says so, the vertex is drawn unfilled, and the confidence meter is cut. An unsnapped reverse waypoint is dimmed. Path Confidence is the mean of the trigger and target zone scores, penalized for anything unanchored. It is labelled confidence in the levels, not probability of the path. You will never see an invented "87% chance price reaches this target." The path is level geometry rendered forward. It re-solves every tick as zones score up, decay, or get swept — a current-state projection, not a committed forecast.
📊 Five-Slide Dashboard — every figure measured. A compact panel that auto-rotates (or pins to one slide) with ●○○○○ position pips.
OVERVIEW — regime, live zone counts by side, elite count, a tug-of-war net-pull meter, and the nearest zone above and below with strength bars and real distance.
TOP ZONES — the eight highest-scored live zones, ranked, each with type icon, confluence multiplier, price, and a score meter.
STATISTICS — this is the part nobody else ships. Gap fill rate, pool sweep rate, average bars to resolution, and post-resolution reaction rate, each with its own meter and its raw hits / total count exposed beside it.
PRESSURE — zone mass by side, estimated volume split, net delta above and below, and how many zones are partially eaten.
SCENARIO — the full waypoint list with prices, move-to-target in % and ATR, an approximate R multiple, the confidence meter, and an explicit anchoring readout.
📐 Statistics That Cannot Lie To You. Every zone ever detected stays in the denominator. Retiring a stale zone from the chart never removes it from the fill-rate sample. The reaction test — did price travel back n × ATR within n bars after a fill or sweep? — scores each resolution exactly once, hit or miss, and both numbers are shown. Samples under 20 events are flagged THIN — read with care rather than dressed up as a rate. Volume and delta figures are derived from bar geometry, not tick data, and the panel states that on its own row.
🔬 Non-Repainting By Construction. Gaps are read off closed bars only. Pivot-confirmed pools lag by your Pivot Right setting — that is confirmation lag, not repainting, and nothing is ever redrawn backwards once a zone is placed. All state mutations happen on bar close.
🎨 Clean Themed Visuals. Dashed borders on imbalance zones, solid on stop pools, so you read the type at a glance. Midlines on elite zones. Nearest-zone rails extending to current price. The scenario path renders as a three-pass polyline — two soft glow layers under a crisp core — with diamond waypoint markers, a terminal arrowhead, and dotted trigger/target rails.
🔔 Built-In Alerts. New imbalance zone, new stop-pool zone, zone tested, imbalance filled, stop pool swept, elite zone approach, and scenario trigger reached — each firing on bar close, formatted for manual or automated use.
🔧 Fully Customizable. Both detectors toggle independently. Gap size floors in both % and ATR. Pivot sensitivity, pool height and offset. All five score weights, decay rate and floor. Merge threshold, stale-zone retirement, reaction window and size. The complete scenario filter set — path detail, trigger direction, waypoint score floor, projection length, retrace and retest ratios, snap tolerance. Plus every colour, label, meter and panel option.
🎯 Why this is different. Most liquidity tools show you one kind of level and attach a fabricated probability to it. This one tracks both kinds — the voids and the walls — scores them on one honest scale, merges them where they agree, then projects a route through them and tells you which parts of that route are real. Then it grades its own zones against history and shows you the fill rate, the sweep rate, and the reaction rate, with the raw counts, including when the sample is too thin to trust.
🧭 How to trade it. Read the panel before the chart. The net-pull meter tells you which side the field is leaning. The TOP ZONES slide tells you which levels have actually earned attention. Treat the scenario trigger as where liquidity gets taken and the target as the logical objective — and check the anchoring row first. A solid, snapped path into a high-scored target is a clean roadmap. A hollow TARGET (projected) vertex means the market has no graded level behind that move, and you should size accordingly. Cross-check the STATISTICS slide for your symbol: if gaps on your instrument fill 38% of the time, trade them like a 38% event.
⚠️ Important. This is a decision-support tool, not a standalone buy/sell system, and it makes no performance guarantees. Everything it displays is descriptive of current zone strength, real distance, and measured historical behaviour. Path Confidence is a read on the quality of the levels involved, not a forecast of price. Volume-pressure figures are geometric estimates, not tick data. Historical rates describe what has happened on the loaded chart and do not predict what will happen next; thin samples are flagged for exactly that reason. Behaviour varies by symbol, timeframe, and configuration. Always combine it with your own analysis and risk management, and test it on your market before trading it live. Indicator

Nadaraya-Watson Trend [QuantAlgo]🟢 Overview
The Nadaraya-Watson Trend indicator estimates a smooth, adaptive trend path by applying non-parametric kernel regression directly to price. For each bar it weights historical values inside a configurable lookback window with a chosen kernel function, normalizes those weights, and returns a single endpoint estimate that forms the plotted trend line. Bandwidth and kernel type control how aggressively recent bars dominate the estimate, optional residual bands express how far price is dispersed around that path, and slope based coloring with reversal markers make direction and turning points readable at a glance across any timeframe or instrument.
🟢 How It Works
The indicator is built around a one sided Nadaraya-Watson (NW) estimator: only the current bar and past bars enter the calculation, so the path behaves as a causal smoother rather than a centered, repainting fit. The pipeline has three stages: kernel weighting over the lookback window, normalized regression into a single trend value, and optional residual band construction from the same estimate.
First, effective bandwidth is formed from the configured bandwidth and multiplier. Each lag distance is then mapped to a kernel weight. Gaussian and Rational Quadratic keep infinite support with different decay shapes. Compact kernels (Epanechnikov, Triangular, Quartic, Cosine) only assign weight while the normalized lag stays inside the unit interval:
kernel_weight(float dist, float h, string ktype, float rq) =>
float w = 0.0
if h > 0.0
float u = dist / h
if ktype == 'Gaussian'
w := math.exp(-(dist * dist) / (2.0 * h * h))
else if ktype == 'Rational Quadratic'
w := math.pow(1.0 + (dist * dist) / (2.0 * rq * h * h), -rq)
else if math.abs(u) <= 1.0
if ktype == 'Epanechnikov'
w := 0.75 * (1.0 - u * u)
else if ktype == 'Triangular'
w := 1.0 - math.abs(u)
else if ktype == 'Quartic'
w := (15.0 / 16.0) * math.pow(1.0 - u * u, 2.0)
else if ktype == 'Cosine'
w := (math.pi / 4.0) * math.cos(math.pi * u / 2.0)
w
float h = bandwidth * h_mult
Next, the Nadaraya-Watson path is computed as the normalized weighted average of the selected source across the lookback window. Nearer bars dominate when bandwidth is low. Weight spreads more evenly when bandwidth is high, producing a smoother path:
float sum_w = 0.0
float sum_p = 0.0
for i = 0 to lookback
float w = kernel_weight(i, h, kernel_type, rel_weight)
sum_w += w
sum_p += src * w
float nw_trend = sum_w != 0.0 ? sum_p / sum_w : na
Finally, residual bands can be drawn from a kernel weighted mean absolute residual of the source versus the current NW estimate, scaled by the band multiplier. When price is tightly clustered around the path the envelope contracts. When price is dispersed the envelope expands, framing extension and compression relative to the same estimator that defines the trend:
float sum_abs = 0.0
float sum_res_w = 0.0
for i = 0 to lookback
float w = kernel_weight(i, h, kernel_type, rel_weight)
if w > 0.0 and not na(src ) and not na(nw_trend)
sum_abs += w * math.abs(src - nw_trend)
sum_res_w += w
float residual = sum_res_w != 0.0 ? sum_abs / sum_res_w : na
float upper = not na(nw_trend) and not na(residual) ? nw_trend + residual * band_mult : na
float lower = not na(nw_trend) and not na(residual) ? nw_trend - residual * band_mult : na
🟢 Signal Interpretation
▶ Bullish Path (Rising NW Line with Bullish Color): When the Nadaraya-Watson estimate is increasing bar to bar, the path and optional gradient fill plot in the bullish color, reading as an uptrend in the kernel smoothed series. Treat this as a long bias: strongest on the reversal marker with price holding above the path, or on pullbacks that respect the path while slope stays up. Bias weakens if price loses the path and the slope flattens or flips down.
▶ Bearish Path (Falling NW Line with Bearish Color): When the estimate is decreasing bar to bar, the path and fill plot in the bearish color, reading as a downtrend in the kernel smoothed series. Treat this as a short bias: strongest on the reversal marker with price holding below the path, or on bounces that fail at the path while slope stays down. Bias weakens if price reclaims the path and the slope flattens or flips up.
▶ Residual Bands (Optional Envelope Around the Path): With residual bands enabled, the upper and lower lines track a scaled kernel weighted residual around the NW path. Touches or closes beyond the outer band highlight price stretched away from the estimate. Returns toward the path after an extension often mark mean reversion relative to the kernel trend rather than a full regime change. Band width is derived from how widely the source has been scattered around the current NW estimate inside the lookback window
🟢 Features
▶ Preconfigured Presets: Three parameter sets tuned for different trading styles and timeframes. "Default" delivers balanced trend estimation for swing trading on 1H to daily charts, smoothing short lived noise while still responding to genuine directional turns. "Fast Response" is built for intraday work on 5 minute to 1H charts, keeping the path tighter to recent structure so turns register earlier at the cost of more frequent reversals in chop. "Smooth Trend" is aimed at position style reading on daily and weekly charts, forming a more stable baseline that flips only when the kernel path itself shifts with more conviction. Kernel type, residual bands, and visual options stay independently configurable under every preset.
▶ Kernel Library: Six kernel functions expand how the same endpoint Nadaraya-Watson framework assigns weight across the window. Gaussian is the classic smooth default with infinite support. Epanechnikov, Triangular, Quartic, and Cosine are compact kernels that fully exclude bars beyond the bandwidth scale. Rational Quadratic keeps infinite support with heavier tails, and its Relative Weighting input controls how much influence farther bars retain versus a Gaussian like decay. Switching kernels changes the shape of the single plotted path without adding a second model or external oscillator.
▶ Residual Bands: Optional envelope around the NW path built from kernel weighted mean absolute residuals of the source versus the estimate, scaled by Band Multiplier. Enable when you want extension and compression context around the same trend line. Disable when you want only the path, gradient, and markers.
▶ Built-in Alerts: Five alert conditions support hands off monitoring. "Bullish Kernel Reversal" fires on the bar the path slope flips from down to up. "Bearish Kernel Reversal" fires on the bar the path slope flips from up to down. "Any Kernel Reversal" fires on either directional flip. "Source Cross Above Upper Band" and "Source Cross Below Lower Band" fire when the selected source crosses the residual envelope extremes. Alert messages include exchange, ticker, and timeframe for immediate context.
▶ Visual Customisation: Six color presets (Classic, Aqua, Cosmic, Cyber, Neon, and Custom) apply coordinated bullish and bearish colors to the path, gradient fill, residual bands, markers, optional bar coloring, and optional background coloring. Custom unlocks independent bullish and bearish color pickers. Gradient fill, residual bands, reversal markers, bar coloring, and background coloring can each be toggled so the chart stays as clean or as expressive as the workflow requires.
Indicator

OrderFlow FVG Matrix MTF | ProjectSyndicateOrderFlow FVG Matrix reads every Fair Value Gap through the lens of the order flow that created it, across three timeframes at once, then commits a single shaded imbalance zone only where the gap, the delta behind it, and the timeframes agree. Instead of drawing every three-candle gap as an identical box, it detects gaps on your chosen higher timeframes, decomposes the volume that formed each one into buying versus selling, scores the imbalance 0–10 on six order-flow-native factors, and fuses overlapping gaps into one Confluence zone tagged with every timeframe that produced it. Each zone carries its own maroon/green buy-versus-sell split, net delta, absorption and relative-volume read, is normalized to a universal height so none dominate the chart, re-scores as price develops, and is neutralized the moment price mitigates it — while a live diagnostics panel shows the full multi-timeframe order-flow picture driving every zone on the symbol and timeframe you trade.
🧠 Order-Flow Core — the central idea. Every gap is graded not by its size but by the flow that built it. Each of the three candles that form an FVG has its volume split into buying versus selling from where price closed within that candle's range, then summed across the formation to yield buy volume, sell volume, net delta, and a wick-rejection absorption estimate; relative volume compares that participation to a rolling baseline. This is what separates a gap born of violent one-sided displacement from a thin, low-conviction gap that merely looks the same. Because the read is derived from price geometry rather than lower-timeframe intrabar requests, it keeps working even where only tick volume is available — gold, FX, and similar instruments — instead of going blank.
📐 Multi-Timeframe FVG Detection — three lenses, one map. Gaps are detected independently on three fully configurable timeframes (default H1 · H2 · H4), with bullish and bearish detection separately toggleable. Each timeframe runs its own self-contained detector on its own confirmed bars, and a gap must clear an ATR (or percent-of-price) filter to qualify. Higher-timeframe data is read with no lookahead, so a zone's price, class and statistics are fixed once its bar closes — the zones do not repaint.
🔗 Confluence Merging — no overlapping zones, ever. When two same-direction zones overlap within an adjustable ATR tolerance, they fuse into one. The order flow is re-aggregated — volumes and delta summed, buy/sell percentage and relative volume recomputed, the band re-centered on the weighted midpoint — and the zone is re-labeled Confluence FVG · H1·H2·H4 with every contributing timeframe, its strength lifted by a confluence bonus for each extra timeframe stacked in. The consolidation repeats until nothing overlaps, so the chart never stacks bands or duplicates labels: three timeframes agreeing at a level read as one stronger zone, not a cluttered pile.
📏 Universal Zone Height. Every gap is normalized to a single fixed height — ATR-based or a percentage of price — centered on the gap's midpoint. Thin gaps and wide gaps render as uniform bands, so no imbalance becomes a tall tower and the chart stays clean; the strength score, not the raw gap size, tells you which levels actually matter.
⭐ 6-Factor Strength Engine (0–10). Each zone is scored on six order-flow-native factors, every weight adjustable: Displacement (gap size versus ATR), Delta Alignment (did buying confirm a bullish gap, or selling a bearish one), Relative Volume (participation versus baseline), Flow Dominance (how one-sided the split was), Middle-Candle Body (displacement conviction), and Absorption (wick-rejection volume). The result maps to a tier word rendered inside the zone — WEAK · SOFT · FAIR · HIGH · PEAK — and to a star read on the dashboard. Read it as a confluence / cleanliness rank: how textbook the imbalance is, not a guaranteed outcome.
🎯 Shaded Zones + Order-Flow Split Bars. Each zone is a maroon (bearish) or dark-green (bullish) shaded band, opacity graded by strength, with the tier word spelled across gradient cells and a timeframe / confluence badge pinned to it. To the right of price, a two-bar order-flow split renders the bearish percentage (maroon) over the bullish percentage (dark green), and a stat label prints net delta, total volume and relative volume — so the participation behind every level is visible at a glance and factored into how it is graded.
🩶 Self-Invalidation + Filled History. Zones extend forward and re-score as price develops. The instant price mitigates a zone — by Touch, 50% fill, or full fill, your choice — it is neutralized: recolored to a muted dark-grey and frozen, so a filled level reads as spent context, never as a live signal. A history cap keeps grey levels from accumulating into clutter, and you can drop filled zones entirely for a strictly-live view.
📊 Live Multi-Timeframe Dashboard. A compact institutional panel tracks, in real time on your chart: a per-timeframe grid — active bull and bear zone counts plus directional bias for each of your three timeframes; Key Zones — the strongest zone, plus the nearest zone above and below price, each with its timeframe set and star score; Flow Pressure — aggregate FVG net delta with an ACCUM / DISTRIB regime read, live chart delta, relative volume, CVD bias and session; and running active / confluence / filled counts. It is a live read of the engine's current state on your symbol — not a backtest and not a printed statistic.
🎚️ Declutter & Conviction Controls. A tight set of dials governs how busy and how selective the chart is: Min Strength filters out weak imbalances; Merge Distance (×ATR) sets how aggressively overlapping zones fuse; Max Zones caps the live set; the mitigation rule and filled-history toggle decide how decisively price must close through a level and whether history stays; and the universal-height and flow-bar dimensions tune density. Tighten for a clean, high-conviction map; loosen for full structural context.
🎨 Clean Themed Visuals. A dark institutional palette built around maroon and dark green — the classic imbalance / order-flow color language — colors the zone bands, tier cells, flow bars, badges, labels and dashboard into one coherent look, so class and conviction read at a glance. Every zone, bar and mitigated color is exposed as an input, so you can match the scheme to your chart.
🔔 Alerts. Fires on a new bullish MTF FVG, a new bearish MTF FVG, and any new MTF FVG — formatted for manual or automated use — so you can be pinged when a fresh imbalance forms rather than watching the chart.
🔧 Fully Customizable. Every component is exposed: the three timeframes and direction toggles; the ATR / percent gap filter and ATR length; universal-height mode and size; all six strength weights, the min-strength gate and the relative-volume baseline; merge distance and confluence bonus; the mitigation rule and filled-history tone; every zone, bar and mitigated color; badge, tier-word, flow-bar and stat-label visibility and dimensions; extend length and max zones; and dashboard position and size.
🎯 Why this is different. Most FVG tools draw every three-candle gap as an identical box and leave interpretation to you — a gap that formed on violent one-sided displacement looks exactly like a thin, low-conviction one, and three timeframes worth of gaps stack into an unreadable ladder. This engine reads the order flow behind each gap, scores it 0–10 on six flow-native factors, fuses agreeing timeframes into a single labeled Confluence zone, normalizes every level to one height, re-scores it on development, and neutralizes it the instant it fills — then surfaces the whole multi-timeframe rationale on a live panel. You are looking at classified, ranked, self-invalidating imbalances with the order-flow reasoning attached, not an undifferentiated field of boxes.
🚀 Where to use it. Symbol- and timeframe-agnostic — it runs on forex, indices, metals, crypto and equities across intraday and higher timeframes. Because the score and split use volume, it is sharpest on instruments where volume is meaningful; the range-position delta model is specifically built to keep working on tick-volume instruments like gold and FX, where lower-timeframe intrabar data is unavailable, and it degrades gracefully rather than failing. Keep the chart timeframe at or below your lowest selected zone timeframe for full detail; larger timeframes yield fewer, more significant zones, smaller ones a more reactive map.
🎯 How to trade it. Apply it to a liquid instrument and let the zones and dashboard populate. Read the per-timeframe bias and Flow Pressure for the prevailing order-flow lean, and favor high-strength and Confluence zones — where multiple timeframes and the delta agree — over isolated single-timeframe gaps. Treat each zone as a decision level: plan entries on a controlled retest into the band, define invalidation by the same decisive close-through that neutralizes the zone on the chart, and manage targets against the next opposing zone or your own R model. Use Min Strength, Merge Distance and Max Zones to set chart density — stricter for a clean, high-conviction map, looser for full structure — and use the star score to focus on the cleanest imbalances.
⚠️ Important — this is a decision-support tool, not a standalone buy/sell system, and it makes no performance guarantees. The order-flow read is a volume-delta estimate derived from price geometry — and, on many instruments, from tick volume — not true exchange order flow or bid/ask tape; treat it as a well-behaved approximation, not the book. The 0–10 score is a confluence / cleanliness rank that describes how textbook an imbalance is; it is not a probability or a promise of outcome, and the dashboard is a live read of the engine's current state, not a backtest or forecast. Zones confirm on closed higher-timeframe bars, so they print with the built-in confirmation lag and you should always wait for a settled level. Always pair it with higher-timeframe context, your own analysis, and disciplined risk management, and test it on your market and timeframe before trading it live. Indicator

Price Action Breakout Trend [QuantAlgo]🟢 Overview
Price Action Breakout Trend is a trend-following indicator built on structural range breakouts rather than moving average crossovers or oscillator thresholds. It tracks the highest high and lowest low of a defined lookback window to establish the levels price must decisively clear to confirm a directional shift, anchoring a trailing stop that ratchets in the trend's direction and reverses only when price breaks through it, helping traders distinguish genuine trend continuation from the shallow pullbacks that punctuate every sustained move across all timeframes and markets.
🟢 How It Works
The foundation of the indicator is the range defined by recent price extremes. On each bar it references the highest high and lowest low of the prior lookback window, excluding the current bar so the reference range is locked in before price interacts with it:
prior_high = ta.highest(high, lookback)
prior_low = ta.lowest(low, lookback)
These two levels frame the breakout boundaries. Rather than reacting to every marginal touch, the indicator lets you define what qualifies as a genuine break through the confirmation setting, which determines whether the closing price or the full bar extreme is tested against the trailing stop:
test_down = confirmation == 'Close' ? close : low
test_up = confirmation == 'Close' ? close : high
From these, a single trailing stop is maintained on the active side of the trend. While the trend holds bullish the stop ratchets upward, advancing to track the rising lookback low and never loosening, and the trend reverses the moment the tested price breaks below it:
if trend == 1
trail := math.max(trail, prior_low)
if test_down < trail
trend := -1
trail := prior_high
On that reversal the stop immediately re-anchors to the opposite extreme, flipping above price to begin trailing the new downtrend, where the mirror of this same logic ratchets the stop lower and flips the trend back to bullish once price breaks above it. Because the reversal is triggered by the same stop price has been trailing, the line is not a passive overlay but the actual decision boundary, with no separate signal calculation sitting behind it. This makes the indicator a continuous stop-and-reverse system that always holds a committed direction, retaining its bullish or bearish reading through every pullback contained within the range until price clears the trailing level.
🟢 Signal Interpretation
▶ Bullish Trend (Green): When price breaks above the trailing stop and the trend flips up, the indicator enters bullish mode with green coloring applied across the stop, gradient fill, and breakout levels. The stop sits below price and ratchets higher as the trend develops, and the reading holds through pullbacks that stay above it. The flip into green, marked by an up triangle beneath the bar, identifies a potential long/buy opportunity, with subsequent pullbacks toward the rising stop offering potential continuation entries while the trend remains intact.
▶ Bearish Trend (Red): When price breaks below the trailing stop and the trend flips down, the indicator enters bearish mode with red coloring across all visual elements. The stop sits above price and ratchets lower as the decline extends, holding bearish through rallies that fail to reclaim it. The flip into red, marked by a down triangle above the bar, identifies a potential short/sell opportunity, with rallies back toward the falling stop offering potential continuation entries on the downside.
🟢 Features
▶ Preconfigured Presets: Three parameter sets cover different trading approaches. "Default" targets swing trading on 4-hour and daily charts with a 10-bar lookback and close-based confirmation, filtering marginal breaks while staying responsive to genuine shifts. "Fast Response" shortens the lookback to 5 bars and switches to wick-based confirmation for intraday charts, where the trend needs to flip as soon as price trades beyond a recent extreme. "Smooth Trend" extends the lookback to 25 bars with close confirmation for position trading on daily and weekly timeframes, where the cost of a false flip exceeds the cost of a delayed one. Selecting a preset overrides the individual lookback and confirmation inputs.
▶ Built-in Alerts: Three alert conditions cover all directional states. "Bullish Breakout Signal" fires on the bar where the trend confirms bullish. "Bearish Breakout Signal" fires on the bar where it confirms bearish. "Any Breakout Signal" combines both into a single condition for traders who want a unified notification regardless of direction.
▶ Visual Customization: Six color presets (Classic, Aqua, Cosmic, Cyber, Neon, and Custom) apply coordinated bullish and bearish schemes across the trailing stop, gradient fill, breakout levels, markers, and optional bar and background coloring. Independent toggles control each visual layer, so the trailing stop line, the gradient fill that ramps from the stop toward price, the triangle markers printed on each flip, and the underlying breakout levels that frame the active range can each be shown or hidden without affecting the others. Bar coloring tints price candles with the active trend color at a configurable transparency, and background coloring extends the directional tint across the full chart pane. Both are disabled by default and controlled independently.
*Tips: Layer the Price Action Breakout Trend with complementary analysis rather than treating it as a standalone trading tool. Breakouts hold most reliably when backed by participation, so combine each flip with volume context, since a break on expanding volume is far more likely to sustain than one on thin flow, and read the level being cleared against market structure, as a breakout through a well-established swing high or low carries more significance than one in open space. Pairing this script with volume, open interest, CVD, market structure, and mean reversion indicators from our QuantAlgo toolkit can further validate a breakout before entry. Indicator

KRT Kalman Regime Tricolor# 📊 KRT — Kalman Regime · Tricolor
**Designed and statistically validated for 🥇 GOLD and Ξ ETHEREUM.** A regime compass, not a buy signal: KRT reads the market on three layers — background regime, trend, your candle — and shows you which way the wind blows at every moment: 🟢 long · 🔴 short · 🔵 wait.
**⚡ ZERO lookahead, ZERO repaint.** Every signal appears in real time using only the information available at that moment, and whatever is printed at a bar close never changes afterwards. Many indicators look perfect because they quietly redraw the past — KRT is built for the opposite: what you see in replay is exactly what you would have seen live.
## ⚡ Quick start (30 seconds)
The colored BACKGROUND = the underlying regime.
Green 🟢 = bull regime installed → longs carry. Red 🔴 = bear regime installed → shorts carry. No color = no regime → caution.
The CURVE trails price like a stop line: below the candles in an uptrend, above them in a downtrend. Price crossing the curve = the reversal.
The curve's intensity = the strength of the authorization.
BRIGHT = trend aligned with the regime. Pale = secondary bias only. Blue = wait.
THE MARKERS — one single rule:
SOLID green or red marker (big triangle OR diamond) = GO. Blue = wait. Small = provisional.
🟢▲ / 🔴▼ BIG triangle — GO: reversal confirmed AND regime aligned.
🟢◆ / 🔴◆ Diamond — Deferred GO: the regime installs while the trend already points that way (often follows a big blue triangle). Same strength as a big colored triangle.
🔵▲ / 🔵▼ BIG blue triangle — reversal confirmed but no regime behind it → wait (a diamond will tell you if it becomes a GO).
▵▿ Small triangles (any color) — early alerts on your chart, ahead of confirmation. Provisional.
No thinking required: solid + colored = apply your strategy · blue = patience · small = not yet.
Drop it on gold or Ethereum, chart timeframe 5m–15m. Run YOUR strategy on top: KRT gives the direction, you handle entries, stops and exits.
## ⚠️ Before you use it
This is an indicator, NOT a strategy: it provides no entry or exit points.
Validated with permutation tests on gold and Ethereum. On Bitcoin the detection displays but the statistical edge is not demonstrated; on major forex pairs it is absent. Test it yourself before using it elsewhere.
The background regime changes slowly (weeks): that is by design — it filters, it does not scalp.
## 🔍 Understanding the display (going deeper)
THE THREE LAYERS
Regime (background, default 8H) — a slow Kalman trend filter with hysteresis: the background only colors once the regime is installed (default 3 days, adjustable). Locked at its own bar close: it does not flicker and does not repaint.
Trend (curve, default 1H) — the exact price level that would flip the trend filter, computed in advance: the distance between price and curve measures the strength of the trend.
Your candle (the chart) — the curve is monitored at your chart's granularity: you see the flip before the 1H close (small triangles), the close confirms it (big triangles).
HOW TO READ IT
Green background + bright green curve + GO = every layer agrees: the most favorable long context. Mirror in red for shorts.
Pale green curve = uptrend without an installed regime — weak bias.
Pale red curve = intraday "breather" (recurring windows of weakness inside an uptrend) — a short-lived bias, not an invitation to swing short.
Blue = no statistical edge. The best trade is often no trade.
After a bullish GO, price often retests the curve before continuing: aim for the retest rather than the impulse.
TIMEFRAMES & SETTINGS
Chart from 1m to 1H (5m–15m recommended).
Trend TF / Regime TF: the only settings an advanced user may change (swing trading: 4H/D).
Regime installation age (default 72h): higher = rarer, more reliable background; lower = more reactive, more false regimes.
Everything else (q values, thresholds, windows): the calibrated and validated core of the model — keep the defaults.
---
KRT is a decision-support tool based on historical data. Past performance does not guarantee future results. Manage your risk. Indicator

ICT Sessions & Killzones - Asia London NY + Liquidity[LunqFX]ICT Sessions & Killzones is a modern smart-money session indicator for PulseWire that maps the three global trading sessions — Asia, London and New York — as clean, colour-coded ranges and, unlike most session tools, automatically detects liquidity sweeps: the exact moment price raids a previous session's high or low and rejects it. It turns the daily rhythm of the market — the ICT killzones, session opens, and the liquidity pools left behind — into a clear, actionable map. Works on forex, crypto, indices, futures and gold (XAUUSD), on any intraday timeframe. Built in Pine Script v6. Keywords: ICT, killzones, sessions, Asia session, London session, New York session, liquidity, liquidity sweep, stop hunt, smart money concepts, SMC, session high low, opening range, forex, crypto, day trading, scalping.
◆ WHY SESSIONS MATTER
Price does not move randomly — it moves in sessions. Asia sets the range, London expands it, New York reverses or continues it. The highs and lows each session leaves behind become liquidity pools — resting stop orders that smart money targets. Knowing where those levels are, which session is active, and when a level gets swept is the core of session-based and ICT trading. This tool puts all of that on your chart automatically.
◆ WHAT IT DRAWS
Session boxes — Asia (violet), London (teal) and New York (gold) ranges drawn automatically from each session's high and low, kept across history so you can study the pattern.
Previous-session liquidity levels — the last completed session's high and low extended forward as dashed lines. These are the magnets price hunts next.
Liquidity sweep markers — a compact, colour-coded arrow (▲/▼ with the session code A / L / NY) printed when price wicks beyond a prior session extreme and closes back inside — a real stop-raid / rejection. Hover any marker for the full detail.
Neon gradient candles — turquoise up / magenta down, intensity scaled by momentum.
◆ THE LIVE DASHBOARD
A clean, colour-railed panel that reads the sessions at a glance:
Active session — which session is open right now (● marks any that are live; London and New York overlap in real hours, so both can be active).
Range per session — each session's high–low.
Range in pips — how far each session actually moved.
★ Widest range — the session that dominated the day (the "power session").
Timezone readout, fully themeable, adjustable text size.
◆ HOW IT WORKS
Every bar is assigned to a session from its own timestamp (no repainting from higher-timeframe data). The session's running high and low build the box in real time. When a new session opens, the previous session's extremes are locked in as liquidity levels. A liquidity sweep is flagged only when price trades beyond a prior session's high/low and then closes back inside it — a genuine rejection — so a clean break straight through does not trigger a false signal. This keeps the chart clean and every sweep meaningful.
◆ HOW TO USE IT
Trade the killzones. The London and New York opens produce the biggest, cleanest moves — focus your entries there.
Use prior session highs/lows as targets. Untapped levels act as magnets; price often runs them before reversing.
Fade or follow sweeps. When a sweep prints, the raid has taken liquidity — fade it back into range, or trade the reversal in the opposite direction.
Read the dashboard for context. Know which session is active and which had the widest range before you commit.
Set your times/timezone. Adjust each session's hours and the timezone in the settings to match your market and broker.
Combine with your own market structure, order blocks or bias for higher-probability confluence.
◆ SETTINGS
Session times & colours (Asia / London / New York), timezone, session boxes (soft fill or outline), previous-session levels with adjustable extension, liquidity sweep markers, neon candles, and a dashboard (show/hide, position, text size, background).
◆ ALERTS
Liquidity sweep — fires when any previous-session high or low is swept.
◆ LIMITATIONS
Sessions are an intraday concept — use a 1m to 4h timeframe. On daily or higher the panel shows a reminder and no sessions are drawn.
Default session times are in GMT; set the timezone and hours to match your instrument and broker feed, as session boundaries vary by symbol.
A liquidity sweep shows that a level was raided and rejected — it is context and confluence, not a standalone buy/sell signal.
Session ranges reflect the data of your chart's feed; different brokers can differ slightly.
◆ ORIGINALITY & NON-REPAINTING
Original work — the session engine, the rejection-based liquidity-sweep detection, the previous-session liquidity levels and the dashboard are all my own implementation; no third-party code is used. Sessions and levels are built from each bar's own timestamp with no higher-timeframe lookahead, so a sweep printed on a closed bar stays.
Educational analysis tool, not financial advice. Trading involves risk. Always do your own research and manage risk. © LunqFX. Indicator

Aquila Price Levels - Multi-Timeframe Institutional Levels 🦅 Aquila Price Levels - Multi-Timeframe Institutional Levels
The "Aquila Price Levels v1.1" script is a structural analysis tool developed to simultaneously map and visualize critical price levels across Daily (D), Weekly (W), and Monthly (M) timeframes directly on the operational chart.
The Importance of a Unified Visualization (Single Board):
Having a comprehensive overview of macro and micro levels in a single interface is critical for reading Order Flow and market structure. This centralized approach eliminates noise and the constant need to switch timeframes, allowing the user to:
Identify Confluences: Highlights zones where levels from different timeframes (e.g., Previous Week High and Current Daily Open) intersect, defining high-probability order blocks.
Map Liquidity: Makes external liquidity targets (PDH, PDL, weekly and monthly highs/lows) immediately visible. These are the primary targets exploited by algorithms and institutional players for positioning.
Define the Bias: Evaluating the real-time price position relative to macro Opens provides an objective reading of both short-term and long-term directional bias.
Manage Equilibrium Areas: Tracking the medians (H+L)/2 provides constant reference points for mean reversion setups.
Main Features:
Multi-Timeframe Tracking (Current & Previous): Automatic calculation and plotting of Open, High, Low, Close, and Median for the day, week, and month (both currently updating and previously consolidated).
Smart Label Management: The system dynamically groups labels on the horizontal axis if levels fall within a configurable tolerance threshold, preventing visual overlapping on the chart.
Summary Table (Dashboard): An integrated visual matrix (freely positionable) that summarizes the exact numerical values of all D/W/M levels, acting as an immediate control panel.
Operational Tooltips: Hovering over the price labels provides technical descriptions of the level's significance (e.g., directional watershed, macro wall, liquidity trap).
UI Customization: Total control over line thickness, styles, opacity for current periods, and label offsets.
Practical Application:
Particularly optimized for highly technical and volatile assets like XAUUSD (Gold), where millimeter precision on historical liquidity grabs and reactions to macro levels dictates the profitability of the operational setup.
🦅 Royal Eagles - Born to fly, born to dare. Indicator

Monotonic Trend Consensus [QuantAlgo]🟢 Overview
Monotonic Trend Consensus is a trend-following oscillator built on rank correlation between price and time rather than moving averages or crossovers. It scores how consistently price is ordered across multiple lookback windows and combines them into a single bounded reading on a -1 to +1 scale, holding the same meaning on any symbol or timeframe so traders can separate a broadly aligned trend from directionless noise and read when a move has stretched to saturation.
🟢 How It Works
The foundation is Spearman rank correlation between price and time, computed over each active window. Closes inside the window are ranked against one another, time forms its own rising sequence of ranks, and the difference between the two collapses to a single coefficient (rho):
float price_rank = less + (eq + 1.0) / 2.0
float time_rank = float(len - i)
float rho = 1.0 - 6.0 * sumd2 / denom
The coefficient reads +1 when each bar closes above the last in unbroken order, 0 when there is no consistent order, and -1 when each bar steps lower. Because it scores ordering rather than smoothing price into a line, it reflects the current window directly rather than trailing behind it, though it still needs a full window of bars to form. Ranking also limits the pull of any single outlier bar, and the bounded output is what lets one threshold hold across markets without rescaling.
A single window describes direction; the tool runs several and averages them into a consensus spanning fast, medium, and slow horizons:
consensus := array.avg(rhos)
Agreement is then measured as the share of windows leaning the same way as the consensus, and this conviction figure must clear a floor before a direction prints, working alongside the strength threshold:
conviction := 100.0 * agree / active
raw_bull = consensus > threshold and conviction >= min_conviction
raw_bear = consensus < -threshold and conviction >= min_conviction
A reading registers only when both clear at once: consensus past the threshold and windows aligned enough to meet the conviction floor. Fail either and the line stays flat. With Show Neutral on, those flat stretches reset to neutral; with it off, the line holds its last direction until the next qualifying move.
🟢 Signal Interpretation
▶ Bullish Consensus (Green): Consensus sits above the upper threshold with enough windows aligned, meaning recent bars are ordered upward across horizons. Trend traders read the turn into green as a possible long or continuation as the score presses toward +1. Mean-reversion traders treat a reading pinned near +1 as a stretched, broadly-agreed advance rather than a buy, and look to fade only once the line rolls back off the extreme, since the score can hold high through a sustained trend.
▶ Bearish Consensus (Red): Consensus sits below the lower threshold with conviction met, with bars ordered downward across horizons. Trend traders read the turn into red as a possible short or continuation as the score presses toward -1. Mean-reversion traders treat a reading pinned near -1 as a saturated decline where a bounce becomes more plausible, and look to fade on the turn back up rather than at the low itself.
▶ Neutral (Gray): With Show Neutral on, the line goes gray whenever no direction qualifies, either because consensus sits inside the threshold or conviction falls short. The zero line acts as the balance point and behaves like support or resistance for the reading itself: a score rejected at zero from above points to bullish order reasserting, a score capped at zero from below points to bearish order holding, and a clean break through leans toward a regime change. Reading this midline behavior against price is where market structure tools pair well, separating a base building above a structural level from a coil forming under overhead supply. Trend traders stand aside until the line commits; mean-reversion traders find less to work with here than at the edges.
▶ Reading the Extremes: The axis caps at +1 and -1, marking maximum agreement across every active window. Trend traders take an extreme as a sign a move is still in force; mean-reversion traders take it as a stretched zone and watch for the score to turn back toward zero as agreement breaks. An extreme that aligns with a known structural level gives a fade a cleaner reference than one in open space, and neither read holds on the extreme alone, since a strong trend can stay saturated before it cools.
🟢 Features
▶ Preconfigured Presets: Three setups map to different holding styles. "Default" suits swing work on 4-hour and daily charts, pairing a mid-range window spread of 8, 13, 21, and 34 with a 0.35 threshold and a 60% conviction floor, so a direction needs both strength and agreement before it flags. "Fast Response" pulls the windows in to 5, 8, 13, and 21 and eases the threshold and conviction floor so the reading keeps pace with quicker intraday swings. "Smooth Trend" stretches the windows out to 21, 34, 55, and 89 and raises both gates for daily and weekly position trading, where a premature flip costs more than a late one. Choosing a preset takes over the manual window, threshold, and conviction fields.
▶ Built-in Alerts: Four conditions track every change in state. "Bullish Trend Signal" triggers when the consensus confirms to the upside. "Bearish Trend Signal" triggers when it confirms to the downside. "Trend Lost / Neutral" triggers when an active direction fades back to flat, which is also the event a mean-reversion trader watches for after an extreme. "Any Trend Change" rolls the two directional events into a single notification for anyone who wants one alert covering both ways.
▶ Visual Customization: Six color schemes (Classic, Aqua, Cosmic, Cyber, Neon, and Custom) carry a matched pair of bullish and bearish colors through the consensus line, its tiered gradient fill down to the zero baseline, and the optional bar and background tints. Marker lines sit at the positive and negative trigger levels to show the zone the consensus has to cross, and each window's own score can be switched on as a faint backing line so you can see which horizons are driving or dragging the combined figure. Bar coloring paints the price candles in the active trend color at an adjustable transparency, while background coloring spreads that tint across the pane.
Indicator
