Liquidity Heatmap 3D - Volume Density POC CVDLIQUIDITY HEATMAP 3D — the order-flow heatmap look, rebuilt for TradingView.
This indicator brings the volume-density heatmap visual to any TradingView chart, with a twist no other heatmap here has: a real 3D relief shader. Instead of flat colour tiles, every cell is lit by a virtual light source (emboss lighting computed in the colour math), and the strongest liquidity walls extrude as 3D blocks with shaded side faces and lit top caps.
━━━ HOW IT WORKS ━━━
TradingView provides no order book and no historical tick data, so this is an honest volume-density heatmap: each bar's volume is distributed across the price zones its range covered. Dense zones are the liquidity walls where the market actually spent volume. The engine normalises against the 85th percentile of the column maxima, so one hot spike never blanks out the rest of the map.
━━━ WHAT IS ON THE CHART ━━━
· Heatmap grid up to 22 x 28 zones, rebuilt live on every bar
· 3D RELIEF SHADER — emboss lighting, specular glints on the wall tops, adjustable strength
· 3D WALL EXTRUSION — the strongest cells pop out as shaded blocks (toggle)
· 7 PALETTES — GOLD 3D (default), TWILIGHT, FIRE & ICE (buy/sell split), OCEAN, INFERNO, EMERALD, MONO
· POC LINE — the highest-volume price of the window, with its volume readout
· WALL DETECTION — the two strongest active liquidity walls, labelled with their strength in percent
· VOLUME PROFILE — profile bars on the right, POC highlighted in gold
· TRADE BUBBLES — volume-spike bubbles sized by their ratio against the average, buy blue / sell magenta
· CVD STRIP — cumulative volume delta (bar proxy) along the bottom, mint and red
· COCKPIT PANEL — engine checklist, POC box and a BUY / SELL flow signal line
· Optional dark chart theme: navy background with mint / red bars
━━━ HOW TO USE IT ━━━
1. Watch the golden walls: price often reacts at dense volume zones — support and resistance built by traded volume rather than by drawn lines.
2. The POC is the fairest price of the window and acts as a mean-reversion magnet in ranges.
3. CVD rising while price holds a wall below it is an absorption long idea; CVD falling at a wall above is a distribution short idea.
4. Bubbles mark the bars where outsized volume hit. Combine them with wall touches for confluence.
━━━ SETTINGS ━━━
Grid size, bars per column, cutoff, gamma, tile transparency, relief strength, wall threshold and bubble threshold are all adjustable. Works on every symbol and timeframe; if a symbol carries no volume the engine falls back to time-at-price density and says so in the panel.
━━━ HONEST LIMITS ━━━
This is not level-2 order book data — TradingView does not provide it. The map shows where volume actually traded, not resting limit orders. The 3D effect is a rendering technique, not extra data.
━━━ NOTE ON LOADING ━━━
Right after adding the indicator, or after changing a setting, give it a few seconds: the engine creates its object pools and runs the first build. A brief flicker during that warm-up is normal and stops once the first refresh is done. After that the persistent engine updates in place with no flicker.
Open source — read it, change it, learn from it. This indicator is a study tool, not financial advice.
WHY THESE PARTS BELONG TOGETHER
The heatmap, the point of control and the cumulative delta strip are three views of one question:
where is volume sitting, which price is defending it, and who is doing the trading. The heatmap
shows the distribution, the point of control marks its centre of gravity, and the delta strip says
whether that distribution is being built by buyers or sellers. Read on their own each of the three
is ambiguous; read together they describe one order-flow picture.
Indicador

Range Budget [AFD]
Range Budget answers one question at a glance: **how much of a
typical session's range has today already used?**
A day that has spent 40% of its typical range and a day that has spent 130% are different trading environments. This indicator measures which one you are in, from this chart's own price history, and says so in one number, onecolour, and one word.
###What it does###
- **Headline percentage** — today's realized range so far, divided by thetypical completed-session range. Never clamped: a wide day reads 130%, not100%.
- **State word and meter** — ROOM → PAST HALF (50%) → NEAR FULL (80%) → OVER
TYPICAL (100%). The word, the meter and every state colour come from the same thresholds, so they cannot disagree.
- **Envelope levels** — session low + typical range, and session high − typicalrange, drawn as glowing lines with a gradient band between them. Aconditional identity, not a projection: IF the session finishes at itstypical size AND the low holds, the high lands exactly on the upper level. Once the day crosses its typical range, the levels take the state colour.
- **Percentile ladder** (optional) — where a finished day of each size (p25 /p50 / p75 / p90 of the lookback window) would top out, measured up fromtoday's low. Nearest-rank percentiles: every rung is a session range thatactually occurred, never an interpolation.
- **Dashboard** — distance left to (or past) typical in both price points andpercent, how many of the last N sessions ran wider than typical, and optional detail rows (range so far, typical range, percentile standing,widest/narrowest, envelope and ladder values). Compact by default; everycryptic cell explains itself on hover; the whole panel can be switched off.
###How it works###
- **Typical range is user-selectable**, and the chart always names the activestatistic:
- **ADR** — the average of the last N completed session ranges (high − low).
- **ATR RMA** — the average true range, so overnight gaps count. Seeded withthe first true range rather than an initial SMA, which is why it is labelled "ATR RMA" and will not match `ta.atr()` to the last digit. Under ATR the numerator is the live session's true range too, so the percentageis never a ratio of two different measures.
- **Median** — the middle completed session range, which is also theladder's p50 rung.
- The three are identical on a symbol that never gaps and diverge as gaps grow — on heavily gapping symbols ATR can run near 2.5× ADR. That is why the choice exists and why the active one is named on the chart.
- **Completed sessions only.** The live day never feeds its own denominator —a partial day would drag the typical range down as the day progressed and bias the percentage upward with no symptom. Statistics update when a session completes; the live day contributes only its running range.
- **One session rule for everything.** Regular hours or regular + extended:history and the live day follow the same rule, and if the filter cannot change anything on your chart (no extended-hours bars loaded), the dashboard says so instead of staying silent.
- **The sample is what your chart holds.** n is capped by the sessions actually loaded — roughly 64 completed regular-hours sessions on a 5-minute chart from 5,000 bars on a Basic plan, more on higher plans and higher timeframes. The dashboard shows the n actually in use, plus a spread figure ((p90 − p25) ÷ p50) that says whether recent sessions were similar in size
or mixed.
- Eleven plotted values sit in the Data Window (percentage, ranges, envelope percentiles, sample size and more), so every number on the panel can be read, checked and exported.
###How to use it###
1. Add it to a liquid intraday chart. The defaults are the intended reading: compact dashboard, ADR(20), regular hours.
2. Read the headline first. ROOM means the day is still small next to its recent finished sessions; OVER TYPICAL means it has already run further than a typical one.
3. Use the envelope as context for the day's remaining room under the stated conditions — the tooltip on every input spells those conditions out.
4. Turn on the ladder to see today against the whole recent distribution instead of one average: price between p50 and p75 means today has already matched a mid-sized finished day.
5. Hover the bottom row of the dashboard whenever a figure is unclear — the statistic, the sample and any active caveat (gap counted, filter inert, no completed session yet) are explained there.
###What it deliberately does not do###
**Realized range from OHLCV — not an implied or expected move.** Every number is measured from this chart's own price history. Nothing comes from options pricing, and the typical range describes completed sessions — a description of what happened, not a statement about what happens next.
- No alerts, no signals, no entries or exits.
- Counts stay counts — "Sessions over typical: 4 of last 20" describes this chart's history, and the indicator never converts a count into odds.
- The percentage is never capped at 100%, because a day past its typical range is the most informative reading the tool produces.
###Why it is original###
Range tools usually hand you one number (an ADR level pair) or one overlay (an ATR band). Range Budget treats the session range as a budget and reports its consumption: one percentage against a user-chosen, chart-named statistic, computed from completed sessions only, with its sample size, its spread and every degeneracy disclosed on the panel itself. The three statistics are not interchangeable and the tool is built around that fact rather than hiding it: the active one is named on the chart, the ATR path measures true range on both sides of the ratio, and the ladder shows the whole recent distribution so one average never has to stand in for it.
Open source under the Mozilla Public License 2.0. All calculations are native
Pine v6 — no security() calls, no external data. Indicador

Pressure Transfer ZoneMany reversal indicators tell you when a market looks stretched. Pressure Transfer Zone asks a harder question: when price returns to the extreme, can the side that drove it there still make meaningful progress?
This indicator was built to identify a specific form of failed continuation. It waits for a strong directional drive, a real retreat, and then a second attempt at the extreme. If that second attempt makes little progress and closes with clear rejection, the script freezes the structure into a decision zone. From there, price must prove that control has actually transferred before a signal is confirmed.
The goal is not to call every top or bottom. The goal is to isolate the moments when a mature move may be losing control, show that process directly on the chart, and give the trader clear confirmation and invalidation levels.
WHO IT IS FOR
Pressure Transfer Zone is designed for intraday, swing, and position traders who use price action and want a more disciplined way to evaluate exhaustion, failed breakouts, failed continuation, and early reversals.
It is designed for liquid stocks, futures, forex, and cryptocurrency on standard candlestick charts. The engine does not run on Heikin Ashi, Renko, or other synthetic chart types because their prices can distort the structure being measured.
THE IDEA BEHIND IT
A strong trend does not end simply because price is overbought, oversold, or extended. Strong moves can remain extended for a long time. What matters is whether the original side can still produce results when it gets another opportunity.
The pattern develops in five stages:
1. A mature directional drive establishes real displacement.
2. Price makes a meaningful retreat away from the extreme.
3. The original side returns for a second attempt.
4. That second attempt produces limited progress and a weaker close.
5. Price confirms the transfer with a qualified break of the selected boundary or, in Sniper mode, with that break followed by a successful first retest.
This is an effort-versus-result test expressed entirely through price. The script does not claim to measure order flow, bid/ask delta, institutional activity, hidden liquidity, or volume pressure.
HOW THE MATHEMATICS WORKS
The first filter is directional efficiency:
Directional efficiency = net directional change / total absolute bar-to-bar movement
A clean drive that travels mostly in one direction receives a higher score. A noisy move that covers a lot of distance but makes little net progress receives a lower score.
The selected Source is used for net displacement and path efficiency. The zone itself is always built from confirmed OHLC prices.
The drive must also meet volatility, range, closing-location, and local-extreme requirements. Under the default pace profiles, it must:
* Produce at least 1.25 ATR of net directional displacement.
* Span at least 2.00 to 2.50 ATR, depending on the selected pace.
* Meet a directional-efficiency threshold of 0.40 to 0.48.
* Close in the outer 28% of the drive range.
* Create a fresh local extreme.
ATR is measured with a 14-bar lookback and frozen when the sequence begins. This prevents later volatility changes from moving the event’s established thresholds.
The retreat must travel at least the greater of 0.55 ATR or 18% of the original drive range, and the closing price must confirm that full retreat distance.
When price returns to the extreme, the second attempt must show deterioration. By default:
* Price must return to within the greater of 0.30 ATR or 8% of the original drive range from the first extreme.
* New progress beyond the first extreme cannot exceed 0.20 ATR.
* The second push cannot exceed 72% of the original drive range.
* The close must migrate away from the first attempt by at least 0.10 ATR.
* Rejection must equal at least the greater of 0.25 ATR or 25% of the developing zone.
* The rejection bar must close within the directional outer 45% of its range.
* The completed zone cannot exceed 60% of the original drive range.
Together, these filters are intended to remove many one-candle reactions, shallow pauses, and weak two-test formations. The model wants to see a legitimate first drive, real separation between attempts, and measurable deterioration on the return.
THE ZONE
Once the second attempt qualifies, the structure is armed and its levels are frozen:
* Outer edge: the most extreme price reached by the two attempts.
* Inner edge: the counter-extreme formed between the two attempts.
* Midpoint: the halfway point of the zone.
* Invalidation: 0.15 ATR beyond the outer edge in the direction of the original move.
For a bullish setup, price must transfer upward after a mature downward drive. For a bearish setup, price must transfer downward after a mature upward drive.
Invalidation requires a confirmed close beyond the buffered outer edge. The invalidation level is structural information, not an automatic stop-loss recommendation.
ENTRY TIMING
Early
Confirms on a qualified close through the zone midpoint. This is the fastest mode and can trigger on the same confirmed bar that arms the zone. It offers earlier recognition with a greater risk of false starts.
Balanced
Confirms on a later qualified close beyond the structural inner edge. Balanced is the default middle ground between earlier recognition and additional structural confirmation.
Sniper
Requires a qualified break of the inner edge followed by the first later retest of that level. The retest must remain shallow and close back in the transfer direction. The first retest decides the setup; a failed first retest cannot become a signal later.
The breakout candle must move in the transfer direction, span at least 0.35 ATR, have a real body covering at least 45% of its range, close within the directional outer 32% of the candle, and finish no more than 0.45 ATR beyond the selected boundary. The final limit is an anti-chase filter.
A valid Sniper retest must stay within 15% of the frozen zone depth, close at least 0.05 ATR back beyond the inner edge, have a directional body covering at least 35% of the candle, and close within the directional outer 40% of its range.
HOW TO READ THE CHART
With the default color palette:
* Amber: the pattern is still developing. It is information, not an entry signal.
* Violet: the structure is complete, armed, and waiting for confirmation.
* Cyan: the action area between the midpoint and inner edge.
* Green: a bullish pressure transfer has been confirmed.
* Red: a bearish pressure transfer has been confirmed.
* Faint gray: an armed setup failed, expired, or was invalidated.
The right-edge label shows the current phase and the next required action. Once the structure is armed, it also displays the confirmation boundary and invalidation price. A diamond appears only when the selected timing mode produces a confirmed trigger.
When Keep Recent Resolved Zones is enabled, the script retains a limited number of recent successful and failed zones. The default is eight, adjustable from one to twelve, so failures remain visible without overwhelming the chart.
PRACTICAL USE
1. Treat an amber zone as a developing idea, not permission to trade.
2. When the zone turns violet, note its direction, confirmation boundary, and invalidation price.
3. Wait for the exact requirement of Early, Balanced, or Sniper mode.
4. Use the broader trend, nearby support and resistance, liquidity, session conditions, and scheduled news as separate context.
5. Apply your own position sizing, stop placement, targets, and trade-management rules.
ADAPTIVE PACE
Auto mode adjusts the engine according to the chart timeframe:
* Fast: 15-minute charts and below.
* Swing: above 15 minutes through 4 hours.
* Position: above 4 hours.
Fast, Swing, and Position can also be selected manually. The selected pace changes the drive and local-extreme lookbacks, minimum drive size, efficiency threshold, formation lifetime, armed lifetime, and Sniper retest window. It does not change the meaning of the pattern.
ALERTS
The indicator includes five alerts:
* Long Zone Armed
* Short Zone Armed
* Long Pressure Transfer
* Short Pressure Transfer
* Pressure Transfer Invalidated
Create alerts using Once Per Bar Close.
Trigger alerts and chart diamonds use the same confirmed-bar event. If an Early setup resolves on the same bar it arms, the temporary armed alert is suppressed so users do not receive a stale or redundant notification.
CONFIRMED-BAR DESIGN
Actionable signals are confirmed only after the chart bar closes. They are not backdated and do not use future data, pivot backpainting, negative offsets, higher-timeframe requests, or lookahead logic.
Amber developing zones are intentionally provisional and can change or disappear because the pattern is not complete. Once a zone turns violet, its structural prices and invalidation level are frozen for that event.
LIMITATIONS
Pressure Transfer Zone identifies structural-exhaustion candidates, not guaranteed reversals. It tracks one active sequence at a time and can miss fast V-shaped turns that never form two separate attempts.
Strong trends can repeatedly invalidate countertrend setups. Thin markets, price gaps, news shocks, and irregular sessions can also reduce the usefulness of ATR-based thresholds.
This is an indicator, not a strategy. It does not place orders, calculate position size, set profit targets, or claim a win rate. Its job is narrower: determine whether the original directional side returned to the extreme, failed to produce enough additional progress, and then met the model’s confirmation rule at a clearly defined price.
Indicador

Liquidity Hunter | SMC System - Full SuiteA full-sequence Smart Money Concepts strategy that trades the way institutional order flow moves — liquidity sweep, displacement, structure break, and a confirmed retest.
This strategy chains them into the complete institutional sequence: a real liquidity pool gets taken, an impulsive displacement candle breaks structure, a correctly-identified order block gets frozen at that exact moment, and only a genuine retest with confirmation triggers the entry.
Features
The Full SMC Sequence
HTF Bias → Liquidity Pool Taken → Sweep → Displacement Candle → BOS/CHoCH → FVG → Return to OB → Confirmation → Entry — every stage gated on the one before it, so entries reflect genuine confluence rather than a single coincidental signal.
Real Liquidity Pool Tracking
Tracks multiple historical swing highs/lows simultaneously (not just the most recent one), so a sweep can trigger off any untaken pool — mirroring how liquidity actually accumulates at equal highs/lows and older structure.
Displacement Filter
Structure breaks only count as valid if the breaking candle's body exceeds a configurable ATR multiple — filters out slow grinds through a level that aren't genuine institutional impulses.
Frozen-Zone Retest Logic
Once an OB forms, its boundaries are locked/frozen at that moment. Entries reference this frozen snapshot, not a live, potentially-mutated box — with an overlap-based touch test (not a strict "price must sit inside the zone" test) for realistic retest detection.
Configurable Confirmation Filters
After a retest touch, choose from: no confirmation, rejection candle, engulfing candle, close back through the OB, or a break of the retest candle's high/low — tune entry strictness to your risk tolerance.
Higher Timeframe Bias
Optional HTF trend filter ensures you're only taking setups aligned with the dominant trend on a higher timeframe.
FVG Confluence Option
Optionally require that the structure break actually creates a fair value gap — an added imbalance-based confluence layer before a setup is even considered.
Liquidity-Target Take Profit
Choose a fixed R-multiple target, or let the strategy aim at the nearest untaken liquidity pool in the trade's direction — closer to how institutional targets are actually theorized to work.
Risk-Based Position Sizing
Size trades by % risk per trade (scaled to actual stop distance) or flat % of equity, with a hard position-size cap.
Realistic Cost Modeling
Commission and slippage built into the backtest engine from the start.
Notes
Start with requireOBRetest = true and confirmationMode = "None" to validate the base sequence produces trades before layering on stricter confirmation modes.
HTF Bias and FVG Confluence are off by default — each meaningfully reduces trade frequency in exchange for higher-conviction setups; enable incrementally and check trade count after each change.
Works on any intraday or swing timeframe — the sequence logic (sweep → displacement → BOS → retest) is timeframe-agnostic, though displacement thresholds and pool aging windows may need retuning per timeframe.
"Nearest Liquidity Pool" take-profit mode requires active, untaken pools in the trade's direction to function — falls back to the R-multiple target if none exist.
Estratégia

Swing Persistence Profile - Pivot Width SurvivalSwing Persistence Profile ranks every swing high and swing low on the chart by the widest pivot
window it survives. It is also explicit about the exact bar on which that rank becomes knowable,
and it shades the region where it is not knowable yet.
THE IDEA
A pivot is not a property of a bar on its own. It is a property of a bar together with the width
of the window it was compared against. The same high is a swing high when you look two bars either
side, and is not a swing high when you look thirteen. Tools that ask you to pick one width and
then draw the result bury that choice inside a single number.
This script evaluates up to five widths at once - 2, 3, 5, 8 and 13 bars each side by default -
and records, for every bar, the widest width at which that bar is still the extreme of its window.
That number is the bar's persistence depth.
Because widening a window can only add constraints, the widths are strictly nested: a bar that is
the highest of its 13-bar neighbourhood is necessarily also the highest of its 8, 5, 3 and 2-bar
neighbourhoods. Depth is therefore a single ordered rank rather than five separate opinions that
have to be reconciled. A depth-13 swing is a depth-3 swing that kept going.
TIMING
A pivot of width w cannot be identified until w bars have closed after it. That is arithmetic, not
an implementation detail, and it means a bar's persistence depth is not final until the deepest
active width has passed.
There is one further subtlety that most pivot scripts leave in place. The w-th bar after the
candidate is itself still forming while it is the live bar, and its own high or low can still
invalidate the pivot. A script that reads the verdict during that bar will show a marker that
changes, or vanishes, before the bar closes.
This one waits one bar longer. Every verdict it reads comes from a bar that has already closed, so
the confirmation lag is the deepest active width plus one bar. A marker is created once, on the
bar it describes, and is then left alone: it is not moved, recoloured or deleted on later bars,
and it does not flicker intrabar either.
The bars still inside that delay are shaded, so the region where the answer can still change is
visible on the chart instead of being left to inference. Nothing inside the shaded region has been
ranked yet, so an empty shaded region means "not decided," not "no swings here."
WHAT IS DRAWN
A marker on each qualifying swing, placed on the bar that made the extreme, coloured and sized by
depth, optionally printing the depth as a number.
An optional structure line joining swings at or above one chosen depth, alternating between highs
and lows. The most recent segment extends if a later bar sets a more extreme value in the same
direction; once a swing in the opposite direction closes a segment, that segment is fixed.
An optional higher-timeframe reference: the price of the most recent confirmed swing high and
swing low measured on a higher timeframe, drawn as a stepped level. The requested expression is
offset by one bar and the request uses lookahead, which is the pair the Pine Script documentation
specifies for confirmed higher-timeframe values, so historical and realtime bars receive the same
series. The level therefore lags by the reference width plus one bar of the reference timeframe,
and that lag is the point rather than a defect.
Optional alerts on a swing reaching a chosen depth. The alert fires as many bars after the swing
as the deepest active width plus one; the swing itself is on the earlier bar. Because every
verdict is read from a closed bar, "Once Per Bar" and "Once Per Bar Close" fire on the same bar.
THE TABLE
"Swings" counts how many swings reached at least that depth across loaded history, highs and lows
together. "Kept" is the share of the previous row's swings that survived into this row. "Bars ea"
is the average number of bars per swing at that depth. The footer reports the confirmation lag in
bars and how many bars have been rated.
The survival ratios describe the instrument and timeframe you are looking at, not any particular
trade. If most depth-2 swings die at depth 3, the chart is producing many local extremes that do
not extend. If they survive, the same series is producing fewer and longer swings. Comparing that
profile across timeframes or across symbols is a way of choosing a swing width that matches how a
market actually moves, rather than choosing 5 because 5 is a common default.
Counts cover every bar of history the chart has loaded, so they are comparable between symbols
only when the loaded history is comparable.
SETTINGS
Depths in use activates between two and five of the width slots. Reducing it also shortens the
undecided region at the right edge, because that region is as long as the deepest active width
plus one settling bar.
Every depth threshold in the script - minimum depth to mark, minimum depth for the structure line,
and the alert depth - is stated in BARS EACH SIDE, not as a slot number. With the default widths,
"minimum depth 3" means the second of the five slots. A threshold set above the deepest active
width produces nothing, by design.
Enter the widths in ascending order. The ranking itself does not require it, but the table only
reads as a survival sequence when they ascend, and "Kept" can exceed 100% if they do not.
The higher-timeframe reference width is counted in bars of that timeframe: a width of 5 on a daily
reference means five daily bars each side.
WHO IT IS FOR
Anyone who uses swing points as an input to something else - reading structure, choosing the
lookback for a range or a channel, deciding how far back a level should be considered relevant -
and would rather see how sensitive those points are to window width than settle it by habit. It is
also usable as a calibration step before fixing a pivot length in another tool.
WHAT IT DOES NOT DO
It produces no entries, exits, targets, direction or bias, and nothing in it should be read as
one. It measures the geometry of the price series and stops there. Persistence depth describes
what has already happened; a deep swing is not evidence about what happens next.
NOTES
Highs and lows come from the chart series. On non-standard chart types - Heikin Ashi, Renko, Kagi,
Point and Figure, Range - those values are synthetic, and the depths will describe the synthetic
series rather than the market. The script declares alert conditions, so it should be used and
presented on a standard chart type.
TradingView permits 500 labels and 500 lines per script. On long histories the platform drops the
oldest drawings as newer ones are created, so the left edge of a deep history may be bare. This
does not affect the table, which counts every rated bar.
Persistence depth for highs and lows, and the bar index each verdict refers to, are available in
the Data Window. Those values describe the bar named by "Swing bar index," not the bar the cursor
is on.
One data request is made for the higher-timeframe reference whether or not it is displayed, so
enabling it costs nothing extra.
ORIGINALITY
The built-in ta.pivothigh() and ta.pivotlow() functions are used as the primitive, as they are in
a great many scripts. Everything above them is written for this script: running several widths in
parallel, aligning their verdicts onto a common bar so that they can be compared, reducing them to
one nested rank, deferring every drawing until that rank is final on closed data, marking the
region where it is not yet final, and reporting the survival ratios between widths.
Open source under the Mozilla Public License 2.0. The logic is described above in enough detail to
be checked line by line against the source. Indicador

Sigmoid Alpha Bands | NAL1. Overview
Sigmoid Alpha Bands | NAL is an adaptive trend and volatility framework built around a sigmoid-weighted EMA baseline and dynamically adjusted volatility bands.
Instead of smoothing price with a fixed alpha, the indicator modifies its responsiveness using a selected market feed. Momentum, volatility, volume, or price disparity can control how quickly the baseline adapts to changing conditions.
The surrounding bands can also respond asymmetrically to bullish and bearish return shocks. This allows the upper and lower boundaries to develop independently rather than remaining equally spaced around the baseline.
2. Calculation
The indicator begins by selecting the market variable used to control the baseline’s adaptive smoothing weight.
Momentum measures changes in RSI, volatility measures changes in ATR, volume measures changes in smoothed volume, and disparity measures changes in price relative to its EMA.
sigmoidFeed = switch sigFeed
"Momentum" => ta.change(ta.rsi(src, modLen), changeL)
"Volatility" => ta.change(ta.atr(modLen), changeL)
"Volume" => ta.change(ta.ema(volume, modLen), changeL)
"Disparity" => ta.change(src / ta.ema(src, modLen), changeL)
The selected feed is passed through a sigmoid function, converting it into a bounded adaptive weight.
That weight modifies the standard EMA alpha. When the sigmoid weight increases, the baseline can respond more quickly. When it decreases, the baseline becomes more stable.
sigmoidWeight = sigmoid_function(sigmoidFeed)
baseAlpha = 2.0 / (emaLen + 1.0)
adaptiveAlpha = f_clamp(baseAlpha * (0.5 + sigmoidWeight), 0.01, 1.0)
The final adaptive baseline is calculated recursively using the changing alpha.
sigmoid_ema = f_sigmoid_ema(src, sigmoidFeed, sigLen)
The indicator then calculates its base volatility using one of four methods: standard deviation, ATR, mean absolute deviation, or median absolute deviation.
volatilityRaw = switch volFeed
"SD" => ta.stdev(src, volLen)
"ATR" => ta.atr(volLen)
"MeanAD" => ta.dev(src, volLen)
"MedianAD" => f_median_ad(src, volLen)
This raw volatility value is also processed through a sigmoid-adaptive smoothing layer. The result becomes the symmetric volatility foundation used by the bands.
volatilityFeed = ta.change(volatilityRaw / nz(ta.ema(volatilityRaw, volLen), volatilityRaw), changeL)
volatility = f_sigmoid_ema(volatilityRaw, volatilityFeed, volLen)
When asymmetric bands are enabled, positive and negative log-return shocks are separated into bullish and bearish variance components.
bullShock = math.pow(math.max(ret, 0.0), 2.0)
bearShock = math.pow(math.max(-ret, 0.0), 2.0)
totalShock = bullShock + bearShock
Each shock component is adaptively smoothed and compared with total variance. This produces separate upper and lower volatility multipliers.
The multipliers are constrained around their longer-term average so the bands can adapt without becoming unstable.
upperVol = math.max(nz(symmetricVol, syminfo.mintick) * upperMultAdj, syminfo.mintick)
lowerVol = math.max(nz(symmetricVol, syminfo.mintick) * lowerMultAdj, syminfo.mintick)
The final bands are positioned around the sigmoid-adaptive baseline.
upperBand = sigmoid_ema + finalUpper * volMul
lowerBand = sigmoid_ema - finalLower * volMul
A bullish state is established when price closes above the upper band. A bearish state is established when price closes below the lower band. While price remains between the boundaries, the existing state is preserved.
if close > upperBand
NAL := 1
if close < lowerBand
NAL := -1
3. Key Features
Sigmoid-weighted adaptive EMA baseline.
Selectable momentum, volatility, volume, or disparity adaptation feed.
Multiple volatility calculation methods.
Optional asymmetric bullish and bearish volatility bands.
Independent modeling of positive and negative return shocks.
Controlled asymmetry through long-term multiplier normalization.
State-based candle coloring, layered volatility hulls, glow effects, and directional fills.
4. Use
Sigmoid Alpha Bands is designed to identify when price expands beyond an adaptively smoothed volatility structure.
A close above the upper boundary reflects bullish expansion beyond the current baseline and volatility regime. A close below the lower boundary reflects bearish expansion beneath that structure.
The asymmetric mode allows the indicator to recognize that bullish and bearish volatility do not always develop with equal intensity. As market pressure changes, each side of the channel can adjust independently while remaining anchored to the same adaptive baseline.
This indicator is designed as a specialized component within a complete strategy architecture. Its role is to isolate the interaction between adaptive trend, changing volatility, and directional return pressure. Its full value emerges through the way this information is integrated into a broader decision framework.
Indicador

AlgoStorm Expected Move Levels (EML)AlgoStorm Expected Move Levels (EML)
A precision options-implied range mapping tool that plots daily and weekly ±1σ and ±2σ expected-move bands from the ATM straddle, from implied volatility, or from an automatic average-range fallback — with a live meter showing how much of the average daily and weekly range has already been consumed.
The AlgoStorm Expected Move Levels (EML) indicator is designed for index and futures traders who trade with the options market's own forecast. The at-the-money straddle is the market's priced bet on how far the underlying travels before expiry; the expected move derived from it defines the range the market is paid to defend. Gamma levels show where dealers defend — the expected move shows how far the market is priced to travel . Together they form the complete options-informed map for index futures, and EML is the second half of that pair.
DATA INPUT — READ BEFORE LOADING
This indicator carries no built-in options data feed. Setup is a single paste. Our free browser-based GEX dashboard includes an Expected Move calculator that auto-fills spot and the ATM straddle from delayed CBOE quotes and emits one CSV line — 1,anchor,dailyStraddle,weeklyStraddle,multiplier (example: 1,6350.25,44.30,94.80,0.85). Drop that line into the EM Data field and every value is populated at once; the leading 1 is a format version the script validates, so a malformed or mismatched paste is flagged on the chart instead of silently plotting nonsense.
Prefer to work from your own options chain? The Manual Entry group still accepts an ATM straddle price (call + put at the strike nearest spot) or an annualized implied-volatility figure, and a valid paste simply takes precedence over it. With the paste field empty and both manual inputs at zero, the script runs standalone on its average-range fallback, so it works out of the box. Refresh the paste once per session, before the open.
Symbol Mode: SPX / ES plots pasted values as-is — SPX options are struck at the same levels ES trades. SPY mode divides the pasted anchor and straddles by 10. Scaling is applied to pasted values only; manual entries are always read in chart units.
Technical Architecture: Triple-Source Expected Move Pipeline
Versioned Paste Decoder: One string input carries anchor, daily straddle, weekly straddle and multiplier — validated on version and field count, with every absent slot decoding to zero so it falls through to the manual entries and then to the range fallback. The info table reports whether the live values came from the paste, from manual entry, or from the automatic fallback.
Straddle Conversion Engine: EM(1σ) = ATM straddle × 0.85. A straddle's price is its expected payout; under a normal approximation, roughly 85% of that payout equals the 1σ price range. The multiplier is exposed as an input — set 1.0 to use the raw straddle convention instead. A pasted line carries its own multiplier and takes precedence; when using the paste workflow, adjust the multiplier on the dashboard before copying.
Volatility Mode: EM(daily) = anchor × IV × √(1/252) and EM(weekly) = anchor × IV × √(5/252), the trading-day convention. Useful when you track IV but not option prices.
Automatic Fallback Cascade: Any zeroed input degrades gracefully — daily falls back to the Average Daily Range (default 14 days), weekly to the Average Weekly Range (default 8 weeks), and a missing weekly straddle first derives from the daily straddle × √5. The info table always displays which source is live, so there is never ambiguity about what the bands represent.
Chart-Side Lock Engine: The script contains zero request.security calls. Anchors and bands compute from the chart's own session boundaries and lock at the day/week open — they cannot move intraday, and there is no repaint path by construction.
Range Consumption Meter: Completed daily and weekly ranges feed fixed-length rolling windows; the current period's range is expressed as a percentage of its average ("today has used 78% of its average range") — the continuation/exhaustion filter the EM bands are read with.
Features & Functionality
Daily Expected Move Bands: ±1σ and optional ±2σ steplines around a configurable anchor — prior close (the desk-quoting convention, default), today's open, or the spot price carried in the paste.
Weekly Expected Move Bands: The identical structure anchored at the weekly boundary, off by default for chart cleanliness.
Anchor Lines: Dimmed reference steplines marking the exact price the bands are centred on.
Live Info Table: Effective daily and weekly EM with source labels, ADR/AWR values, day/week range-consumption percentages that highlight when a range is fully spent, and an EM Data row reporting paste / manual / fallback status.
Symbol Mode: SPX / ES one-to-one, or SPY with pasted values auto-scaled ÷10 — a chart label confirms whenever scaling is active.
Alert Suite: Seven conditions — daily ±1σ break, daily ±2σ break (tail move), weekly ±1σ break, and ADR exhausted (day range reaches 100% of average). All fire on confirmed closes; a crossed band cannot move away afterward.
Honest limitations: the expected move is model context, not a boundary — roughly one day in three closes outside the ±1σ band by construction, because that is what 1σ means . Straddle and IV inputs are static: re-enter them when the session rolls or the volatility regime shifts. ADR/AWR use chart-session ranges, which on continuous futures include the overnight session — usually what you want on full-Globex instruments, but know your convention.
Open-source under CC BY-NC-SA 4.0. Educational tool — not financial advice. Indicador

Daily Range Exhaustion - ADR Probability MapAn intraday trader spends the whole session asking one question without ever measuring it: is there still room left in this move, or is the day already finished. Daily Range Exhaustion measures it.
The script records the completed range of every past day on the symbol you have open, and uses that sample to answer four things about the day in progress.
HOW MUCH OF THE DAY IS SPENT
Today's range is compared against the average daily range of the last 5, 10 or 20 days. The panel shows the result as a percentage. At 40 percent the day still has room in either direction. At 110 percent the day has already delivered more than an ordinary day and every further extension is, statistically, an outlier rather than the base case. The chart background tints once 100 percent is passed.
WHERE A FULL DAY COULD STILL REACH
Two levels are drawn:
Upside projection, today's low plus the average daily range. This is the highest point a statistically ordinary day could still print without becoming unusual.
Downside projection, today's high minus the average daily range.
Both compress as the session develops. Early in the day they sit far apart. By the afternoon they have squeezed toward price, and the distance left to each one is exactly the room the day has left. The shaded areas between price and each projection are that remaining room, made visible.
THE ODDS OF EXTENDING ANYWAY
Ranges are not a hard ceiling, so the panel reports how often the ceiling actually broke. Three lines show the share of past days whose range exceeded 100, 125 and 150 percent of the current average. On most liquid instruments roughly a quarter to a third of days exceed 100 percent, but far fewer reach 150 percent. Those numbers are the honest context for the exhaustion reading: they tell you whether a stretched day is rare or routine on this particular symbol.
WEEKDAY BREAKDOWN
A single average across all days hides a real effect. Many instruments have a quiet Monday and a violent Thursday, and judging Monday against a blended average will make it look exhausted when it is behaving normally. The panel breaks the sample down by weekday, shows the average range of each one, and expresses it as a percentage of the overall average. Today's weekday is highlighted.
HOW TO USE IT
As a filter on entries. Taking a fresh breakout when the day has already spent 120 percent of its average range is a different trade from taking the same breakout at 45 percent. The setup may be identical, the room available is not.
As target context. If the upside projection is 12 points away and your target is 30 points, the day would have to become a statistical outlier for that target to fill.
As mean reversion context. A day that hits the projection level and stalls has, by definition, reached the edge of its usual distribution.
As session planning. Check the weekday row before the session opens to know whether to expect a wide day or a narrow one.
NOTES ON THE DATA
The sample is built from the chart itself, so it needs history loaded. The panel shows a Building sample message and stays hidden until the minimum day count is reached, rather than showing statistics based on six observations.
Only intraday timeframes are supported. On a daily chart or higher the concept has no meaning, and the panel says so instead of printing misleading numbers.
Older days are dropped once the sample cap is reached, so the statistics follow the current volatility regime instead of averaging in a market from two years ago.
Days are bounded by the exchange session of the symbol. On instruments that trade nearly around the clock the day boundary is a convention, not a natural break, which slightly inflates the ranges of days that straddle a rollover.
WHAT IT IS NOT
There are no entry or exit signals here, and none are planned. This is context. A completed range is not a reversal signal, and an unfinished range is not a reason to expect continuation. Trends routinely spend two or three average ranges in a session, which is precisely why the extension odds are shown rather than hidden.
This is an analysis tool, not financial advice. Past distributions do not guarantee future ones. Use it alongside your own risk management and position sizing. Indicador

Liquidation Magnet [Quantum Algo]Liquidation Magnet
═══════════════════════════════════════════════
🔶 OVERVIEW
Liquidation Magnet estimates where over-leveraged long and short positions are likely to be liquidated, builds decaying volume-weighted clusters at those levels, and renders them as heat ladders directly on your chart. A gold magnet beam locks onto the strongest nearby pool, purge flashes mark the moment price sweeps through a cluster, and a statistics panel tracks how often those sweeps actually reverse on the exact symbol and timeframe you are trading.
The idea is simple and powerful: price does not wander randomly — it is drawn toward liquidity. The largest pockets of forced orders sit where crowded positions get liquidated. This tool maps those pockets, weighs them, and watches them get consumed.
Important honesty note, up front: every level in this indicator is an ESTIMATE derived from price structure and typical leverage tiers. This script does not read exchange liquidation feeds or order-book data, and no indicator on this platform can. Anyone claiming otherwise is guessing with extra steps. This tool guesses transparently — and then measures itself.
═══════════════════════════════════════════════
🔶 WHAT IS A LIQUIDATION MAGNET?
When traders open leveraged positions near a swing high or swing low, their liquidation prices sit at fixed, mathematically determined distances from their entries. A crowd of 25x longs opened near a swing low will be liquidated roughly four percent below it. A crowd of 50x shorts opened near a swing high will be liquidated roughly two percent above it.
Those liquidation prices are where forced market orders wait. Forced orders are fuel. Markets are drawn toward fuel — sweep the pool, fill the orders, and very often reverse once the fuel is spent. That pull is the "magnet."
═══════════════════════════════════════════════
🔶 WHY IS THIS ORIGINAL?
1. Cluster model, not static lines. Swing anchors project liquidation estimates through four leverage tiers (10x, 25x, 50x, 100x, each toggleable). Nearby estimates MERGE into clusters whose mass grows with the volume behind the anchoring swing — scattered guesses become weighted zones.
2. Living decay engine. Positions close, stops move, the crowd rotates. Every cluster loses mass each bar and dies when it fades — or the instant price sweeps through it and consumes it. The map you see is current, never a museum of stale lines.
3. Purge detection with self-auditing statistics. When price trades through a pool, the tool prints a purge flash and then measures what happened next. The dashboard reports the ten-bar reversal rate after upward and downward purges — computed on your chart, shrunk toward neutral at small sample sizes, with a Wilson lower bound available in tooltips. The indicator grades its own thesis in public.
4. The magnet beam. Among all pools within reach, the strongest (mass discounted by distance) is highlighted with a gold beam from live price — a single glance answers "where is the nearest large pocket of fuel?"
5. Radical transparency in a genre full of implication. Every tooltip, the dashboard footer, and this description state plainly that levels are structural estimates, not exchange data.
═══════════════════════════════════════════════
🔶 HOW IT WORKS
— Swing anchors: confirmed pivot highs and lows define where crowds of entries concentrate.
— Tier projection: each anchor projects liquidation estimates at the distances implied by common leverage tiers (about 1%, 2%, 4%, and 10% from entry).
— Mass: each projection carries mass scaled by the volume z-score at the anchor — swings formed on climactic volume imply larger crowds.
— Clustering: projections landing near an existing cluster merge into it, shifting its weighted center and adding mass.
— Decay and death: mass decays every bar; weak clusters are pruned; swept clusters are consumed immediately.
— Rendering: each cluster draws a trailing heat band across the chart plus a three-layer intensity ladder at the right edge — length and brightness scale with mass; the strongest pool burns gold.
— Purge statistics: after each sweep, the ten-bar outcome is recorded in first-in-first-out sample sets, and reversal rates are displayed with sample counts.
Everything is computed on confirmed bars. Signals and clusters do not repaint. All drawings are capped for performance.
═══════════════════════════════════════════════
🔶 HOW TO USE IT
— Directional context: a heavy pool overhead with light fuel below suggests the path of least resistance is up (toward the fuel), and the Net Pull row quantifies this bias.
— Sweep-and-reversal trading: the classic use. Wait for price to purge a strong pool, check the dashboard's historical reversal rate for that direction on your symbol, and treat the purge as a candidate exhaustion point for your own entry method.
— Target selection: strong pools are natural take-profit magnets — many traders exit into the fuel rather than after it is spent.
— Risk placement: avoid resting stops just beyond a hot ladder; that is exactly where the market has an incentive to reach.
— Works on any symbol, but the leverage-tier logic is designed for crypto perpetual futures, where liquidation mechanics dominate intraday movement. Best on 15m to 4H.
═══════════════════════════════════════════════
🔶 SETTINGS
— Swing Anchor Length: pivot size defining the anchoring swings.
— Leverage Tiers: toggle 10x / 25x / 50x / 100x projections independently.
— Maximum Clusters, Merge Tolerance, Mass Decay: control the density and lifespan of the map.
— Purge flashes, heat ladders, magnet beam, and ladder length are individually toggleable.
— Statistics: sample cap, minimum samples to grade, shrinkage strength, Wilson z-score.
— Full color and dashboard customization.
═══════════════════════════════════════════════
🔶 ALERTS
— Approaching Magnet — price within half an Average True Range of an estimated pool.
— Upward Purge — an estimated short-liquidation pool was swept.
— Downward Purge — an estimated long-liquidation pool was swept.
═══════════════════════════════════════════════
🔶 FAQ
Q: Is this real liquidation data from exchanges?
A: No — and this matters. TradingView indicators cannot access exchange liquidation feeds or order books. Every level here is an estimate computed from price structure and the fixed mathematics of leverage. The tool is honest about this everywhere, and it compensates by measuring its own hit rate on your chart.
Q: Why do the estimated levels often line up with where price actually reverses?
A: Because liquidation math is public and mechanical. Everyone's 50x liquidation sits roughly two percent from entry, so crowded swings reliably produce crowded liquidation pockets — no private data required.
Q: Does it repaint?
A: No. Clusters form on confirmed pivots, purges are detected on confirmed bars, and consumed clusters stay consumed.
Q: Which markets and timeframes?
A: Designed for crypto perpetual futures on 15m–4H. The structural logic works elsewhere, but the leverage-tier assumptions are crypto-native.
Q: What do the reversal statistics mean?
A: After each purge, the tool records whether price moved back against the sweep over the next ten bars. Rates are shrunk toward fifty percent at low sample counts so early numbers cannot overstate the edge. They describe this chart's history only — they are not predictions.
═══════════════════════════════════════════════
🔶 CREDITS
The liquidation-level mapping concept was popularized by crypto derivatives analytics platforms; pivot structure detection is classical technique; the Wilson score interval is by Edwin B. Wilson (1927). The cluster model, volume-weighted mass and decay engine, purge state machine, self-auditing statistics, and all code in this script are original work. No third-party or open-source script code was reused.
═══════════════════════════════════════════════
🔶 LIMITATIONS
— All levels are estimates; actual liquidation prices vary with margin mode, maintenance margin, fees, and funding.
— The statistics describe historical behavior on the current chart only; past frequencies never guarantee future outcomes.
— On illiquid symbols or very low timeframes, swing anchors are noisier and clusters less meaningful.
═══════════════════════════════════════════════
🔶 DISCLAIMER
This indicator is a research and charting tool provided for educational purposes. It is not financial advice, and no statistic shown is a promise of future performance. Trading leveraged instruments involves substantial risk of loss. Always do your own analysis and manage risk responsibly. Indicador

Adaptive Cycle Momentum Oscillator [ZurvanEG]⯁ Adaptive Cycle Momentum Oscillator
◇ Overview
MOM is a cycle-adaptive momentum oscillator built to present market direction, strength, fatigue, volatility compression and saturation within one coherent framework.
Unlike conventional momentum oscillators that apply the same lookback to every market condition, MOM can adjust its momentum window to the market’s active rhythm. This allows its response to become faster or slower as market behaviour changes, while a fixed-length mode remains available for users who require consistent settings.
Beyond measuring momentum, MOM adds context to the reading. It distinguishes strengthening movement from fading pressure, reduces the influence of momentum formed during volatility compression, identifies statistically unusual momentum zones, and detects confirmed divergence structures.
The objective is not to produce more signals or predict every reversal. It is to provide a cleaner and more informative view of momentum—showing not only its direction, but also the conditions under which it is developing.
◈ Key Features
◇ Adaptive Momentum
Automatically adjusts the momentum lookback as market rhythm changes. Fixed mode can be selected whenever a constant length is preferred.
◇ Momentum Regime
Classifies momentum as bullish, bearish or neutral. Separate entry and exit levels reduce unstable regime switching around the dead zone.
◇ Strength & Fatigue
The line gradient shows direction and magnitude, while color strength distinguishes expanding momentum from momentum fading toward zero.
◇ Volatility Squeeze
Detects compressed volatility and reduces momentum produced inside quiet conditions. Squeeze intensity can also be displayed as a variable background.
◇ Saturation Bands
Adaptive upper and lower bands identify momentum readings that are extreme relative to the oscillator’s own recent behavior. They should be treated as saturation zones, not automatic reversal signals.
◇ Divergence
Detects confirmed regular and hidden bullish or bearish divergence. Signals can optionally be restricted to pivots occurring beyond the saturation bands to filter weaker mid-range structures.
◇ Visuals & Information
Optional candle coloring transfers the oscillator’s momentum gradient to the main chart. A compact table displays the current regime, momentum value and slope state, with optional cycle, length, squeeze and divergence diagnostics.
◇ Alerts
Independent alerts are available for:
⬦ Bullish and bearish regime shifts
⬦ Upper and lower saturation contacts
⬦ Squeeze entry and release
⬦ Confirmed bullish and bearish divergence
◈ Interpretation
Adaptive Cycle Momentum Oscillator helps answer:
⬦ Is momentum bullish, bearish or neutral?
⬦ Is the current move strengthening or fading?
⬦ Was momentum produced during expansion or compression?
⬦ Is the reading unusually saturated for this market?
⬦ Has a meaningful divergence been confirmed?
◈ Notes
⬦ Adaptive mode requires sufficient historical data for cycle estimation.
⬦ Divergences appear after pivot confirmation and are therefore delayed by design.
⬦ Saturation does not guarantee reversal, especially during strong trends.
⬦ Squeeze attenuation provides context; it does not predict breakout direction.
◈ Conclusion
Adaptive Cycle Momentum Oscillator is designed as a complete momentum-analysis framework rather than a simple oscillator or signal generator. It combines adaptive measurement, stable directional regimes, strength and fatigue colouring, volatility context, dynamic saturation bands and confirmed divergence in a single visual system.
By adapting to market rhythm and evaluating momentum within its surrounding conditions, MOM helps separate meaningful directional pressure from weak movement produced inside noise or compression. Its visual structure is intended to make changes in direction, intensity and exhaustion recognizable without requiring several overlapping indicators.
MOM does not attempt to replace price structure, risk management or trading confirmation. Its role is to provide a clearer and more consistent momentum perspective that can support trend analysis, pullback evaluation, saturation monitoring and divergence assessment across different instruments and timeframes.
Indicador

Session Range Completion ClockThis indicator measures WHEN, inside a chosen intraday session, that session's range is actually
built. It answers a question that session tools normally skip: by a given time of day, how much of
the day's eventual range is typically already spent, and has the extreme that will define the day
usually already printed?
It draws no levels, marks nothing on price, and produces no signals. It is a measurement
instrument that reports descriptive statistics over the sessions in your loaded history.
THE UNDERLYING PRINCIPLE
A session's range is not built at a constant rate, and how it is built differs by symbol, by
session and by contract. The script assumes nothing about the shape - it measures it on whatever
instrument and window you point it at.
"How much range is left" and "is the extreme already in" are two different statistics, and the
script keeps them separate. For every completed session in the loaded history it records the
running high and low at the end of each time bucket, then waits for the session to close so the
FINAL range is known. It then attributes, for each bucket:
- the fraction of the final range that had been traversed by the end of that bucket;
- whether the session's high had already been made at or before that bucket;
- whether the session's low had already been made;
- whether both were already in place, meaning the range was finished and everything afterwards
happened inside it;
- the traversed range expressed in units of daily ATR or of the previous day's range, which makes
the figure comparable across volatility regimes.
These are accumulated across sessions and reported as means and frequencies.
HOW TO READ THE TABLE
The table is drawn once, on the last bar of the chart. Each row is a point in time, labelled with
the clock time at the end of that bucket.
"n" is the number of sessions contributing to that row. "Range built" is the mean percentage of
the session's final range already traversed. "High set" and "Low set" are the percentage of
sessions in which that extreme was already established. "Both set" is the percentage of sessions
in which the entire range was already complete; that column is shaded by value. "Range/unit" is
the mean range so far in the normalization unit selected in the inputs, which is named in the
bottom-right cell.
If the session contains more buckets than the row limit, buckets are sampled at an even stride so
the table still ends on the session's final bucket.
The pane also plots two lines during a live session: the current session's range so far, and the
mean range so far of all prior qualifying sessions at the same point in the session, both in the
same unit. That is a like-for-like comparison at equal elapsed session time. It is not a
projection and the script does not extend either line forward.
On a daily or higher chart the table prints a message instead of statistics: the whole measurement
is defined on intraday bars and there is nothing to compute.
WHAT IT DOES NOT DO
It does not predict where price will go, does not identify breakouts, and does not mark levels. A
high "Both set" figure at a given time means only that historically, on this symbol and this
session, the range was usually already complete by then. It is a frequency over past sessions, not
a statement about today, and nothing in the script says whether acting on it would be a good idea.
METHOD, AND WHY IT DOES NOT REPAINT
A session is folded into the statistics only after it has closed, so the session in progress never
contributes to its own statistics.
Historical values are never recalculated. The statistics accumulate forward in time, which means
the historical-mean line on early bars was computed from a smaller sample than the same line on
recent bars. That is deliberate; the alternative would be a curve that silently rewrites its own
past.
The daily normalization unit comes from a single bundled request on the daily timeframe. The
requested expression is offset by one bar and the request uses lookahead, which is the pair the
Pine Script documentation specifies for confirmed higher-timeframe values: the offset discards the
daily bar that is still forming and returns the one before it, which was already final. Historical
and realtime bars therefore receive the same value. This matters more here than it looks, because
the unit is latched once at session start and then used for that whole session - a unit that
differed between live and reloaded charts would give a session two different "Range/unit" figures
depending on when you looked at it.
Time buckets are anchored to the declared session start time rather than to the first bar
observed. This keeps the time-of-day axis stable on illiquid symbols, on sessions that run through
midnight, and on continuous 24-hour sessions where there is no gap between sessions to detect. A
session string containing more than one range, such as 0900-1130,1230-1500, is treated as a single
window running from the first start to the last end; buckets falling inside the break carry the
pre-break state forward, which is what you want, because the range does not reset over lunch. An
optional day mask such as 0930-1600:23456 is respected.
SETTINGS
Session and Session time zone define the window. Use the exchange's own time zone so buckets stay
aligned across daylight-saving changes.
Bucket size should be a multiple of the chart timeframe. A bucket narrower than the chart
timeframe contains no bars of its own and simply carries the previous bucket's state forward.
Minimum session completeness excludes half-days, early closes and partially loaded history, which
would otherwise depress the late-session figures. Lower it if a market you are studying
legitimately has short sessions.
Normalise range by chooses between daily ATR and the previous day's range. ATR is smoother; the
previous day's range reacts faster.
ORIGINALITY
The session and time-of-day category on this platform is overwhelmingly made of level-drawing
tools: opening-range boxes, session high/low lines, session shading. Those draw where. Very little
published measures when, and the two are different objects - this script plots nothing on price at
all.
There is a small existing family of scripts that chart the distribution of the hour at which the
daily high or low prints, and the "High set" and "Low set" columns overlap with that idea. This is
not a reskin of any of them: the accumulator here is cumulative by elapsed session time rather
than a histogram of one timestamp, it is folded only on session close, it is keyed to a
user-supplied session string with mid-session-break handling and a day mask, and it is combined
with final-range-fraction and volatility normalization. No code is borrowed from any published
script.
LIMITATIONS
Requires an intraday chart timeframe.
The sample is whatever history the chart has loaded, which on lower timeframes may be only a few
hundred sessions - check "n" before reading anything into a row.
Results are sensitive to the chart timeframe, because the exact bar on which an extreme prints is
resolution-dependent. Coarser timeframes will place extremes in later buckets than they truly
occurred.
The "Range/unit" column can be based on a smaller sample than the percentage columns, because the
earliest sessions in the loaded history have no completed daily bar to normalize against and are
skipped for that column only.
Sessions spanning a daylight-saving transition can be misattributed by one hour for a single day.
On non-standard chart types - Heikin Ashi, Renko, Kagi, Point and Figure, Range - the highs and
lows are synthetic, so the statistics describe the synthetic series rather than traded prices.
The statistics describe the loaded history only and carry no assumption that the distribution is
stable over time.
Source is open and commented. Indicador

Intraday Price Path Signature - London New York Tokyo WindowsOverview
Intraday Price Path Signature is a time-window price-action study for traders who want to examine how price movement develops inside selected intraday focus periods, including windows commonly monitored around the Tokyo/Asia, London and New York opens.
A conventional session highlighter mainly answers when a regional session is active. This indicator addresses a different question: how was price travel distributed and directed inside the selected window?
Each enabled window is divided into four equal clock-time phases, P1 through P4. The script measures the amount, direction and efficiency of price travel in each phase, classifies the completed sequence, and compares its phase concentration with prior occurrences of the same named window.
The result is a compact price-path signature rather than a broad session background, a set of session levels, or a buy/sell signal. It can be used to research London, New York, Tokyo/Asia or custom focus windows sometimes described by traders as kill zones, without assuming that any time window guarantees a particular outcome.
What makes this different
Most session tools focus on time identification through background shading, open/close markers, session ranges or active-session status. This script focuses on the internal formation of price movement inside a narrower research window.
Its main analytical differences are:
- Four-phase decomposition of every enabled window.
- True-range-style gross price travel that includes gaps between consecutive sampled bars.
- Directional-efficiency filtering so a phase is not called upward or downward merely because it finishes slightly above or below its start.
- A deterministic completed-window classification based on path efficiency, direction alignment, phase concentration and direction changes.
- Independent rolling comparisons for each named window and each matching phase.
- A completed phase strip that states the full P1-P4 sequence directly on the chart.
- A fixed panel that keeps live analytical context away from the candle area.
Core calculation
For each bar inside a focus window, gross bar travel is calculated as:
Gross bar travel = max(high - low, abs(high - previous sampled close), abs(low - previous sampled close))
The first sampled bar uses its own high-low range. This is a bar-based, true-range-style approximation of movement. It includes gaps, but it does not reconstruct the exact tick-by-tick path inside a candle.
The accumulated travel is divided among four equal clock-time phases:
Phase share = phase gross travel / completed-window gross travel
A phase share identifies which quarter of the configured time window contained the greatest portion of measured price travel. It is not a volume measure.
Phase direction is filtered by directional efficiency:
Phase directional efficiency = abs(phase close - phase open) / phase gross travel
When efficiency reaches the configurable threshold, the phase is classified as upward or downward according to its net displacement. When it does not, the phase is classified as rotational. This distinguishes an efficient directional move from a phase that travels extensively but finishes near its starting point.
The completed window also receives a path-efficiency value:
Window path efficiency = abs(window close - window open) / completed-window gross travel
Completed path classifications
A completed window is assigned one descriptive classification. When more than one condition is true, the first matching classification in the following priority order is used:
- Persistent rise or Persistent fall: sufficient window path efficiency and enough phase travel aligned with the completed direction.
- Rotational path: the phase sequence contains the configured number of directional changes and does not qualify as persistent.
- Front-loaded rise or Front-loaded fall: the first two phases contain the configured share of total travel.
- Late acceleration up or Late acceleration down: the final two phases contain the configured share of total travel.
- Phase concentration: one phase contains the configured dominant share of total travel.
- Evenly distributed: the difference between the largest and smallest phase shares remains within the configured tolerance.
- Mixed path: no earlier classification is satisfied.
These labels describe the completed structure under the selected thresholds. They are not forecasts, probabilities or trade recommendations.
Reading the completed phase strip
The default chart annotation is a two-line phase strip for each completed focus window. An example is:
● ASIA P1↑ P2↔ P3↓ P4↑
Front-loaded rise · Peak P2 35.8%
The first line shows the phase sequence:
- P1 through P4 identify the four equal clock-time phases.
- ↑ means the phase completed with sufficient upward directional efficiency.
- ↓ means the phase completed with sufficient downward directional efficiency.
- ↔ means the phase was rotational or did not meet the directional-efficiency threshold.
- · means the phase was not sufficiently observed.
The second line states the completed path classification and identifies the phase containing the largest share of gross price travel. The strip color identifies the configured window. By default, Asia is cyan, London is amber and New York is pink.
Completed strips are anchored to the final bar of their own window and rendered in front of the price chart. Their bodies extend to the left of the anchor so later bars to the right are less likely to pass underneath a historical strip.
The default Auto opposite close placement puts an upward-closing window below its protected price envelope and a downward-closing window above it. Automatic clearance considers the completed-window range, twelve preceding bars, opening and closing gaps, sampled internal gaps, the first bar after completion, local bar range, ATR and a small window-specific lane offset.
This system is designed to reduce candle overlap during normal chart use, including gap conditions. Because labels have a fixed screen-space size while chart scale and zoom remain user-controlled, extreme chart compression can still change the apparent distance between a label and nearby bars. Additional clearance is available in the settings.
Reading the fixed panel
The default bottom-left panel displays only enabled windows and keeps live detail away from the candles.
FOCUS shows the window icon, short code and configured local hours.
STATUS shows whether the window is live, closed or waiting. A live row also shows current completion progress.
PATH identifies the current phase and developing direction sequence while a window is live. After completion, it shows the most recent path classification.
PULSE shows four activity blocks representing the relative gross-price-travel share of P1 through P4. Taller block characters indicate a larger share. PULSE is a price-travel distribution, not volume or order flow.
CTX shows the developing price range during a live window. After completion, it shows the peak phase, its share and, when available, its empirical percentile. A diamond followed by a number is the percentile rank of that peak phase against the same phase of earlier occurrences of the same named window.
Independent historical comparison
Asia P1 is compared only with earlier Asia P1 observations. London P3 is compared only with earlier London P3 observations. New York, London Close and Custom maintain their own independent histories. Data from different named windows or different phase positions is not mixed.
The default rolling baseline contains 24 eligible completed windows and requires at least six prior samples before displaying percentiles. The current completed observation is ranked before it is added to its own history, so it does not inflate its own percentile. Tied values use a mid-rank treatment.
These percentiles are descriptive empirical ranks from the available rolling sample. They are not probabilities of future direction, continuation or reversal.
The following observations are excluded from the rolling baseline:
- A window first encountered after its configured start time because chart history began partway through it.
- A completed window with fewer than the required number of observed phases.
- A window with no measurable gross price travel.
- A window sampled on a chart environment that does not meet the selected timeframe or chart-type requirements.
Default focus windows
Asia Open: 09:00-10:00, Asia/Tokyo, enabled.
London Open: 08:00-10:00, Europe/London, enabled.
New York Open: 09:30-11:00, America/New_York, enabled.
London Close: 15:00-16:30, Europe/London, disabled by default.
Custom Focus: 12:00-13:00, Etc/UTC, disabled by default.
The default day mask is Monday through Friday. Each window has its own IANA timezone, so London and New York follow their selected local daylight-saving rules. These times are configurable research references, not universal exchange, broker or instrument schedules.
Display modes and customization
Phase strip is the publication default. It shows completed phase strips and the fixed panel without broad session shading.
Phase strip + adaptive lens adds a very light live background lens whose hue and transparency respond to the current phase direction and concentration.
Research detail enables optional legacy pulse blocks, block captions and larger research summaries.
Panel only removes bar-anchored chart annotations and leaves the fixed panel.
Users can adjust window names, codes, icons, hours, days, timezones, colors, panel placement, strip clearance, retention limits, analytical thresholds, historical lookback, minimum sample count, visual modes and alerts.
Suggested use
This indicator is intended for intraday research. Five-minute charts generally provide the clearest balance between phase detail and readability. The default maximum timeframe is 15 minutes and can be changed by the user.
Possible research questions include:
- Did most movement occur early or late in the selected window?
- Was the path persistent, rotational, evenly distributed or dominated by one phase?
- Did the largest phase have an ordinary or unusual share relative to recent matching windows?
- Do different instruments show different path signatures around the same local open?
- Does a custom focus period behave differently from the standard Asia, London or New York defaults?
The study can be applied to liquid intraday markets where time-of-day behavior is relevant, including FX, index products, futures, equities and cryptocurrencies. Users should adapt the configured times to the instrument and data feed being studied.
Alerts
Optional informational alerts are available for focus-window start, focus-window completion and unusually high phase concentration relative to the selected historical percentile threshold. Alerts describe an observed state. They are not entry or exit signals.
Limitations and data behavior
- The calculation uses chart bars, not tick data, and cannot reconstruct the exact intrabar route taken by price.
- PULSE measures price travel, not traded volume, liquidity or order flow.
- Historical percentiles depend on the amount and quality of chart history currently available.
- Missing bars, illiquid periods and data-feed differences can change phase sampling.
- Holidays, early closes, exchange-specific breaks and broker-specific schedules are not detected automatically.
- Live panel values develop as new bars arrive and are not final until the window completes.
- Completed phase strips are created from information available when the window ends. The script does not use future bars or lookahead data.
- No higher-timeframe price request is used; calculations are based on the current chart bars and configured local times.
- A standard chart type is required by default. Transformed chart types can alter measured paths and are therefore disabled unless the user overrides the requirement.
- Classification results depend on the selected thresholds. Changing inputs recalculates historical results under the new configuration.
- Automatic label clearance reduces overlap but cannot control every possible screen layout, zoom level or manual chart-scale compression.
What this indicator does not do
- It does not generate buy or sell signals.
- It does not provide entries, exits, targets, stops or position sizing.
- It does not predict the next phase or the next session.
- It does not claim a win rate, accuracy rate or profitability improvement.
- It is not a strategy or a backtest system.
- It is not financial advice.
Use the output as descriptive context alongside independent analysis and risk management. Indicador

ORB Pro | Session Breakout ScalperA precision-filtered Opening Range Breakout strategy built for intraday scalping — with multi-layer confirmation designed to cut false breakouts and size risk intelligently.
This strategy trades breakouts of a configurable opening range, but only when volume, volatility, VWAP trend, and price confirmation all line up — reducing whipsaw entries.
Features
Flexible Opening Range
Fully configurable range length, session start/end times, and timezone
Works across regular trading hours and overnight/futures sessions that cross midnight
Multi-Layer Entry Filters (each toggleable independently)
Range-size filter — only trades when the OR is a healthy size relative to ATR (avoids both dead-quiet and blown-out ranges)
Volume confirmation — requires breakout volume to exceed a multiple of average volume
VWAP directional filter — longs only above session VWAP, shorts only below
False-breakout confirmation — requires price to hold beyond the range for N bars before entering
Built-In Risk Management
Choice of stop-loss method: range-based or ATR-based
Configurable risk-reward target with partial profit-taking at a separate R-multiple
Optional breakeven stop after partial exit
Daily trade cap to prevent overtrading
Automatic flatten at session end — no overnight scalp exposure
Smart Position Sizing
Risk-based sizing (% of equity per trade, scaled to stop distance) or flat % of equity
Hard position-size cap to prevent excessive leverage on tight stops
Clean, Toggleable Visuals
Gradient-shaded opening range box (color intensity reflects range size vs. ATR)
Session VWAP line
OR high/low levels plotted for the remainder of the session
Session separators and failed-breakout markers
One-time OR size label (as an ATR multiple) for quick read on range quality
Realistic Cost Modelling
Commission and slippage assumptions built into the backtest engine, so results reflect real-world friction rather than frictionless fills
Notes
Intraday timeframes only. This strategy requires multiple bars within the opening range window to function (e.g. 1–15 min charts). Loading it on Daily+ charts will throw an explicit error rather than silently doing nothing.
Commission/slippage defaults are generic starting points (0.05% commission, 2 ticks slippage) — tune these to match your actual broker/instrument before trusting backtest P&L numbers.
All filters can be disabled individually if you want to isolate and test the raw breakout logic, or strip it down to a simpler ORB system.
Estratégia

Session Liquidity Architecture [MQLSoftware]Session Liquidity Architecture reads the trading day as a repeating structure of sessions — and instead of restating fixed session folklore, it measures how the instrument on your chart actually behaves inside that structure.
Most session tools draw boxes and stop there. This indicator adds three algorithmic elements on top of the session-box base, and every number it prints is derived from the chart's own history.
Key Features
Self-calibrating session range model — every completed session range is ranked as a percentile of that session's own trailing distribution. The active session shows a live read: current range, % of its median, and the percentile it has already reached. No pip or point thresholds, no magic numbers — the model adapts to any symbol and timeframe by construction.
Session liquidity state machine — each session's High and Low arm at session close and are then tracked through explicit states: armed → swept → rejected or accepted. A sweep is only registered on a confirmed bar; the rejection read compares the sweep bar's close against the level. Levels that survive until the next same-session open are marked expired.
Measured base rates — the panel reports observed frequencies from the loaded history: how often London actually sweeps the Asia High or Low on this chart, how often New York sweeps the London extremes, and how often price closes back inside after each sweep. These are counted events with the sample size shown (n), not assumptions — and below a minimum sample the panel says "collecting" instead of quoting a percentage.
Three configurable sessions (Asia, London, New York) with per-session IANA timezones, so daylight-saving shifts are handled automatically.
Previous Day High / Low tracked through the same armed → swept state machine.
Day separators, per-session colors, and a compact statistics panel.
Core Concept — what is original here
Session boxes are common. The original contribution of this script is that it treats the session map as a measurement problem :
1. Percentile-ranked session ranges. A "big" or "quiet" session is only meaningful relative to that session's own recent distribution. Ranking the live range against the last N completed ranges of the same session produces a self-calibrating expansion read that works identically on FX majors, indices, or crypto — without any instrument-specific settings.
2. A liquidity state machine instead of static lines. Session extremes are treated as objects with a lifecycle (armed, swept, rejected/accepted, expired). Because state transitions happen only on confirmed bars, the sweep history you see on the chart is exactly the history the statistics are built from.
3. Base rates instead of narratives. The common claims about session behavior ("London takes out the Asia range", "the sweep reverses") become testable numbers here. A counted event is strictly defined: a sweep is the first confirmed-bar break of an armed level while the later session is active, and it counts as "rejected" when the sweep bar closes back inside the level. On some instruments the measured frequencies are strongly asymmetric; on others (for example 24/7 crypto) they hover near a coin flip — and the panel will honestly show you that. The point is to replace assumption with measurement on the exact chart you trade.
Anatomy of the Display
Session boxes — one box per session per day, labelled with the session name; completed boxes append the final range and its percentile (e.g. "LONDON 0.00421 · P63").
Level lines — each session's High/Low extends right from the moment it arms at session close. A red ✕ mark shows where it was swept. Untouched levels turn dotted when they expire at the next same-session open.
PDH / PDL — dashed lines for the previous day's extremes, same sweep marking.
Statistics panel — one row per session (live or last range + percentile, and the state of its levels; states shown during a live session are prefixed "prev" because they belong to the previous cycle), followed by the measured base-rate block with sample sizes.
Notes on Repainting
Sweep events, rejection reads, base-rate counters and all alerts fire on confirmed bars only and do not repaint.
Session boxes, the live range and the live percentile update intrabar while a session is open — they are visual context for the current session, not signals.
No security() calls, no lookahead: everything is computed from the chart's own bars.
Boxes and level lines are drawing objects anchored to past bars by design (a session box spans its session, a level line starts at the bar of the extreme). This affects only how history is displayed, never the event logic.
Typical Analysis Workflow
Check the panel: how much of its typical range has the active session already used? A session at 40% of median is quiet by its own history; one at P90 has already been unusually wide for that session. These numbers describe the distribution so far — they do not predict what the next bar will do.
Watch the armed levels from the prior session and the previous day: they are the objective reference points the state machine is tracking.
When a sweep prints, read the rejection/acceptance tag and compare it with the measured base rate for that exact scenario on this chart.
Configuration
Session hours and timezone per session (defaults: Tokyo 09:00–18:00 JST, London 08:00–17:00 UK, New York 09:30–16:00 ET). Futures/FX traders can widen them or repurpose a slot as a killzone.
Rendering depth, box transparency, day separators, PDH/PDL on/off.
Sweep marks: Minimal (small ✕ text) or Pill, and how many days of marks to keep.
Stats lookback (sessions) for the percentile model; panel position and text size.
Markets and Timeframes
Intraday timeframes only (the script tells you if the chart is not intraday). Best readability from 5m to 1h. Works on FX, indices, futures, stocks and crypto — on 24/7 markets the session definitions matter more than the defaults, so adjust the hours to your venue.
Alerts
Liquidity swept — any session extreme or PDH/PDL taken (confirmed bar). The alert() message names the exact level and outcome, e.g. "EURUSD 60 — liquidity swept: ASIA H (rejected)".
Session range expansion — the active session crossed the 80th percentile of its own history.
Session opened.
This is a visual analytical tool for chart reading and session-structure context. It does not generate buy/sell signals, does not execute trades, and does not provide financial advice. Indicador

Jurik Velocity Index Approximation🚀 JURIK VELOCITY INDEX APPROXIMATION (VEL)
The Jurik Velocity Index Approximation (VEL), engineered by gunebak4n, is an advanced, ultra-smooth, zero-lag momentum oscillator framework designed for TradingView. Built upon the legendary signal-processing principles conceptualized by Mark Jurik (Jurik Research), this open-source implementation transforms classical price momentum into a noise-free, highly responsive velocity curve that pinpoints trend direction, momentum shifts, and market acceleration with surgical precision.
Classical momentum indicators suffer from a severe noise-versus-lag tradeoff: raw rate-of-change lines zig-zag violently, producing false alarms, while standard smoothing filters (such as moving averages) introduce unacceptable signal lag that degrades trade timing. VEL solves this by routing raw price momentum through an integrated Jurik Moving Average (JMA) engine. The result is an exceptionally smooth, lag-free velocity curve that detects directional reversals well ahead of traditional trend indicators.
💡 CORE DESIGN PRINCIPLES
🧭 Zero-Lag Smooth Momentum Engine
Classical momentum relies on raw price differentials, resulting in high-frequency noise. VEL strips out market chatter without adding lag, revealing the true underlying velocity of price movement.
🎛️ JMA Adaptive Filtering Engine
By passing the momentum input through a multi-stage Jurik filter, market noise is suppressed while preserving sharp turning points and critical reversal signals.
🎚️ Modular Phase & Power Control
Provides modular fine-tuning controls:
• Phase (-100 to +100): Adjusts the balance between lag reduction and overshoot prevention. Positive values accelerate responsiveness for fast-moving markets, while negative values yield smoother curves.
• Power: Controls the acceleration exponent of the smoothing curve, allowing traders to customize how aggressively the filter adapts to price velocity.
💡 KEY FEATURES
• ATR Normalization Engine: Optional volatility normalization scales momentum relative to ATR, making VEL scale-independent across Crypto, Forex, Equities, and Indices.
• Momentum Acceleration Histogram: Displays the difference between VEL and a secondary JMA signal line in a faded, visually discreet histogram to measure true momentum acceleration and deceleration.
• Multi-Timeframe (MTF) Integration: Fetch higher-timeframe velocity directly onto your execution chart for seamless macro trend alignment.
• Automated Divergence Detection: Built-in pivot scanner detects Bullish and Bearish divergences between price action and velocity oscillations.
• Dynamic Trend & Bar Coloring: Automatically colors chart price bars and the VEL curve based on real-time momentum direction.
• Comprehensive Alert Engine: Equipped with pre-configured, non-repainting alertcondition events for zero crossovers, signal crossovers, and divergence alerts.
🔬 MATHEMATICAL ARCHITECTURE
• Raw Momentum = Price - Price
• Volatility Scaling = (Enable ATR Norm) ? (Raw Momentum / ATR(14)) * 100 : Raw Momentum
• Derive Beta & Alpha Coefficients from Length and Power
• Apply Multi-Stage Recursive JMA Filter with Phase Ratio adjustment
• JMA(Normalized Momentum) => Primary VEL Output
• Signal Line = JMA(VEL, Signal Length, Signal Phase, Signal Power)
• Acceleration Histogram = VEL - Signal Line
🛠️ USAGE FRAMEWORK
1. Zero Line Crossovers (Velocity Shift)
• VEL Crossing Above 0: Confirms positive price velocity (bullish momentum). Focus on long entries or trend continuations.
• VEL Crossing Below 0: Confirms negative price velocity (bearish momentum). Focus on short entries or trend continuations.
2. Histogram Slopes (Momentum Acceleration)
• Expanding Histogram: Indicates accelerating momentum in the current trend direction.
• Shrinking Histogram: Early warning of momentum decay before price actually turns.
3. Divergence Analysis
• Bullish Divergence: Lower price lows paired with higher VEL lows indicate seller exhaustion and an impending bullish reversal.
• Bearish Divergence: Higher price highs paired with lower VEL highs indicate buyer exhaustion and an impending bearish reversal.
⚙️ SYSTEM CHARACTERISTICS
• Zero Repainting: All calculations strictly evaluate on closed historical bar states.
• Fully Parameterized Inputs: Customize period length, phase, power, ATR normalization, MTF timeframes, divergence lookbacks, bar coloring, and color themes.
• Asset-Agnostic Engine: Operates with scale-independent precision across Equities, Forex, Crypto, Commodities, Futures, and Indices.
• Clean & Modern UI: Built to Pine Script v6 standards and optimized for visual clarity on both dark and light chart themes.
📌 CREDIT & ATTRIBUTION
The Jurik Velocity Index Approximation script is engineered and published by gunebak4n on TradingView.
This indicator is based on the mathematical concepts of the Jurik Velocity Index (VEL) originally conceptualized by Mark Jurik (Jurik Research).
⚠️ DISCLAIMER
This script is an open-source community implementation and mathematical approximation of the VEL concept. It is not affiliated with, officially supported by, or endorsed by Mark Jurik or Jurik Research. This indicator is a technical analysis visualization tool and does not provide financial advice, automated trading signals, or profit guarantees. Always perform thorough backtesting and practice strict risk management. Indicador

DNSE VN301!, Keltner Break Out Strategy"Keltner Channel Breakout with SMA Trend Filter" is a trend-following breakout strategy designed to capture strong directional price movements after volatility expansions. The strategy uses the Keltner Channel, constructed from an EMA(20) and ATR(10), to identify bullish breakouts when price closes above the upper channel and bearish breakouts when price closes below the lower channel.
To improve signal quality, the strategy incorporates an optional SMA(200) trend filter, allowing Long trades only when the SMA is rising and Short trades only when it is falling. By combining volatility-based breakout detection with long-term trend confirmation, the strategy seeks to reduce false signals during ranging markets while participating in sustained intraday trends. It also includes configurable stop loss, take profit, trading session filters, and automatic end-of-day position closure for disciplined risk management.
Strategy settings and configuration:
Chart timeframe: recommended 1-minute chart
Position size: 3 contracts
Keltner EMA length: 20
ATR length: 10
ATR multiplier: 2.0
SMA length: 200
Stop loss: 10 points
Take profit: 20 points
SMA trend filter: On / Off
Take profit: On / Off
Time filter: On / Off
Trading session: 09:00 – 14:30
Trade direction: Long / Short / Both
Default script settings:
The strategy calculates the Keltner Channel using EMA(20) and ATR(10). The upper band is calculated by adding ATR multiplied by 2.0 to EMA(20). The lower band is calculated by subtracting ATR multiplied by 2.0 from EMA(20).
When the closing price breaks above the upper Keltner band, buying pressure may be taking control. When the closing price breaks below the lower Keltner band, selling pressure may be taking control.
When the SMA(200) trend filter is enabled, the script only allows Long trades when SMA(200) is rising and only allows Short trades when SMA(200) is falling. When the SMA filter is disabled, the strategy can trade both directions based only on Keltner Channel breakout signals.
Entry and exit rules:
Long entry:
Closing price > Upper Keltner Channel band
AND SMA(200) is rising, if the SMA filter is enabled
AND the signal appears during the trading session
AND trade direction allows Long entries
Long exit:
Stop loss: 10 points from entry price
Take profit: 20 points from entry price, if enabled
Opposite breakout signal appears
Reversal when a valid Short signal appears
Automatic position close at the end of the trading session
Short entry:
Closing price < Lower Keltner Channel band
AND SMA(200) is falling, if the SMA filter is enabled
AND the signal appears during the trading session
AND trade direction allows Short entries
Short exit:
Stop loss: 10 points from entry price
Take profit: 20 points from entry price, if enabled
Opposite breakout signal appears
Reversal when a valid Long signal appears
Automatic position close at the end of the trading session
Risk disclaimer:
Futures trading involves a high level of risk and prices can move sharply. This script is provided for reference, research, and backtesting purposes only. Users should fully understand derivatives trading, their own risk tolerance, and the strategy logic before applying it to live trading.
All investment decisions are the responsibility of the user. phaisinh.online is not responsible for any losses arising from the use of this strategy in real trading. Past performance does not guarantee future results.
_____________________________________________________________________
"Keltner Channel Breakout với Bộ lọc Xu hướng SMA" là chiến lược giao dịch theo xu hướng (trend-following) được thiết kế để nắm bắt các nhịp biến động mạnh của giá sau khi thị trường mở rộng biên độ dao động. Chiến lược sử dụng Keltner Channel, được xây dựng từ EMA(20) và ATR(10), để xác định tín hiệu bứt phá tăng khi giá đóng cửa vượt lên trên dải trên và tín hiệu bứt phá giảm khi giá đóng cửa xuống dưới dải dưới của kênh.
Để nâng cao chất lượng tín hiệu, chiến lược tích hợp bộ lọc xu hướng SMA(200) (có thể bật/tắt), chỉ cho phép mở vị thế Long khi SMA đang hướng lên và vị thế Short khi SMA đang hướng xuống. Bằng cách kết hợp tín hiệu breakout dựa trên biến động với xác nhận xu hướng dài hạn, chiến lược hướng tới việc giảm các tín hiệu nhiễu trong giai đoạn thị trường đi ngang, đồng thời tận dụng hiệu quả các xu hướng mạnh trong giao dịch trong ngày. Ngoài ra, chiến lược còn hỗ trợ các tính năng quản trị rủi ro như Stop Loss, Take Profit, bộ lọc thời gian giao dịch và tự động đóng vị thế trước khi kết thúc phiên để tránh rủi ro qua đêm.
Cài đặt & cấu hình chiến lược:
Biểu đồ: khuyến nghị khung 1 phút
Khối lượng giao dịch: 3 hợp đồng
Chu kỳ EMA Keltner: 20
Chu kỳ ATR: 10
Hệ số nhân ATR: 2.0
Chu kỳ SMA: 200
Cắt lỗ: 10 điểm
Chốt lời: 20 điểm
Bộ lọc xu hướng SMA: Bật / Tắt
Dùng chốt lời: Bật / Tắt
Bộ lọc giờ: Bật / Tắt
Khung giờ giao dịch: 09:00 – 14:30
Chiều giao dịch: Mua / Bán / Cả hai
Cài đặt mặc định của script:
Chiến lược tính toán Keltner Channel dựa trên đường EMA(20) và độ biến động ATR(10). Dải trên được tính bằng EMA(20) cộng ATR nhân hệ số 2.0. Dải dưới được tính bằng EMA(20) trừ ATR nhân hệ số 2.0.
Khi giá đóng cửa vượt lên trên dải trên Keltner, lực mua có thể đang chiếm ưu thế. Khi giá đóng cửa phá xuống dưới dải dưới Keltner, lực bán có thể đang chiếm ưu thế.
Khi bật bộ lọc xu hướng SMA(200), script chỉ cho phép lệnh Mua khi SMA(200) dốc lên và chỉ cho phép lệnh Bán khi SMA(200) dốc xuống. Khi tắt bộ lọc SMA, chiến lược có thể giao dịch cả hai chiều chỉ dựa trên tín hiệu breakout của Keltner Channel.
Điều kiện vào và thoát lệnh:
Vào lệnh Mua:
Giá đóng cửa > Dải trên Keltner Channel
VÀ SMA(200) dốc lên, nếu bật bộ lọc SMA
VÀ tín hiệu xuất hiện trong khung giờ giao dịch
VÀ chiều giao dịch cho phép lệnh Mua
Thoát lệnh Mua:
Cắt lỗ: 10 điểm từ giá vào lệnh
Chốt lời: 20 điểm từ giá vào lệnh, nếu bật
Có tín hiệu breakout ngược chiều
Đảo chiều khi xuất hiện tín hiệu Bán hợp lệ
Tự động đóng lệnh khi hết khung giờ giao dịch
Vào lệnh Bán:
Giá đóng cửa < Dải dưới Keltner Channel
VÀ SMA(200) dốc xuống, nếu bật bộ lọc SMA
VÀ tín hiệu xuất hiện trong khung giờ giao dịch
VÀ chiều giao dịch cho phép lệnh Bán
Thoát lệnh Bán:
Cắt lỗ: 10 điểm từ giá vào lệnh
Chốt lời: 20 điểm từ giá vào lệnh, nếu bật
Có tín hiệu breakout ngược chiều
Đảo chiều khi xuất hiện tín hiệu Mua hợp lệ
Tự động đóng lệnh khi hết khung giờ giao dịch
Tuyên bố rủi ro:
Giao dịch hợp đồng tương lai có mức độ rủi ro cao và giá có thể biến động mạnh. Script này chỉ phục vụ mục đích tham khảo, nghiên cứu và kiểm thử. Người dùng cần hiểu rõ giao dịch phái sinh, khẩu vị rủi ro cá nhân và logic của chiến lược trước khi áp dụng vào giao dịch thực tế.
Mọi quyết định đầu tư thuộc trách nhiệm của người dùng. phaisinh.online không chịu trách nhiệm cho bất kỳ khoản lỗ nào phát sinh từ việc sử dụng chiến lược này trong giao dịch thực tế. Hiệu quả trong quá khứ không đảm bảo kết quả trong tương lai.
Estratégia

Martin Ratio Asset Screener [TrendAdvantage]Martin Ratio Asset Screener
Advanced Downside & Recovery Profiler
تقييم الأصول وفقًا لنسبة مارتن
أداة متقدمة لتحليل الهبوط والتعافي
English documentation is followed by the Arabic translation below.
الشرح باللغة العربية متوفر في الجزء السفلي من هذه الصفحة
█ OVERVIEW
This screener is designed to compare multiple assets over an identical observation window. Martin Ratio values are intended for relative ranking within the selected universe rather than as universal standalone scores.
█ WHAT IS THE MARTIN RATIO?
The Martin Ratio is an advanced, risk-adjusted performance metric that evaluates an asset's return relative to both the magnitude and duration of its historical drawdowns. By utilizing the Ulcer Index (UI) as its risk proxy, it penalizes how deep an asset falls and how long it remains underwater.
It builds on the Ulcer Index, developed by Peter G. Martin and published together with Byron B. McCann in their 1989 book, "The Investor's Guide to Fidelity Funds". This indicator serves as a screening framework to identify assets that historically generated higher returns relative to their drawdown burden, rather than those that subject a portfolio to significant drawdowns, both in magnitude and duration.
█ WHY THE MARTIN RATIO IS DIFFERENT
Martin recognized a fundamental flaw in the Sharpe Ratio: it uses standard deviation as a proxy for risk, which penalizes all volatility equally — including sudden, sharp moves to the upside. For trend-following strategies or high-growth portfolios, an upward move artificially inflates standard deviation, making the strategy appear riskier than it actually is.
Unlike common risk-adjusted metrics that use standard deviation as a measure of risk, the Martin Ratio uses the Ulcer Index (UI) as its denominator. The Sortino Ratio addresses part of this problem by focusing only on downside volatility. However, downside volatility measures magnitude only, while drawdown has two components: magnitude and duration.
The Ulcer Index measures how far an asset falls below its previous highs and how persistently it remains below those highs. It therefore captures an important dimension of investment risk that conventional volatility measures can miss: the depth and persistence of capital drawdowns.
A portfolio that falls 10% and quickly recovers presents a very different investment from one that falls 10% and remains underwater for an extended period. Because the Ulcer Index is calculated from the sequence of drawdowns from prior peaks, prolonged drawdowns continue contributing to the measure until recovery occurs.
Significance of Drawdown Depth and Persistence
• Capital lock-up risk: Capital tied up in a prolonged drawdown cannot easily be
redeployed without realizing a loss.
• Behavioral risk: The deeper and longer a drawdown persists, the greater the
possibility that an investor abandons the position before recovery.
• Compounding drag: Time spent recovering previous losses is time during which
capital is not advancing beyond its former peak.
A higher Martin Ratio indicates that an asset generated more return per unit of historical drawdown burden over the selected period.
█ MATHEMATICAL FORMULA
The traditional Martin Ratio is expressed as:
`Martin Ratio = (Ra - Rf) / Ulcer Index`
Where:
• Ra: Annualized return of the portfolio, asset, or strategy.
• Rf: Risk-free rate of return.
• Ulcer Index: The root mean square of percentage drawdowns from previous
historical peaks. Lower Ulcer Index values indicate a shallower and/or less
persistent drawdown profile.
█ IMPLEMENTATION USED IN THIS SCREENER
The Martin Ratio shown by this screener uses total return over the selected lookback period rather than annualized return:
`Martin Ratio = Lookback Return / Ulcer Index`
The risk-free rate is also excluded. Because every ticker in the screener is evaluated using the same timeframe and identical lookback length, the resulting values can be used for direct comparison and ranking within the selected universe. This simplified implementation is designed primarily as a relative asset-ranking tool, rather than as a reproduction of the traditional annualized Martin Ratio.
█ HOW THE SCREENER COMPARES ASSETS
Comparison between assets follows a consistent four-step framework:
1 — Use an Identical Lookback Window — All selected tickers are evaluated
using the same timeframe and lookback length in days. This is essential for
meaningful comparison because changing either parameter changes the return
horizon and the drawdown history being measured.
2 — Calculate Lookback Return — The total buy-and-hold return is
calculated for each ticker over the selected lookback period.
3 — Calculate the Ulcer Index — For each ticker, the script identifies
the running historical peak within the calculation sequence, measures each
closing price's percentage drawdown from that peak, squares those values,
averages them, and takes the square root. The result is the ticker's Ulcer
Index over the selected period.
4 — Calculate and Rank the Martin Ratio — The lookback return is divided
by the ticker's Ulcer Index. Higher values indicate a more favorable
combination of return and drawdown over the selected measurement period.
█ OPERATIONAL NOTES
The lookback period should be sufficiently long to capture a meaningful range of market conditions, such as a drawdown and recovery. Very short windows can produce unstable or misleading ratios, particularly when an asset has experienced little or no meaningful drawdown.
As a general starting point:
• Minimum: approximately 180 calendar days (~6 months)
• Preferred: 365 calendar days (1 year) or more
These are practical guidelines rather than statistically derived minimums. The appropriate lookback depends on the asset and intended investment horizon. Lookback periods spanning several years or more may exceed the available historical data for some tickers — particularly recently listed assets — resulting in N/A values.
This screener computes each ticker's metrics over an identical calendar-day window — not a fixed bar count — so a given lookback (e.g., 300 days) covers the same 300 calendar days for equities, cryptocurrencies, or forex alike, regardless of how many bars each one produces in that span on a given timeframe. This makes lookback settings directly comparable across asset classes, independent of the chart's timeframe.
One dependency remains: the host chart being viewed governs when the screener's internal calculation updates. If the host chart is a restricted-session equity (or similar), tickers from continuously-traded markets like crypto may not accumulate enough calendar history to populate, and can show N/A even within a supported lookback window. When mixing asset classes in the same table, view the screener from a crypto or forex chart to ensure prices are populated across all assets.
█ MARTIN RATIO THRESHOLD
The threshold used by the screener is a visual ranking aid, not a statistically validated cutoff. Table colors are interpreted as follows:
• Above threshold: Green
• Between 0 and the threshold: Grey
• Below 0: Red
The threshold is intended solely as a visual aid for ranking assets rather than a universal definition of a "good" Martin Ratio. Martin Ratio values are most meaningful when comparing securities calculated using the same methodology, timeframe, and lookback period. Because the implementation used here is based on non-annualized lookback returns, values should not be treated as universal absolute benchmarks across different timeframe and lookback configurations. For practical use, the threshold can be calibrated to the characteristics of the user's own watch list or investment universe.
█ INTERPRETATION
Each ticker's row includes the following metrics:
• Total Return — Cumulative percentage return over the selected
lookback period.
• Ann. Ret — Annualized return (CAGR) over the same period, shown for
reference only; it does not influence the Martin Ratio or the ranking.
• DD (Days) — The number of calendar days from peak to trough of the
single largest (deepest) drawdown observed in the window.
• DD % — The magnitude of largest drawdown, expressed as a percentage
decline from its prior peak.
• Time in DD % — The percentage of calendar days across the entire
lookback window during which the asset was trading below its prior peaks, in
any drawdown — not limited to the single largest one.
• Ulcer Index — A measure of drawdown depth and duration combined,
calculated as the root-mean-square of percentage drawdowns across every day
in the window. Unlike DD %, which reflects only the single worst decline, the
Ulcer Index captures the cumulative "pain" of all drawdowns the asset
experienced — larger and more persistent drawdowns increase the Ulcer Index.
• Martin Ratio — Total Return divided by the Ulcer Index, measuring
return earned per unit of drawdown intensity.
Within an identically configured comparison:
• Higher Martin Ratio → More return relative to the historical drawdown
burden.
• Lower positive Martin Ratio → Positive return, but with a less favorable
drawdown profile.
• Negative Martin Ratio → Negative return over the selected lookback period.
The screener is therefore best used as a cross-sectional ranking tool for identifying which assets have delivered the strongest return relative to the depth and persistence of their drawdowns over the same observation window.
█ DISCLAIMER
This script is published for educational and informational purposes only and does not constitute financial or investment advice. The Martin Ratio relies entirely on historical price data; past drawdown depth, duration, and recovery speed are not indicative of future results. Always conduct your own research and practice proper risk management before making investment decisions.
═════════════════════════════════════════════════════════════
الشرح باللغة العربية
هذا التطبيق مصمم لمقارنة أصول متعددة عبر فترة حساب متطابقة. يُقصد بقيم نسبة مارتن أن تُستخدم للترتيب النسبي داخل مجموعة الأصول المختارة، وليس كقيم مطلقة قائمة بذاتها
█ ما هي نسبة مارتن؟
نسبة مارتن هي مقياس متقدم للأداء، يقيّم عائد الأصول المالية مقارنةً بكلٍ من حجم ومدة تراجعاتها التاريخية. ومن خلال استخدام مؤشر شدة التراجع كمقياس للمخاطر، فإنها تأخذ في الاعتبار مدى عمق هبوط الأصول المالية وطول الفترة التي تظل فيها دون قممها السابقة
تعتمد نسبة مارتن على مؤشر شدة التراجع، الذي طوّره بيتر ج. مارتن ونُشر بالاشتراك مع بايرون ب. ماكان في كتابهما الصادر عام 1989، "دليل المستثمر إلى صناديق فيديليتي". ويعمل هذا المؤشر كإطار لفحص الأصول بهدف تحديد الأصول الأكثر مرونة وقدرةً على تنمية رأس المال بكفاءة، بدلاً من الأصول التي تعرّض المحفظة لتراجعات كبيرة من حيث الحجم والمدة
█ لماذا تختلف نسبة مارتن؟
أدرك مارتن وجود عيب جوهري في نسبة شارب، إذ تستخدم الانحراف المعياري كمقياس للمخاطر، وهو ما يعامل جميع أنواع التقلبات بنفس الأسلوب بما في ذلك التحركات الصعودية المفاجئة والحادة. وفي استراتيجيات تتبع الاتجاه أو المحافظ مرتفعة النمو، قد تؤدي الحركة الصعودية إلى رفع الانحراف المعياري بشكل مصطنع، مما يجعل الاستراتيجية تبدو أكثر خطورة مما هي عليه فعلياً
وعلى خلاف المقاييس الشائعة التي تستخدم الانحراف المعياري لقياس المخاطر، تستخدم نسبة مارتن مؤشر شدة التراجع في المقام. وتُعالج نسبة سورتينو جزءاً من هذه المشكلة من خلال التركيز فقط على تقلبات الجانب السلبي، إلا أن تقلبات الجانب السلبي تقيس حجم التقلبات فقط، بينما يتكون التراجع من عنصرين: الحجم والمدة
يقيس مؤشر شدة التراجع مدى هبوط الأصول المالية عن قممها السابقة ومدى استمرارها دون تلك القمم. ولذلك فهو يلتقط بُعداً مهماً من مخاطر الاستثمار قد لا تعكسه مقاييس التقلب التقليدية، وهو حجم تراجعات رأس المال ومدة الفترة الزمنية للتراجعات
وتختلف المحفظة التي تهبط بنسبة 10% ثم تتعافى سريعاً اختلافاً جوهرياً عن محفظة تهبط بالنسبة نفسها وتظل دون قمتها السابقة لفترة ممتدة. وبما أن مؤشر شدة التراجع يُحسب من تسلسل التراجعات عن القمم السابقة، فإن التراجعات الممتدة تواصل التأثير في قيمة المؤشر حتى حدوث التعافي
أهمية عمق التراجع واستمراره
• مخاطر تجميد رأس المال: يصعب إعادة توظيف رأس المال العالق في تراجع ممتد دون تحقيق خسارة فعلية
• المخاطر السلوكية: كلما كان التراجع أعمق وأطول، زادت احتمالية تخلي المستثمر عن المركز قبل حدوث التعافي
• عبء التعافي على النمو المركب: الوقت المستغرق في تعويض الخسائر السابقة هو وقت لا يتجاوز فيه رأس المال قمته السابقة، أي تمتد فترة طويلة قبل تحقيق الأرباح الفعلية
تشير نسبة مارتن المرتفعة إلى أن الأصل حقق عائداً أكبر مقابل كل وحدة من عبء التراجع التاريخي خلال الفترة المحددة
█ الصيغة الرياضية
تحسب نسبة مارتن التقليدية كالتالي
نسبة مارتن = (العائد السنوي − العائد الخالي من المخاطر) ÷ مؤشر شدة التراجع
حيث
مؤشر شدة التراجع: الجذر التربيعي لمتوسط مربعات نسب التراجع عن القمم التاريخية السابقة. وتشير القيم الأقل للمؤشر إلى تراجعات أقل عمقاً و/أو أقصر استمراراً
█ حساب نسبة مارتن في التطبيق المستخدم الحالي
تستخدم نسبة مارتن المعروضة في هذا التطبيق إجمالي العائد خلال فترة الحساب المحددة بدلاً من العائد السنوي
`نسبة مارتن = عائد فترة الحساب ÷ مؤشر شدة التراجع`
كما يتم استبعاد معدل العائد الخالي من المخاطر. ونظراً إلى أن كل رمز في التطبيق يُقيَّم باستخدام الإطار الزمني (تايم فريم) نفسه وطول فترة الحساب نفسها، يمكن استخدام القيم الناتجة للمقارنة المباشرة والترتيب داخل مجموعة الأصول المختارة. صُمم هذا التطبيق المبسط أساساً كأداة للتصنيف النسبي للأصول، وليس كإعادة حساب لنسبة مارتن التقليدية المحسوبة على أساس سنوي
█ كيف تقارن أداة التقييم بين الأصول
تتبع المقارنة بين الأصول إطاراً ثابتاً من أربع خطوات
استخدام فترة حساب متطابقة — تُقيَّم جميع الرموز المختارة باستخدام الإطار الزمني نفسه وطول فترة الحساب نفسها. وهذا ضروري لإجراء مقارنة ذات معنى، لأن تغيير أي من هذين المتغيرين يغيّر أفق العائد وسجل التراجعات محل القياس
حساب عائد فترة الحساب — يُحسب إجمالي عائد الشراء والاحتفاظ لكل رمز خلال فترة الحساب المحددة
حساب مؤشر شدة التراجع — لكل رمز: تحديد القمة التاريخية المتغيرة ضمن تسلسل الحساب، قياس نسبة تراجع كل سعر إغلاق عن تلك القمة، تربيع قيم التراجع، حساب متوسط مربعات التراجعات، ثم أخذ الجذر التربيعي. والنتيجة هي قيمة مؤشر شدة التراجع للرمز خلال الفترة المحددة
حساب نسبة مارتن وترتيبها — يُقسم عائد فترة الحساب على مؤشر شدة التراجع الخاص بالرمز. تشير القيم الأعلى إلى مزيج أكثر ملاءمة بين العائد والتراجع خلال فترة القياس المحددة
█ ملاحظات الاستخدام
ينبغي أن تكون فترة الحساب طويلة بما يكفي لتغطية فترة ذات دلالة من ظروف السوق، مثل فترة تراجع وتعافٍ لاحق. فترات الحساب القصيرة جدًا قد تُنتج نسبًا غير مستقرة أو مضللة، خاصة عندما لا يكون الأصل قد شهد تراجعًا ذا دلالة
كنقطة بداية عامة
• الحد الأدنى: نحو 180 يومًا تقويميًا (حوالي 6 أشهر)
• المُفضَّل: 365 يومًا تقويميًا (سنة واحدة) أو أكثر
هذه إرشادات عملية وليست حدودًا دنيا مُشتقة إحصائيًا. تعتمد فترة الحساب المناسبة على فئة الأصل والأفق الاستثماري المقصود. قد تتجاوز فترات الحساب الممتدة لعدة سنوات أو أكثر البيانات التاريخية المتاحة لبعض الرموز — خاصة الأصول المُدرجة حديثًا — مما يؤدي إلى ظهور قيم غير متاح
يحسب هذا التطبيق مقاييس كل رمز عبر فترة حساب متطابقة من الأيام التقويمية — وليس عددًا ثابتًا من الشموع — بحيث تغطي فترة حساب معينة (مثل 300 يوم) نفس الـ300 يوم التقويمي سواء للسهم أو للعملة الرقمية أو للعملات الفوركس، بصرف النظر عن عدد الشموع التي يُنتجها كل منها خلال تلك الفترة على أي إطار زمني معين. وهذا يجعل إعدادات فترة الحساب قابلة للمقارنة مباشرة عبر فئات الأصول المختلفة، بمعزل عن الإطار الزمني للرسم البياني
يبقى اعتماد واحد قائمًا: الرسم البياني المعروض الذي تُشاهد الجدول من خلاله هو ما يحدد توقيت تحديث الحساب الداخلي للتطبيق. فإذا كان الرسم البياني لسهم ذي جلسات تداول محدودة (أو ما شابه)، فقد لا تتمكن الرموز من أسواق مستمرة التداول مثل العملات الرقمية من تجميع سجل تقويمي كافٍ، وقد تظهر بقيمة "غير متاح" حتى ضمن فترة حساب مدعومة. عند الجمع بين فئات أصول مختلفة في الجدول نفسه، يُنصح بمشاهدة الجدول من رسم بياني لعملة رقمية أو فوركس لتجنب هذه المشكلة
█ الحد المرجعي لنسبة مارتن
حد اللون الأخضر لنسبة مارتن المستخدم في التطبيق هو وسيلة بصرية للمساعدة في الترتيب، وليس حداً فاصلاً مثبتاً إحصائياً. تُفسَّر ألوان الجدول على النحو التالي
• أعلى من الحد: أخضر
• بين الصفر والحد: رمادي
• أقل من الصفر: أحمر
ينبغي التعامل مع الحد باعتباره مستوى مرجعياً قابلاً للتعديل، وليس تعريفاً عاماً لما يُعد نسبة مارتن جيدة. تكون قيم نسبة مارتن أكثر دلالة عند مقارنة أوراق مالية حُسبت باستخدام المنهجية والإطار الزمني وفترة الحساب نفسها. ونظراً إلى أن التطبيق المستخدم هنا يعتمد على عوائد فترة الحساب غير محسوبة على أساس سنوي، فلا ينبغي اعتبار القيم معايير مطلقة عامة عبر إعدادات مختلفة للأطر الزمنية وفترات الحساب. للاستخدام العملي، يمكن معايرة الحد بما يتناسب مع خصائص الأصول المالية المرصودة أو مجموعة الأصول الاستثمارية الخاصة بالمستخدم
█ تفسير نسبة مارتن
يتضمن الجدول المقاييس التالية لكل رمز
العائد الإجمالي — العائد المئوي التراكمي خلال فترة الحساب المحددة
العائد السنوي — عائد النمو السنوي المركب لنفس الفترة، يُعرض للاطلاع فقط، ولا يؤثر على نسبة مارتن أو على الترتيب
أقصى تراجع (أيام) — عدد الأيام التقويمية من القمة إلى القاع لأكبر (أعمق) تراجع لوحظ خلال الفترة
% أقصى تراجع — حجم التراجع الأكبر، معبَّرًا عنه كنسبة انخفاض مئوية من قمته السابقة
% فترة التراجع — النسبة المئوية للأيام التقويمية عبر فترة الحساب بأكملها التي كان فيها الأصل يتداول دون قمة سابقة، في أي تراجع وليس مقتصرًا على التراجع الأكبر فقط
مؤشر شدة التراجع — مقياس يجمع بين عمق التراجع ومدته، ويُحسب كجذر تربيعي لمتوسط مربعات نسب التراجع عبر كل يوم في الفترة. وخلافًا لـ % أقصى تراجع، الذي يعكس فقط التراجع الأكبر، يعبّر مؤشر شدة التراجع عن التراكم الكلي "لمعاناة" الأصل من كل التراجعات التي مر بها فكلما كانت التراجعات أكبر وأطول أمدًا، ارتفعت قيمة المؤشر
نسبة مارتن — العائد الإجمالي مقسومًا على مؤشر شدة التراجع، وتقيس العائد المُحقق مقابل كل وحدة من "معاناة" التراجع
ضمن مقارنة بإعدادات متطابقة
• نسبة مارتن الأعلى ← عائد أكبر مقارنةً بعبء التراجع التاريخي
• نسبة مارتن الموجبة المنخفضة ← عائد موجب، لكن مع ملف تراجع أقل ملاءمة
• نسبة مارتن السالبة ← عائد سالب خلال فترة الحساب المحددة
لذا، يُعد هذا التطبيق أداة مثالية للترتيب المقطعي لتحديد الأصول التي حققت أقوى عائد مقارنةً بعمق وديمومة تراجعاتها خلال نفس فترة الحساب
█ إخلاء المسؤولية
يُنشر هذا السكربت لأغراض تعليمية ومعلوماتية فقط، ولا يُعد نصيحة مالية أو استثمارية. تعتمد نسبة مارتن بالكامل على بيانات الأسعار التاريخية، ولا يُعد عمق التراجع أو مدته أو سرعة التعافي في الماضي مؤشراً على النتائج المستقبلية. احرص دائماً على إجراء أبحاثك الخاصة وتطبيق إدارة سليمة للمخاطر قبل اتخاذ أي قرارات استثمارية
Indicador

YURI VWAP Sigma EngineSession VWAP with volume weighted deviation bands, and a read on whether today's bands are wide or narrow for this point in the session. The bands are the ordinary part. The comparison against the clock is the part that is not available anywhere else, and it is the reason this exists.
WHAT THE BANDS ARE
VWAP is the average price every share traded at today, weighted by size. It is the benchmark institutional execution is measured against, which is most of why price keeps coming back to it. The bands are the volume weighted standard deviation of that same distribution, so they widen as the session builds disagreement and stay tight when it does not.
The deviation readout is the first number. "1.8 sigma above VWAP" says you are paying more than almost anyone else did today. Whether that is a breakout or a bad fill is a separate question this does not answer.
THE PROBLEM WITH BAND WIDTH
Band width on its own cannot be read, and the reason is structural rather than a matter of tuning. Width is a function of how far into the session you are. Sigma at 09:45 is small on every day that has ever been recorded, and sigma at 15:30 is large on every day that has ever been recorded, because the distribution simply has more in it by then. An absolute width therefore tells you the time of day and almost nothing about the day.
Comparing today's width at 10:15 against the width at 10:15 on each of the last twenty sessions removes the part that belongs to the clock. What is left belongs to today: this session is running wider than it normally is by now, or tighter.
Two details make that comparison mean anything. Width is measured relative to VWAP rather than in points, because the same instrument at 400 and at 700 does not produce comparable point spreads. And the comparison window is short on purpose, twenty sessions by default, so the reference is the volatility regime you are actually trading in rather than an average across several of them. A quiet day inside a violent month should not read as wide.
THE DISCLAIMER THAT TURNS INTO A FEATURE
Every VWAP band implementation carries the same warning: the bands are unreliable in the first fifteen to thirty minutes, because there is not enough volume in the distribution yet and they come out far too narrow.
Half of that stops mattering here. The under sampling applies equally to today and to every session today is being compared against, because they are being compared at the same point on the same clock with the same amount of data behind them. The absolute number early in the session is still meaningless. The comparison is not.
The half that does not go away is that a percentile built from six bars moves around far more than one built from sixty, and comparing like for like removes the bias without removing that. Measured across sixty sessions the percentile moves roughly eleven points a bar in the first half hour against roughly one point a bar after midday. So the early read is tagged rather than hidden. The first half hour is when a read on the session is actually worth having, and a noisy number that says it is noisy beats waiting until lunchtime for a number the session has already made obvious.
WHY NOT THE BUILT IN
The built in VWAP will draw the same bands, and if bands are all you want then use it. What it cannot do is tell you what today's width means, because that requires holding the width from previous sessions slot by slot and comparing like for like. The bands here are the input to that. The output is the state, the percentile, the multiple of a typical day, and the dotted envelope showing where the outer band sat at this exact point of the session on a median day.
THE PART THAT ACTUALLY MATTERS
A state has to hold for several bars before it gets named.
Drop that and this becomes a threshold that flips every time the percentile wobbles across the line, and within a week you have learned to ignore it. The hold period is the difference between a session read and a flicker. It is exposed in the inputs, it resets at every session open because the state describes today rather than yesterday, and there is no correct setting, only the one that matches how often you are willing to change your mind.
READING IT
Blue line is VWAP. Solid grey lines are the inner and outer bands, at one and two sigma by default.
Dotted line is the typical day. It is where the outer band sat at this point of the session across the comparison window. Today's band outside the dotted line is an expansion, inside it is a quiet day, and the distance between them is the whole read made visible without looking at a number.
The band shading carries the state. Orange is wide, blue is narrow, teal is normal, grey means there is no read yet.
The table gives the multiple of a typical day, the state with its percentile in brackets, how many sessions the comparison is actually running against, the current deviation in sigma, the distance from VWAP in percent, and how many times price has touched each outer band today.
The bracketed percentile is worth watching on its own because it moves before the label does. A percentile climbing through the middle seventies tells you the state is about to be named while the hold period is still counting.
Two words appear in the state that are not states. Forming means the session has just opened and the label has reset but not yet held long enough to be named, so the percentile is live and the label is not. Early means you are still inside the window where the percentile is built on very few bars, and it is a tag on the number rather than a different number.
SETTINGS THAT MATTER
Sessions to compare against sets the reference. Shorter reacts to the current regime and will call a wide day normal once wide days become the regime. Longer is a more stable reference and slower to accept that the regime has changed.
The wide and narrow percentiles are separate inputs. There is no reason a wide day and a quiet day have to be equally rare in your reading of the market, and if you want one side more sensitive, move that one and leave the other alone.
Sessions needed before it reads is a floor on the sample. Below it the table says warming up rather than computing a percentile out of four numbers.
Minutes before the read is trusted moves the early tag and nothing else. It changes no number and hides no reading. Set it to zero if you would rather judge the sample size yourself.
The anchor controls the VWAP reset only. The clock comparison needs a daily anchor, since a weekly or monthly anchor has no session clock to normalise against, and the table says so rather than printing a number that does not mean anything.
WHAT IT WILL NOT DO
It does not generate entries or exits, and it is not a forecast. A wide session is not a short and a narrow one is not a breakout setup. Width describes how much disagreement the session has built, not which side wins it, and the same reading precedes both a reversal and a trend continuation often enough that treating it directionally is a mistake the indicator cannot stop you making.
It needs real volume. On instruments where the feed reports tick counts instead, VWAP and everything built on it are approximations, and spot FX in particular has no consolidated volume at all.
It needs a clock, though not necessarily a closing bell. On a symbol that never closes the exchange day still rolls over, so the comparison runs against that boundary and produces a read rather than refusing one. Whether the roll of a twenty four hour day marks anything real for the instrument in front of you is your judgement to make, not the script's.
The comparison history is built as the script runs across the chart, so the read needs the comparison window plus the minimum sample to have gone past before it says anything. On a fresh chart that is the first few weeks of visible history, not the first bar.
This is context for a decision, not the decision.
Indicador

Volatility Squeeze & MomentumThis indicator flags low-volatility "squeeze" phases and pairs them with a momentum histogram, so that volatility expansions can be read together with direction. The squeeze concept was popularized by John Carter (TTM Squeeze); this script is an original open-source implementation of that public idea.
How it works
A squeeze is on when both Bollinger Bands (default 20, 2.0) sit inside the Keltner Channels (default 20, 1.5 x average true range) — a sign that recent volatility is unusually compressed. The zero line shows the state: orange dots while the squeeze is on, gray otherwise. Momentum is a linear-regression estimate of price relative to a midline (average of the Donchian midpoint and the SMA), shown as a four-color histogram: rising/falling shades above and below zero.
Three alert conditions are included: squeeze release, release with positive momentum, and release with negative momentum.
Notes and limitations
A squeeze marks compression, not direction — releases can resolve either way, and momentum at the moment of release is context, not a guarantee. All parameters are configurable; defaults follow common usage. Indicador

AM TBR - NQ Stats## Summary
Credit. All historical statistics shown by this indicator are transcribed from the AM TBR study published by NQ Stats — a 10-year analysis of 2,572 NQ sessions (2016–2026). The research design and data analysis are entirely their work; this script is an independent live reconstruction of that methodology
AM TBR anchors a Time-Based Range at the 08:00 New York open, projects ±0.25 standard-deviation levels from that open using a rolling 20-day sample standard deviation of prior session % net changes, and tracks a single, well-defined statistical event in real time: does price touch either level, and if so, does it revert to the TBR Open before 12:00 New York?
Once a touch occurs, the indicator overlays historical context for that exact situation — reversion probability conditional on the hour of the touch, typical adverse excursion (MAE) zones, continuation (MFE) targets after reversion, and time-based cumulative milestones — so you can see at a glance whether the current session is behaving like a typical reverting session or drifting into historically non-reverting territory.
This is a statistical study tool, not a trading system. It does not generate buy/sell signals and makes no claims about future performance.
## What the indicator draws on the chart
At 08:00 New York every weekday the script anchors the TBR Open (drawn as a dashed line extended to 12:00), the two ±0.25σ touch levels, and an optional faint σ ladder at ±0.5 / 0.75 / 1.0 / 1.5 / 2.0 for scale. A light background tint marks the active 08:00–12:00 window.
On the first touch of either level, a marker stamps the exact time (resolved to the minute via lower-timeframe data where available) and shaded MAE zones appear on the touched side. These zones are anchored at the TBR Open — not at the touch level — matching the source study's measurement convention. Reading them from the open outward: the grey zone (TYPICAL) ends at the historical median MAE of sessions that went on to revert; blue (DEEP) ends at the reverted P75; orange (STRETCHED) at the reverted P90; red (RISK) at the median MAE of sessions that never reverted; and the dark zone (NON-REV) extends to the non-reverted P75. The practical reading: while price holds inside grey/blue, the session is taking normal heat for an eventual reversion; pushing through orange into red means the extension now looks more like the historical failures than the historical successes.
If price reverts to the TBR Open before 12:00, the target label flips to REVERTED with the time, and three dotted MFE lines appear on the far side of the open at the historical median (green), P75 (yellow), and P90 (orange) continuation distances — how far past the open reverting sessions historically travelled. At 12:00 the session settles as Reverted, No Reversion, or No Touch.
## Reading the dashboard, row by row
**σ (20d sample).** The rolling standard deviation currently in force, shown both as a percentage and converted to points (e.g. "1.55% ≈ 450.50"). The points figure is your conversion key for every σ value in the table: multiply any σ number by it to get a price distance. A 0.445σ median MAE with σ ≈ 450 points means roughly 200 points of adverse excursion from the open.
**TBR Open (08:00).** The anchor price. Every level, zone, and statistic is measured from here.
**First Touch.** Which level was hit first, the exact time, and the hour band it falls into (08:xx, 09:xx, 10:xx, or 11:xx). The band drives everything below it, because the source study's strongest finding is that reversion odds depend heavily on when the first touch happens.
**Band Reversion Rate.** The historical percentage of sessions with a same-side touch in the same hour band that reverted to the open before 12:00, with its sample size. Colour reflects strength: green at 75%+ (08:xx touches), teal 65–75% (09:xx), orange 45–65%, red below. A ⚠ marks bands where the historical sample is tiny (10:xx and 11:xx, with 48 and 11 touches respectively across ten years) — treat those rates as directional at best.
**Outcome.** The live state machine: Waiting (levels drawn, no touch), Touched — Pending, Reverted ✓ with the reversion time, No Reversion ✗, or No Touch.
**MAE (σ from open).** Your session's maximum adverse extension so far, in σ units measured from the TBR Open, with a context tag comparing it against the reverted-MAE distribution for your band: "≤ p50" means the current heat is smaller than the median reverting session took; "p50–p75" and "p75–p90" mean progressively deeper but still within the range most reverting sessions survived; "> p90 ⚠" means the extension now exceeds nine in ten historical reversions; "≥ non-rev p50 ⚠" means it has reached territory more typical of sessions that never came back. The background shifts green → orange → red accordingly. This row is the single fastest health-check in the table.
## The stat block in depth
The dark header names the exact historical slice being displayed — for example "+0.25 · 08:xx — |σ| FROM TBR OPEN" means every number below describes sessions where +0.25 was touched first during the 08:00 hour, with all distances in σ units from the TBR Open. Signs follow the study's convention: for a +0.25 touch, MAE values print positive (heat is above the open) and MFE prints negative (continuation is below the open); for a −0.25 touch the signs flip.
Each row shows n, Mean, Median, P75, and P90 of a distribution:
**MAE Rev** — adverse excursion of sessions that ultimately reverted. This is the "survivable heat" distribution and the source of the grey/blue/orange zone boundaries. Median well below mean tells you the distribution is right-skewed: most reverting sessions took modest heat, a minority took a lot.
**MAE N-Rev** — maximum extension of sessions that never reverted by 12:00. Compare its median against the MAE-Rev P90: the gap between them is the discrimination region. For 08:xx +0.25 touches, reverting sessions' P90 heat was about 0.96σ while non-reverting sessions' median run was about 1.53σ — extensions between those two values are where the historical populations genuinely separate.
**MFE** — how far beyond the TBR Open reverting sessions continued after reverting. These are the three dotted target lines on the chart. The n here equals the reverted count, since only reverting sessions have an MFE. The large gap between median and P90 (0.69σ vs 1.99σ for 8am +0.25 touches) says continuation is occasionally explosive but usually moderate — which is why the lines are labelled as escalating reference distances rather than a single target.
To convert any cell to points, multiply by the σ-in-points figure from the top of the table.
## The cumulative section
**By 09:00 / 10:00 / 11:00 / 12:00** rows show the source study's cumulative reversion distribution: the percentage of all touched sessions (same side) that had already reverted by that clock time. These figures rise by construction — they are a running total of reversion times, ending at the overall band rate. When your touch is in the 08:xx band, the 8am-focus curve is used (27.9 → 68.2 → 76.1 → 78.4% for +0.25); otherwise the all-sessions curve applies. The Clock column counts down to each checkpoint and to the 12:00 Hard Stop.
Interpreting these correctly matters: a rising cumulative number is not "the odds are improving." The useful live question is conditional — if the session is still pending at a checkpoint, the chance of reverting before 12:00 equals (Final − Cum) ÷ (100 − Cum). Worked from the all-sessions +0.25 curve: still pending at 09:00 leaves roughly a 69% chance of reverting by noon; still pending at 10:00, about 34%; still pending at 11:00, about 10%. The longer a touched session goes without resolving, the more it historically resembles the sessions that never resolved.
## Inputs reference
**Setup group.** *SDEV Lookback* (default 20) sets how many completed daily sessions feed the standard deviation; 20 matches the source study, and changing it moves the levels while decoupling them from the reference statistics. *Touch Level (σ)* (default 0.25) sets the projected level distance — the levels will draw correctly at any value, but all displayed probabilities and distributions were generated for ±0.25 specifically and no longer describe other settings. *TBR Colour* and *Label Size* control appearance. *Keep previous sessions on chart* retains prior sessions' drawings instead of clearing at each new 08:00, useful for visually reviewing recent history (drawings beyond TradingView's object limits are recycled oldest-first).
**Levels group.** *Show σ Ladder* toggles the ±0.5–2.0σ reference lines and *Ladder Colour* styles them. *Show MAE Zones after touch* toggles the shaded zone map; *Zone Labels* independently toggles the text tags on those zones, worth switching off on busy charts. *Show MFE Targets after reversion* toggles the three continuation lines.
**Dashboard group.** *Show Dashboard* toggles the table; *Show Cumulative Milestones* toggles its bottom section if you prefer a shorter table; *Position* and *Text Size* place and scale it.
**Alerts.** Two alert conditions are provided — "Level Touched" and "Reverted to Open." Create them from the standard alert dialog by selecting this indicator and the desired condition; "Once Per Bar" is the natural frequency for both.
## How the statistics were generated (methodology and source)
The probabilities and distribution values displayed by this indicator are **not computed from your chart**. They are transcribed reference statistics from an independently published, publicly available 10-year statistical study of NASDAQ-100 E-mini futures (NQ) covering 2016–2026 (published by NQ Stats). That study's methodology, which this indicator reproduces live:
- **2,572 total sessions** analysed; **2,545 touched** a ±0.25σ level within the window (1,252 touched +0.25 first, 1,293 touched −0.25 first).
- **σ definition:** rolling 20-day *sample* standard deviation of prior session % net changes; the level is projected as TBR Open × (1 ± 0.25 × σ/100).
- **Window:** 08:00–12:00 New York time; a session "reverts" if price returns to the TBR Open after the touch and before 12:00.
- **Headline rates:** 74.0% of +0.25 touches and 74.6% of −0.25 touches reverted, strongly conditional on touch hour: roughly 79% for 08:xx, 69.5% for 09:xx, 39.6% for 10:xx, 9.1% for 11:xx.
- **MAE and MFE** are measured in |σ| units from the TBR Open. Where the study published no distribution rows for a band (MFE for 10/11:xx touches; MAE for 11:xx), the nearest earlier band's values are substituted and documented in the code.
**What is computed live from your chart:** the σ value, the TBR Open, all level and zone prices, touch and reversion detection and timing, and the running MAE. The geometry is yours; the probabilities are the study's, projected onto your chart's coordinates.
## Detection details
On chart timeframes of 1 minute and above, 1-minute intrabar data timestamps the first touch to the exact minute and sequences same-bar events correctly, so a pre-touch dip to the open is never miscounted as a reversion. Where 1-minute history is unavailable (deep chart history), detection falls back to chart-bar resolution with a documented tiebreak. Reversion means trading at or through the TBR Open price.
## Recommended use
NQ / MNQ futures (the reference statistics are NQ-specific; other symbols will run but the statistics will not apply), on 1–15 minute timeframes that divide evenly into an hour so the 08:00 anchor aligns exactly. The most robust historical context comes from 08:xx touches (n ≈ 1,500); late-morning touches carry small samples and wide uncertainty.
## Limitations and honest caveats
Historical frequencies are not probabilities of future outcomes; regimes drift. The live σ may differ slightly from the study's around continuous-contract roll dates, since roll adjustments perturb close-to-close % changes — statistics are σ-relative so behavioural context transfers, but exact prices may differ marginally from the original research. Sub-minute event ordering is unknowable at any bar resolution, and MAE on the reversion bar can be slightly overstated when the adverse extreme printed after the open-cross within the same bar; the underlying 1-minute study shares the same granularity limits. Source values were transcribed from the published tables and not independently re-derived; one internal inconsistency in the source (a single P90 cell differing between two of its tables) is documented in the code with the more internally consistent value chosen.
This indicator is for educational and analytical purposes only and is not financial advice.
---
*Open-source under the Mozilla Public License 2.0. The statistical reference values are transcribed from publicly published research as described above; the live reconstruction, detection engine, and visualisation are original work.* Indicador

[Kpt-Ahab] Moving Average Simple AlgoPilotImportant Notice and Risk Warning
The published settings were selected exclusively based on historical data for the asset and timeframe shown.
The displayed result may be random or over-optimized and cannot automatically be transferred to other assets, timeframes, or future market conditions. Even with the presented settings, the strategy may cause significant losses at any time, including the complete loss of the allocated strategy capital.
This script is intended exclusively for analysis and testing purposes. It does not constitute investment advice or a trading recommendation.
Description
This script uses reused and adapted code components from ** Auto RiskManagement & Backtest System 2.1b** and the ** Moving Average Alarm Output **.
These components have been combined into a standalone strategy that integrates moving-average signals with position management, risk management, and backtesting functions.
How It Works
The strategy uses two freely configurable moving averages. **SMA, EMA, WMA, VWMA, or HMA** can be selected independently for the short and long moving averages.
A long signal is generated when the short moving average crosses above the long moving average. A short signal is generated when the short moving average crosses below the long moving average.
The moving averages are displayed directly on the chart. An additional colored area visualizes the position of the price relative to the long moving average. Its intensity changes according to the distance between the two moving averages.
Position and Risk Management
The script supports, among other features:
* Long and short positions
* Fixed or trailing stop-loss levels
* Multiple partial profit targets
* A final profit target
* Breakeven after the first profit target
* Optional additional entries
* Drawdown and losing-trade limits
* Internal or external trading signals
* Different position-sizing methods
Additional entries and simulated leverage may significantly increase the risk of loss.
Backtest Limitations
Strategy Tester results are based exclusively on historical market data. Real-world results may differ significantly due to commissions, spreads, slippage, liquidity, price gaps, and execution delays.
Past performance is not a reliable indication of future results.
Signals During an Open Position
The **Open Position Signals** setting determines how new signals are handled while a position is already open:
* **Wait-End-Deal:** All new moving-average signals are ignored until the current position has been closed by a profit target, stop-loss, or another protective function.
* **Wait-Reversal:** An opposing moving-average signal may close the currently open position.
With **Wait-Reversal**, a sell signal closes a long position, while a buy signal closes a short position. The opposing signal does not automatically open a new position during the same step.
Price-based additional entries remain independent of this setting and may still be executed when enabled.
Stop-Loss, Trailing Stop, Breakeven, and Liquidation Line
The strategy supports both a fixed stop-loss and a trailing stop. The selected percentage represents the direct price distance from the average entry price and is not automatically adjusted by the simulated leverage.
In **FIXED %** mode, the stop is calculated from the current average entry price. If the average entry price changes due to an additional entry, the stop is recalculated accordingly.
In **TRAILING** mode, the stop only moves in a direction that is favorable to the position. If the average entry price changes due to an additional entry, the existing trailing stop is adjusted accordingly.
The stop may optionally be moved to the average entry price after the first profit target has been reached. A stop mode must be enabled for this breakeven function to operate.
The displayed liquidation line is only an internal estimate based on the simulated position and account values. It may differ significantly from the actual liquidation calculation used by a broker or exchange.
Using External Indicators
An external numerical signal source may be used instead of the integrated moving-average signals.
The external indicator must provide a selectable plot series containing the following values:
* **+1:** Long or buy signal
* **−1:** Short or sell signal
All other values, including `na`, produce no new signal.
The external indicator must output the required numerical values through a selectable plot. This plot can then be selected under **External Source**.
How an external signal is processed while a position is already open also depends on the selected **Open Position Signals** setting.
Wichtiger Hinweis und Risikowarnung
Die veröffentlichten Einstellungen wurden ausschließlich anhand historischer Daten für das dargestellte Asset und den verwendeten Zeitrahmen gewählt.
Das Ergebnis kann zufällig oder überoptimiert sein und lässt sich nicht automatisch auf andere Assets, Zeitrahmen oder zukünftige Marktphasen übertragen. Auch mit den dargestellten Einstellungen kann die Strategie jederzeit erhebliche Verluste verursachen und das eingesetzte Strategiekapital vollständig verlieren.
Dieses Skript dient ausschließlich zu Analyse- und Testzwecken und stellt keine Anlageberatung oder Handelsempfehlung dar.
Beschreibung
Dieses Skript verwendet wiederverwendete und angepasste Codebestandteile aus ** Auto RiskManagement & Backtest System 2.1b** und dem ** Moving Average Alarm Output **.
Die Komponenten wurden zu einer eigenständigen Strategie verbunden, die Moving-Average-Signale mit Positions-, Risiko- und Backtestfunktionen kombiniert.
Funktionsweise
Die Strategie verwendet zwei frei konfigurierbare gleitende Durchschnitte. Für den kurzen und den langen Moving Average können jeweils **SMA, EMA, WMA, VWMA oder HMA** ausgewählt werden.
Ein Long-Signal entsteht, wenn der kurze Moving Average den langen Moving Average von unten nach oben kreuzt. Ein Short-Signal entsteht bei einer Kreuzung von oben nach unten.
Die Moving Averages werden direkt im Chart dargestellt. Eine zusätzliche farbliche Fläche visualisiert die Position des Kurses relativ zum langen Moving Average. Die Intensität der Darstellung verändert sich abhängig vom Abstand zwischen den beiden Moving Averages.
Positions- und Risikomanagement
Das Skript unterstützt unter anderem:
* Long- und Short-Positionen
* feste oder nachlaufende Stop-Loss-Marken
* mehrere Teilgewinnziele
* ein abschließendes Gewinnziel
* Breakeven nach dem ersten Gewinnziel
* optionale zusätzliche Einstiege
* Drawdown- und Verlustserienbegrenzungen
* interne oder externe Handelssignale
* unterschiedliche Methoden zur Bestimmung der Positionsgröße
Zusätzliche Einstiege und ein simulierter Hebel können das Verlustrisiko deutlich erhöhen.
Einschränkungen des Backtests
Die Ergebnisse des Strategietesters basieren ausschließlich auf historischen Kursdaten. Reale Ergebnisse können durch Gebühren, Spread, Slippage, Liquidität, Kurslücken und Ausführungsverzögerungen erheblich abweichen.
Vergangene Ergebnisse sind kein verlässlicher Hinweis auf zukünftige Ergebnisse.
Signale während einer offenen Position
Über **Open Position Signals** wird festgelegt, wie neue Signale während einer bereits geöffneten Position behandelt werden:
* **Wait-End-Deal:** Alle neuen Moving-Average-Signale werden ignoriert, bis die aktuelle Position durch ein Gewinnziel, einen Stop-Loss oder eine andere Schutzfunktion beendet wurde.
* **Wait-Reversal:** Ein entgegengesetztes Moving-Average-Signal kann die aktuell geöffnete Position schließen.
Bei **Wait-Reversal** schließt ein Verkaufssignal eine Long-Position und ein Kaufsignal eine Short-Position. Das entgegengesetzte Signal eröffnet dabei nicht automatisch im selben Schritt eine neue Position.
Preisbasierte zusätzliche Einstiege bleiben von dieser Auswahl unabhängig und können weiterhin ausgeführt werden, sofern sie aktiviert sind.
Stop-Loss, Trailing-Stop, Breakeven und Liquidationslinie
Die Strategie unterstützt einen festen Stop-Loss sowie einen nachlaufenden Trailing-Stop. Der eingestellte Prozentwert beschreibt den direkten Kursabstand zum durchschnittlichen Einstiegspreis und wird nicht automatisch durch den simulierten Hebel verändert.
Im Modus **FIXED %** wird der Stop anhand des aktuellen durchschnittlichen Einstiegspreises berechnet. Verändert sich dieser durch einen zusätzlichen Einstieg, wird auch der Stop neu berechnet.
Im Modus **TRAILING** wird der Stop nur in eine für die Position günstigere Richtung nachgezogen. Verändert sich der durchschnittliche Einstiegspreis durch einen zusätzlichen Einstieg, wird der bestehende Trailing-Stop entsprechend angepasst.
Optional kann der Stop nach dem Erreichen des ersten Gewinnziels auf den durchschnittlichen Einstiegspreis verschoben werden. Für diese Breakeven-Funktion muss ein Stop-Modus aktiviert sein.
Die angezeigte Liquidationslinie ist lediglich eine interne Schätzung auf Basis der simulierten Positions- und Kontowerte. Sie kann deutlich von der tatsächlichen Liquidationsberechnung eines Brokers oder einer Börse abweichen.
Verwendung externer Indikatoren
Anstelle der integrierten Moving-Average-Signale kann eine externe numerische Signalquelle verwendet werden.
Der externe Indikator muss eine auswählbare Plot-Serie mit den folgenden Werten bereitstellen:
* **+1:** Long- beziehungsweise Kaufsignal
* **−1:** Short- beziehungsweise Verkaufssignal
Bei allen anderen Werten oder bei `na` wird kein neues Signal ausgelöst.
Der externe Indikator muss die benötigten Zahlenwerte direkt über einen auswählbaren Plot ausgeben. Dieser Plot kann anschließend unter **External Source** ausgewählt werden.
Wie ein externes Signal während einer bereits geöffneten Position verarbeitet wird, hängt zusätzlich von der gewählten Einstellung unter **Open Position Signals** ab.
Estratégia

Jurik Moving Average Approximation🚀 JURIK MOVING AVERAGE APPROXIMATION (JMA)
The Jurik Moving Average Approximation (JMA) , engineered by gunebak4n , is an advanced, ultra-low lag, adaptive noise-reduction indicator framework designed for TradingView. Built upon the legendary signal-processing principles conceptualized by Mark Jurik (Jurik Research) , this open-source implementation resolves the classical moving average tradeoff between lag and smoothness—delivering crisp, real-time trend tracking without erratic price oscillations or excessive signal delay.
Standard moving averages (such as SMA, EMA, or WMA) suffer from a fundamental lag-vs-noise dilemma: lengthening the period removes noise but introduces severe lag, while shortening the period reduces lag at the expense of excessive whipsaws. JMA overcomes this limitation by utilizing an adaptive, multi-stage recursive filtering process combined with a dynamic phase-adjustment mechanism. The result is an ultra-smooth, responsive curve that reacts instantly to sharp breakouts and price gaps while remaining stable during choppy, sideways consolidation.
💡 CORE DESIGN PRINCIPLES
🧭 Eliminating the Lag vs. Noise Dilemma
Conventional moving averages lag behind sudden market moves—especially during aggressive gaps or volatility expansions. JMA acts as a near-ideal noise filter: it tracks price action with minimal temporal delay while suppressing high-frequency market noise that leads to false signals.
🎛️ Fine-Tuned Phase & Power Control
Unlike standard averages that offer only a period setting, JMA provides modular fine-tuning controls:
• Phase (-100 to +100): Adjusts the balance between lag reduction and overshoot prevention. Positive values accelerate responsiveness for fast-moving markets, while negative values increase smoothness.
• Power: Controls the acceleration exponent of the smoothing curve, allowing traders to customize how aggressively the filter adapts to price velocity.
🌐 Native Multi-Timeframe (MTF) Capability
Equipped with Pine Script v5 multi-timeframe evaluation engines ( timeframe parameter), JMA enables you to seamlessly overlay higher-timeframe trend lines (e.g., Daily or Weekly JMA) onto lower-timeframe execution charts without breaking visual layout or causing repainting.
💡 KEY FEATURES
• Ultra-Low Lag Adaptive Tracking: Captures rapid price breakouts and market gaps instantaneously, giving traders earlier macro directional bias compared to traditional exponential or weighted moving averages.
• Dynamic Trend & Bar Coloring: Includes an optional visual execution engine that dynamically colors both the JMA line and chart price bars based on real-time trend direction (Bullish = Green, Bearish = Red).
• Integrated Alert System: Features pre-configured, non-repainting alertcondition events for bullish and bearish trend flips, enabling instant mobile notifications or webhooks for automated trading workflows.
🔬 MATHEMATICAL ARCHITECTURE
• Beta Coefficient: Beta = (0.45 * (Length - 1)) / (0.45 * (Length - 1) + 2.0)
• Alpha Coefficient: Alpha = Beta ^ Power
• Phase Ratio (PR): Mapped from Phase input (-100 to +100) into range
• Stage 1 (Raw Smoothing): e0 = (1 - Alpha) * Source + Alpha * e0
• Stage 2 (Trend Detrending): e1 = (Source - e0) * (1 - Beta) + Beta * e1
• Stage 3 (Phase-Adjusted Offset): e2 = (e0 + PR * e1 - JMA ) * (1 - Alpha)^2 + Alpha^2 * e2
• JMA_Current = JMA_Previous + e2
🛠️ USAGE FRAMEWORK
1. Trend Bias & Macro Axis
• Green JMA Line / Green Bars: Bullish regime. Focus on long entries, trend continuations, or buying pullbacks toward the JMA line.
• Red JMA Line / Red Bars: Bearish regime. Focus on short entries, trend continuations, or selling relief rallies toward the JMA line.
2. Dynamic Support & Resistance / Trailing Stop
Due to its low-lag and ultra-smooth profile, JMA functions as an exceptional dynamic trailing stop-loss boundary during sustained trend movements, preventing premature exits caused by minor intraday noise.
3. Replacement Proxy for Oscillators
Standard indicators (MACD, RSI, Stochastics) often generate false crossovers when calculated using raw price or EMAs. Passing the smoothed JMA output into these classical formulas yields significantly cleaner, higher-conviction oscillator signals.
⚙️ SYSTEM CHARACTERISTICS
• Zero Repainting: All calculations strictly evaluate on closed historical bar states.
• Fully Parameterized Inputs: Customize source price, length, phase, power, bar coloring, and color themes.
• Asset-Agnostic Engine: Operates with high precision across Equities, Forex, Crypto, Commodities, Futures, and Indices.
• Clean & Modern UI: Designed for high visual clarity on both dark and light chart themes.
📌 CREDIT & ATTRIBUTION
The Jurik Moving Average Approximation script is engineered and published by gunebak4n on TradingView.
This indicator is based on the mathematical concepts of the Jurik Moving Average (JMA) originally conceptualized by Mark Jurik (Jurik Research) .
⚠️ DISCLAIMER
This script is an open-source community implementation and mathematical approximation of the JMA concept. It is not affiliated with, officially supported by, or endorsed by Mark Jurik or Jurik Research. This indicator is a technical analysis visualization tool and does not provide financial advice, automated trading signals, or profit guarantees. Always perform thorough backtesting and practice strict risk management. Indicador

Liquidity Sweep & ATR Envelope⚡ Liquidity Sweep & ATR Envelope
The market hunts stops. This tool shows you where it just happened — and whether price actually rejected the grab or kept right on going. 🎯
Liquidity sweeps caught at volatility extremes, confirmed by a real reclaim, fully resolved on the bar they fire. No repaint. No HTF trickery.
🔍 THE MECHANICS
📐 The envelope — an ATR band around a 20-period basis. It's the visual anchor on the chart AND the qualification threshold at once: the same measurement does both jobs, so there's no separate cosmetic ATR filter bolted on top.
🎯 Pivot + envelope, both required — a signal needs the wick to breach a confirmed pivot level AND clear the band plus a clearance buffer. Levels are one-shot: any wick through a tracked pivot consumes it, signal or not. Re-arms on the next confirmed pivot.
↩️ Reclaim, not just recovery — the close has to snap back past the swept level by at least half the wick's own penetration depth (adjustable, 0 to disable). A candle that barely creeps back over the line doesn't count as a rejection — the snap-back has to beat the sweep.
Levels are one-shot: any wick through a tracked pivot consumes it — signal or not — and the tool re-arms on the next confirmed swing. What you see is exactly what happened.
🛡️ Non-repaint by construction — pivots confirm after their right-side bars, and every signal, marker, zone, and alert is gated to bar close. A triangle that printed yesterday printed on that bar and never moved. What you backtest is what you trade. ✅
🎨 On the chart:
🌊 Hero ATR envelope with event-driven band glow — bands light up when price presses them or on a fresh sweep.
📦 Gradient sweep zones from swept level to wick extreme — historical signals legible at a glance.
👣 Swept-history footprints so you can read where liquidity already got taken.
🎛️ 8 themes (Suite, Ocean, Royal, Ember, Mono, Frost + full Custom), optional bar tint, trigger-threshold line, compact status table.
🔔 Clean JSON alerts (direction / level / trigger) — wire it straight into your automation.
⏱️ Timeframe notes — single-timeframe and scale-free. Every threshold is measured in ATR or as an intra-bar ratio, so it ports across instruments and timeframes with zero rescaling. Defaults are tuned on H1 and carry to M15 unchanged — comparable signal frequency and reclaim quality on both. On H4 and above the setup is rarer by nature; drop Pivot Left/Right to 3 if you want more events there. Read every signal as liquidity-location context, not a standalone entry — pair it with your structure read (or Confluence Context, regime/confluence indicator on my profile) for direction. 🧭
📈 How to use it — the tool tells you where the market just swept liquidity and rejected. Stack it with structure.
Built to one standard: still useful after it's been on your chart for a while. Indicador
