TF: Smooth Trend Follower with Volume Sparks (STF)TradingFlow: Smooth Trend Follower with Volume Sparks (STF)
STF keeps the active trend visible with a trailing dotted line and a soft shadow between the line and price. Optional Volume Sparks add a second gradient that brightens when volume becomes unusually active during the trend.
Use STF to read trend direction, follow pullbacks toward the trailing boundary, and spot changes in market participation without adding more panels to the chart.
The Trend Line
• Smoothed range distance: STF smooths each bar's high-low range with a Hull moving average. This creates a responsive price distance while filtering short-term noise.
• Fixed or adaptive factor: the range distance is multiplied by the Base Factor. With ATR adaptation enabled, the factor rises or falls with current ATR relative to its average, within the selected minimum and maximum limits.
• Trailing bands: upper and lower bands ratchet behind price. A close through the opposite band changes the trend direction.
• Visual offset: the dotted line and start marker can be moved away from candles by an ATR-based distance. The offset changes the display, not the trend calculation.
Reading STF
• Green line below price: an active uptrend. Pullbacks toward the line show how closely price is testing the trailing boundary.
• Red line above price: an active downtrend. Rallies toward the line show the same test from the opposite direction.
• Start marker: a circle marks a confirmed direction change at the close of the bar.
• Trend shadow: the pale fill makes the distance between price and the active boundary easy to see.
When price and the line move together with a steady gap, the trend is progressing cleanly. A fast move back toward the line deserves attention, especially near a prior high, low, breakout level, or other visible structure.
Volume Sparks
Volume Sparks rank each bar's volume within the selected lookback. Because the reading is relative, it adapts to the symbol and timeframe automatically.
• Sparks mode: highlights bars above the selected volume percentile. The strongest readings produce the brightest pulses.
• Continuous mode: keeps a light participation layer visible and varies its intensity with the volume rank.
• Gradient: the pulse is strongest at the dotted trend line and fades toward price. Green or red continues to show trend direction; brightness shows volume intensity.
Volume Sparks measure activity, not trade direction. Read a bright pulse together with the candle and nearby structure. On symbols with missing, sparse, or unchanging volume, the layer switches itself off while STF continues normally.
A Simple Reading Process
1. Read the line's color and position to establish the current direction.
2. Check whether price is extending, tracking the line, or pulling back toward it.
3. Use a Volume Spark to locate bars where participation expanded.
4. At a direction change, compare the confirmed marker with nearby price structure.
5. Set the alert that matches the trend event you want to follow.
---
TradingFlow: Smooth Trend Follower with Volume Sparks (STF)
STF 用一條會跟著趨勢推進的虛線,加上價格與虛線之間的淡色陰影,讓目前方向一眼就能看懂。開啟 Volume Sparks 後,趨勢區內會多一層量能漸層;成交量明顯升溫時,顏色也會跟著變亮。
STF 適合拿來看趨勢方向、觀察價格拉回追蹤線的深度,也能直接在主圖上看到量能何時突然放大,不必一直切換到副圖。
趨勢線
• 平滑波幅: 先用 Hull 移動平均處理每根 K 棒的高低差,濾掉短線雜訊,同時保留對波動變化的反應速度。
• 固定或自適應倍數: 平滑波幅會乘上 Base Factor。開啟 ATR 自適應後,倍數會跟著目前 ATR 相對於平均 ATR 的高低調整,並限制在設定的上下限之間。
• 追蹤軌道: 上、下軌道會沿著價格單向推進。收盤價穿過另一側軌道時,趨勢方向切換。
• 視覺偏移: 可用 ATR 距離把虛線和起始圓點移離 K 棒。這項設定只改變畫面,不會改變訊號。
STF 怎麼看
• 價格下方的綠色虛線: 目前是上升趨勢。價格拉回虛線時,可以直接看出這次回測有多深。
• 價格上方的紅色虛線: 目前是下降趨勢。反彈靠近虛線時,也是同樣的觀察方式。
• 起始圓點: K 棒收盤確認方向切換後,圓點會標出新趨勢的起點。
• 趨勢陰影: 淡色區塊把價格到追蹤線的距離直接畫出來。
價格和虛線維持穩定距離、一起往同一方向推進,通常是比較順的走法。價格快速回到虛線附近時,就要多看一眼,尤其是剛好碰到前高、前低、突破位或其他明顯結構的位置。
Volume Sparks(量能脈衝)
量能脈衝會把每根 K 棒的成交量放進指定回看區間,計算它目前落在哪個百分位。用相對排名取代固定數字後,不同商品和週期都能用同一套邏輯判讀。
• Sparks 模式: 只有成交量超過設定的百分位門檻才會亮起。排名越高,脈衝越明顯。
• Continuous 模式: 持續保留一層淡淡的量能顯示,再依成交量排名調整深淺。
• 漸層方向: 顏色在虛線附近最強,往價格方向逐漸淡出。綠色和紅色負責表示趨勢方向,亮度則表示量能強弱。
量能脈衝看的是活躍程度,不是買賣方向。看到明顯脈衝時,搭配當根 K 棒和附近結構一起看就好。遇到沒有成交量、資料太零散或成交量長期不變的商品,這一層會自動隱藏,STF 趨勢線照常運作。
實際看圖流程
1. 先看虛線顏色和它在價格的哪一側,確認目前方向。
2. 看價格是在加速遠離、沿著虛線推進,還是拉回測試虛線。
3. 量能脈衝亮起時,留意參與度放大的 K 棒。
4. 方向切換時,把收盤確認圓點和附近價格結構放在一起看。
5. 依照想追蹤的事件設定提醒。
---
TradingFlow: Smooth Trend Follower with Volume Sparks (STF)
STFは、トレンドを追う点線と、価格との間を埋める薄いシェードで現在の方向を見やすくします。Volume Sparksをオンにすると、トレンド領域に出来高のグラデーションが重なり、普段より商いが活発なバーが明るく表示されます。
トレンド方向、ラインへの押し・戻り、出来高の盛り上がりをメインチャートだけでまとめて確認できます。
トレンドライン
• 平滑化した値幅: 各バーの高値と安値の差をHull移動平均でならし、細かなノイズを抑えながら値動きの変化を捉えます。
• 固定または適応ファクター: 平滑化した値幅にBase Factorを掛けます。ATR適応をオンにすると、現在のATRと平均ATRの比率に合わせてファクターが動き、設定した上下限の範囲に収まります。
• トレーリングバンド: 上下のバンドは価格の後ろを一方向に追います。終値が反対側のバンドを抜けると、トレンド方向が切り替わります。
• 表示オフセット: ATRベースの距離で点線と開始マーカーをローソク足から離せます。変わるのは表示位置だけで、シグナルには影響しません。
STFの見方
• 価格の下にある緑の点線: 上昇トレンドです。押しがラインへどこまで近づいたかを確認できます。
• 価格の上にある赤の点線: 下降トレンドです。戻りがラインへ近づく場面も同じように見ます。
• 開始マーカー: 終値で方向転換が確定すると、丸印が新しいトレンドの始まりを示します。
• トレンドシェード: 価格とトレーリングラインの距離を薄い色で表示します。
価格とラインが一定の間隔を保ちながら同じ方向へ進むと、トレンドの流れがつかみやすくなります。価格が急にラインへ戻る場面では、直近の高値・安値やブレイク水準など、周辺の値動きも合わせて確認します。
Volume Sparks(出来高ハイライト)
出来高ハイライトは、各バーの出来高が設定した期間内でどの水準にあるかをパーセンタイルで表示します。固定値ではなく相対順位なので、銘柄や時間足が変わっても同じ考え方で使えます。
• Sparksモード: 出来高が設定したパーセンタイルを超えたバーだけを強調します。順位が高いほど明るくなります。
• Continuousモード: 薄い出来高レイヤーを常時表示し、順位に合わせて濃さを変えます。
• グラデーション: 点線の近くで最も濃く、価格へ向かって薄くなります。緑と赤はトレンド方向、明るさは出来高の強さを表します。
この表示が見ているのは出来高の活発さです。強く光ったバーは、そのローソク足と周辺の値動きと合わせて読みます。出来高がない、データがまばら、または出来高が変化しない銘柄では自動的に非表示になり、STFのトレンドラインはそのまま動作します。
基本の見方
1. 点線の色と位置から現在の方向を確認します。
2. 価格がラインから離れているか、ラインに沿っているか、ラインへ戻っているかを見ます。
3. 出来高ハイライトが強まったバーで、市場参加が増えた場所を確認します。
4. 方向転換では、終値確定のマーカーと周辺の価格構造を合わせて見ます。
5. 追いたいトレンドイベントに合わせてアラートを設定します。
مؤشر

[Viprasol] Gold Sniper ConfluenceOverview
Gold Sniper Confluence is a gold-only edition of the Sniper Confluence engine, which builds on "Sniper Entry/Exit with SL&TP by KhanSaab V.02" by KhanSaab (open-source). KhanSaab's script provides the fast / slow EMA crossover trigger, the ATR-based stop-loss and take-profit ladder, the VWAP overlay, RSI and MACD read-outs, a secondary-timeframe RSI and the EMA-retest candle highlight. This version keeps every one of those components and adds two layers on top: a confluence scoring gate that decides whether a crossover is allowed to become a signal, and a gold layer that only exists because gold trades differently from other markets: a symbol guard that suppresses signals on non-gold charts, a US Dollar Index (DXY) inverse-correlation factor, a London / New York session filter and an average-daily-range (ADR) exhaustion filter with dollar and point risk read-outs.
It is built for XAUUSD and GC / MGC futures traders on intraday charts who want each crossover confirmed by the dollar, the session and the day's remaining range before acting. The on-chart HOW IT WORKS legend, live checklist and summary footer explain the logic directly on the chart.
Why Gold Needs Its Own Filters (Mashup Justification)
- Gold is priced in dollars, so a rising dollar is a headwind for gold and a falling dollar a tailwind. An EMA crossover that fights the dollar is a lower-quality crossover. The DXY factor scores that relationship, but only while the two are actually moving inversely, because the link does break at times (risk-off days, rate shocks).
- Gold's volume and range are concentrated in the London and New York sessions. Crossovers during the Asian session tend to happen in thin, choppy conditions and are more likely to whipsaw.
- Gold has a fairly stable average daily range. Once the day has already travelled its usual distance, a late crossover is buying or selling into exhaustion. The ADR filter blocks those entries.
- The symbol guard keeps the DXY and ADR logic honest: it only makes sense on gold, so signals are suppressed elsewhere unless you deliberately turn gold-only mode off.
How It Works
1. EMA crossover trigger (from original)
Fast EMA (default 9) crossing above the slow EMA (default 21) is a long trigger; crossing below is a short trigger. With bar-close confirmation on (new), the cross must still hold when the bar closes.
2. Confluence score, 8 factors (factors 1-7 were displayed in the original; the scoring gate and factor 8 are new)
Each bar the indicator counts how many factors agree with each direction:
bullScore = 0
bullScore += close > VWAP
bullScore += RSI(14) > 50
bullScore += MACD line > signal line
bullScore += fast EMA > slow EMA
bullScore += ADX(14) > 25 and close > fast EMA
bullScore += volume > SMA(volume, 20) and close > open
bullScore += RSI(14) on the confirmation timeframe > 50
bullScore += DXY inverse factor (see step 3)
bearScore = mirror image (below instead of above)
a crossover becomes a signal only if its score >= Minimum score (default 5 of 8)
3. DXY inverse-correlation factor (new)
dxyClose, dxyEma = DXY close and EMA(dxyClose, 21) on the chart timeframe
corr = correlation(close, dxyClose, 20)
linkActive = corr <= -0.3
bull point if linkActive and dxyClose < dxyEma (dollar weak)
bear point if linkActive and dxyClose > dxyEma (dollar strong)
no point to either side while the link is not active
The dashboard shows the DXY value, its trend arrow, the live correlation and a tick when the link is active. Turning the factor off makes the score out of 7.
4. Gold symbol guard (new)
isGold = base currency == "XAU"
or ticker contains "XAU" or "GOLD" (non-stock symbols)
or futures root == "GC" or "MGC"
or ticker contains your custom keyword
if gold-only mode and not isGold: signals suppressed, dashboard header turns red
5. London / New York session filter (new)
inLondon = bar time inside 03:00-12:00 (New York time, editable)
inNewYork = bar time inside 08:00-17:00 (New York time, editable)
sessionOk = filter off, or chart is daily or higher, or inLondon or inNewYork
Blocked crossovers are marked with a small grey x and the dashboard shows which session (or ASIA / OFF-HOURS) the last bar belongs to. The active session can be shaded on the chart.
6. ADR exhaustion filter (new)
ADR = SMA(daily high - daily low, 14) taken from completed days only
todayRange = running high - running low of the current day, built from the chart's own bars
adrUsed% = todayRange / ADR * 100
adrOk = filter off, or adrUsed% < Block threshold (default 100%)
The ADR is requested from the daily feed with a one-bar offset so historical and live bars see the same completed-day value. Because the ADR uses finished days and today's range is accumulated bar by bar, neither value repaints. The dashboard shows ADR in dollars and the percentage used, turning amber from 75% of the threshold and red once blocked.
7. Final signal gate (new)
LONG = bull crossover and bullScore >= minimum and goldOk and sessionOk and adrOk and not already long
SHORT = mirror image
Every gate only removes crossovers; none of them creates a signal that the original crossover logic would not have produced.
8. ATR stop and take-profit ladder (from original, extended)
Stop = entry -/+ ATR(14) x 1.5. Targets sit at 1R, 2R and 3R. The number of targets (1-3) is configurable (new), target lines turn turquoise and the label gets a tick when touched (from original) and the stop moves to breakeven when TP1 is hit (new). Every label states its distance from entry in points, for example "SL: 4364.87 (-50 pts)" or "TP1: 4355.83 (+40 pts)", and the dashboard shows the same distances in dollars and points (new). The point size is configurable because brokers count gold points differently.
9. Retest candles (from original)
While a trade is active, a candle that pulls back into the fast EMA without breaking the slow EMA is coloured orange.
What Is Original (Viprasol Additions)
1. Confluence scoring gate: the seven original read-outs are turned into a score that must reach a minimum before a crossover can fire.
2. DXY inverse-correlation factor with a rolling-correlation switch, so the dollar only votes while the inverse link is real.
3. Gold symbol guard that detects spot, CFD and futures gold from the symbol and suppresses signals elsewhere.
4. London / New York session filter with editable windows and timezone.
5. ADR exhaustion filter using completed-day ranges and a live, non-repainting intraday range, plus dollar and point risk read-outs on the labels and dashboard.
6. Bar-close confirmation of the crossover.
7. Breakeven trailing after TP1 and a configurable number of take-profit levels.
8. Blocked-signal markers that show exactly which crossovers the gold filters removed and why.
Key Features
From the Original (KhanSaab):
- Fast / slow EMA crossover long and short triggers
- ATR-based stop-loss and take-profit levels with hit colouring
- VWAP overlay with directional colouring
- RSI, MACD, ADX and volume read-outs
- Secondary-timeframe RSI
- Orange EMA-retest candles
Added in This Version (Viprasol):
- 8-factor confluence score with minimum-score gate
- DXY inverse-correlation factor with live correlation check
- Gold symbol guard with custom keyword
- London / New York session filter with session shading
- ADR exhaustion filter with % used and $ / pts distances
- Bar-close confirmation, breakeven trail, 1-3 configurable targets with signed point distances on every label
- Grey x markers for crossovers blocked by a gold filter
- Dashboard with every factor, the three gold gates and the open trade
- HOW IT WORKS legend, live tick / cross checklist and strategy summary panels, each with its own position setting
- Ten alert conditions with dynamic messages
How to Use
Setup:
1. Open a gold chart (OANDA:XAUUSD, FX:XAUUSD, COMEX:GC1! or MGC1!) using standard candlesticks.
2. Keep the default 9 / 21 EMAs and minimum score 5 to start.
3. Check the Session timezone. Windows are written in New York time by default; switch to Exchange if you prefer your broker's clock.
4. Set Point size to match how your broker counts gold points (0.10 for most, so a $5.00 stop reads as 50 pts).
Reading the chart:
- BUY label below a bar = bullish crossover that passed the score and all three gold gates. SELL label above a bar = bearish equivalent.
- Grey x = a crossover that had enough confluence but was blocked by the symbol guard, the session filter or the ADR filter. The dashboard's Signal row names the reason.
- Cyan dashed line = entry, red line = stop, green dashed lines = TP1-TP3. Each line ends at a label that shows the price and the distance from entry in points. A turquoise line and a tick on the label mean that target was touched. A dotted cyan stop means it has moved to breakeven.
- Orange candle = pullback into the fast EMA while the trade is active.
- Violet shading = London window, gold shading = New York window, brighter gold = the overlap.
Panels:
- HOW IT WORKS (top left by default) explains the flow in seven lines.
- Checklist (bottom left by default) shows a tick or cross for all eight factors and the three gold gates for the currently stronger side, and states whether the engine is ARMED, BLOCKED or waiting for confluence.
- Dashboard (top right by default) shows live values, DXY, session, ADR, risk in $ and points, and trade status.
- Every panel has its own position setting (nine positions), so they can be arranged to suit any chart size.
Recommended starting points:
- Scalping (1m-5m): EMA 5 / 13, minimum score 6, ATR x 1.0, ADR block 90%
- Intraday (15m-1H): EMA 9 / 21, minimum score 5, ATR x 1.5, ADR block 100%
- Swing (4H-1D): EMA 9 / 21, minimum score 4, ATR x 2.0, session filter off
These are starting points only. Gold's volatility regime changes; test on historical data and adjust before trading live.
Settings
1 Signal Engine: fast EMA, slow EMA, bar-close confirmation.
2 Confluence Filter: enable the gate, minimum score (out of 8).
3 Gold Symbol Guard: gold-only mode, extra gold ticker keyword.
4 DXY Dollar Factor: enable, DXY symbol, DXY trend EMA, correlation lookback, inverse-link threshold.
5 Gold Sessions: enable, London window, New York window, timezone, session shading.
6 ADR Exhaustion: enable, ADR lookback, block threshold (% of ADR), point size.
7 Risk Management: stop-loss ATR multiplier, ATR period, number of take-profit levels, breakeven at TP1.
8 Confirmation Timeframe: timeframe of the secondary RSI factor.
9 Dashboard: show, position, text size.
10 On-Chart Panels: HOW IT WORKS legend, live checklist, strategy summary, each with a show toggle and its own position.
11 Visuals: EMA ribbon and transparency, VWAP, trade lines and labels, label size and offset, retest candles, blocked-signal markers.
Alerts
1. Gold Long Entry - bullish crossover passed the score and all gold gates
2. Gold Short Entry - bearish equivalent
3. Any Gold Entry - either direction
4. Strong Bull Bias - bull score crossed above 70%
5. Strong Bear Bias - bear score crossed above 70%
6. DXY Inverse Link Active - gold / DXY correlation fell back below the threshold (new)
7. DXY Inverse Link Lost - correlation rose above the threshold, DXY factor paused (new)
8. Gold Session Opened - the London or New York window just started (new)
9. ADR Exhausted - today's range reached the block threshold (new)
10. Signal Blocked by Gold Filter - a qualifying crossover was removed by a gold gate (new)
All alerts include {{ticker}}, {{close}} and {{interval}} placeholders.
Limitations & Disclaimer
- EMA crossovers lag by nature. The gates reduce whipsaws but cannot remove them; ranging days will still produce crossovers that fail.
- The DXY factor depends on the dollar-index symbol being available to your account and having data on the chart timeframe. When DXY is closed (weekends, holidays) the last known value is carried forward.
- The correlation gate uses a rolling window; at the very start of the chart history it is empty and the DXY factor scores nothing.
- The DXY factor is scored, not gated. At the default minimum of 5 the signals are a subset of the general-market Sniper engine; if you lower the minimum to 4, a cross with only three of the original factors plus the DXY point can qualify.
- A crossover that is blocked by a gold gate still ends the opposite open trade, exactly as an unblocked crossover would. Only the new entry is withheld.
- Session windows are wall-clock filters. Holidays, daylight-saving changes and broker-specific hours can shift when gold is actually liquid.
- ADR is a statistical average. Gold can and does exceed it on news days; the filter deliberately stays out of those late moves.
- The secondary-timeframe RSI uses request.security and its current-bar value can change until that timeframe's bar closes.
- Entry, stop and target lines are visual references only. The indicator does not place or manage trades.
- Past performance of any signal system does not guarantee future results. This indicator is for educational and analytical purposes only and is not financial advice. Always use proper risk management and do your own analysis before trading.
Credits & Attribution
This indicator is derived from "Sniper Entry/Exit with SL&TP by KhanSaab V.02" by KhanSaab (open-source, TradingView). The following components originate from that script:
- Fast / slow EMA crossover signal logic
- ATR-based stop-loss and take-profit calculation with target-hit colouring
- VWAP overlay
- RSI, MACD, ADX and volume read-outs
- Secondary-timeframe RSI (originally fixed to 5 minutes)
- EMA-retest candle highlighting
Viprasol additions: confluence scoring gate, DXY inverse-correlation factor, gold symbol guard, London / New York session filter, ADR exhaustion filter with $ / point read-outs, bar-close confirmation, breakeven trailing, configurable take-profit count and blocked-signal markers.
Published open-source per TradingView House Rules.
مؤشر

Aggregated Funding Rate for Crypto with AlertsThis indicator aggregates perpetual futures funding rates across multiple major exchanges into a single unified view, weighted by open interest. Instead of checking each exchange separately, AFR gives you one clean reading that reflects the true market-wide funding sentiment for any perpetual contract.
How it works
Funding rates are periodic payments between long and short traders in perpetual futures markets. When funding is positive, longs pay shorts — the market is overheated to the upside. When negative, shorts pay longs — the market is leaning heavily short. Extremes in either direction often precede reversals or accelerations as overleveraged positions get squeezed.
This indicator pulls funding rate and open interest data from up to 5 exchanges simultaneously — Binance, Bybit, OKX, Bitget, and Coinbase — and aggregates them using open interest weighting by default. This means exchanges with more capital at stake have proportionally more influence on the final reading, giving a more accurate picture of where the majority of the market is positioned.
Settings
Mode — choose between Open Interest Weighted (recommended) or a simple average across enabled exchanges
Display — columns or line, personal preference
Measure — Rate (%), Total Spend Rate in USD, or Total Spend Rate in coins
Scaled Per — normalise the rate to 1 hour, 8 hours (default, one funding interval), 24 hours, or annualised
Exchanges — enable or disable individual exchanges; useful if a symbol is not listed on a particular exchange and you want to exclude it from the aggregation
How to use it
The most straightforward use is reading the absolute level. Funding consistently above 0.01% per 8 hours signals an overheated long market. Sustained negative funding signals excessive shorting. Neither extreme lasts forever.
More useful is watching for changes in direction after a prolonged period of stability. When funding has been flat for hours or days and then begins shifting meaningfully in one direction, it often signals a change in positioning before price reacts — traders are starting to lean one way and paying for it.
For multi-symbol scanning, add this indicator to a watchlist alert across your entire perpetual futures list. Symbols where funding is moving sharply relative to their recent norm are worth investigating further for potential setups.
Notes
OKX reports open interest in USD rather than coins, so the indicator automatically converts it using the current price to keep units consistent across exchanges
If a symbol does not exist on a particular exchange, that exchange is automatically excluded from the aggregation for that symbol via ignore_invalid_symbol
Funding rate data availability and update frequency depends on what TradingView receives from each exchange feed مؤشر

Coasyn Sovereign Futures OICoasyn Sovereign Futures OI is a macro participation reference for FX traders.
The indicator automatically reads the base and quote currencies of the current FX pair, maps each currency to a related sovereign futures market, and then compares changes in daily open interest across two configurable lookback periods.
It is designed to help answer a simple question:
Is participation in the related sovereign futures market building, fading, or mixed?
How it works
The indicator reads the current FX pair automatically.
For example:
EUR/USD
The indicator maps:
EUR → Euro Bund futures
USD → US 10Y futures
It then requests the related daily open-interest series and measures the percentage change over:
a short lookback
a long lookback
The default settings are:
Short OI Change — 1 day
Long OI Change — 5 days
Both values are editable.
Reading the panel
The panel displays one row for the base currency and one row for the quote currency.
Each row includes:
Currency
The base or quote currency from the current FX pair.
Future
The sovereign futures market used as the participation reference.
OI
The latest available daily open-interest value.
Short / Long Change
The percentage change in open interest over the two configured lookback periods.
State
A simplified description of the current open-interest relationship.
State definitions
BUILDING
Open interest increased over both the short and long lookback periods.
This means participation is expanding in the referenced futures market.
It does not automatically mean the currency is bullish.
FADING
Open interest decreased over both lookback periods.
This means participation is contracting in the referenced futures market.
It does not automatically mean the currency is bearish.
MIXED
The short- and long-term open-interest changes disagree.
For example, short-term participation may be increasing while the longer lookback is still declining.
LIMITED
The required market exists, but there is not enough usable historical data to calculate both lookback changes.
NO OI DATA
A valid open-interest series is not currently available for the requested market.
The indicator returns N/A rather than creating or estimating missing data.
Supported currency mapping
The current version includes sovereign futures references for:
USD
EUR
GBP
AUD
CAD
JPY
CHF
CHF includes an alternate FX-futures open-interest source when the primary sovereign reference is unavailable.
Example interpretation
Suppose EUR/USD displays:
EUR — BUILDING
USD — FADING
This does not mean the indicator is telling the trader to buy EUR/USD.
It means participation in the selected EUR sovereign futures reference is expanding while participation in the USD reference is contracting over the configured lookback windows.
That information can then be combined with the trader's own macro, rates, price-action, and risk framework.
Panel controls
The panel can be positioned in:
Top Right
Top Left
Bottom Right
Bottom Left
The entire panel can also be disabled from the indicator settings.
Data availability
Coasyn Sovereign Futures OI requests futures open-interest data available through TradingView.
Availability can depend on:
exchange coverage
symbol availability
TradingView data permissions
the specific market being requested
If data is unavailable, the indicator displays N/A or NO OI DATA.
Important
This indicator does not provide:
buy or sell signals
currency direction forecasts
trade entries
targets
stop placement
position sizing
automated execution
Open interest measures participation, not direction.
The purpose of the tool is to provide another layer of sovereign-market context for traders working with FX pairs.
Built by Coasyn Market Systems. مؤشر

Coasyn Directional Order BlocksCoasyn Directional Order Blocks
Coasyn Directional Order Blocks identifies directional supply and demand zones created around market-structure breaks with displacement.
The indicator is designed to help traders visualize potential areas of prior institutional participation without turning those zones into automatic trade signals.
It tracks both:
Demand Order Blocks
Supply Order Blocks
Each block remains active until it is touched, invalidated, or removed according to the settings selected by the user.
How blocks are created
A new block requires two things:
1. A structure break
The indicator tracks recent swing highs and swing lows using the configured Structure Swing Length.
A demand block requires price to break above the most recent tracked swing high.
A supply block requires price to break below the most recent tracked swing low.
2. Displacement
The structure break must occur with a directional displacement candle.
The displacement filter uses:
ATR-relative candle range
minimum candle-body percentage
bullish direction for demand
bearish direction for supply
This helps prevent every minor structure break from automatically becoming an order block.
Origin candle
After a valid structure break, the indicator searches backward for the opposing candle that preceded the move.
For a Demand Block, it searches for a bearish candle.
For a Supply Block, it searches for a bullish candle.
The number of candles searched is controlled by:
Origin Candle Search
Order Block Zone
The Order Block Zone setting determines how much of the origin candle becomes the displayed zone.
Available options:
Full Candle
Uses the full high-to-low range of the origin candle.
Body
Uses only the candle body.
Refined
Uses a directional refinement of the candle range.
For demand, the refined zone uses the candle low through the top of the body.
For supply, the refined zone uses the bottom of the body through the candle high.
Block states
Each block begins as a fresh active zone.
The indicator then tracks whether price returns to the zone.
The Touched When setting controls when a block is considered touched.
Available options:
First Contact
The block becomes touched as soon as price reaches the outer edge of the zone.
50% Reached
Price must reach the midpoint of the order block.
Full Fill
Price must travel completely through the block to its opposite boundary.
Keeping touched blocks
Enable:
Keep Touched Blocks
to leave previously contacted blocks visible.
Touched blocks are displayed with increased transparency so they can be visually distinguished from fresh zones.
Disable this setting if you want a block removed after its first qualifying interaction.
Invalidation
The Invalidated When setting determines when a block is considered structurally broken.
Available options:
Close Beyond
A candle must close beyond the invalidation boundary.
Wick Beyond
Any wick through the invalidation boundary is sufficient.
For demand blocks, invalidation occurs below the zone.
For supply blocks, invalidation occurs above the zone.
Keeping invalidated blocks
Enable:
Keep Invalidated Blocks
if you want failed blocks to remain visible for review.
Invalidated blocks are converted to a neutral gray appearance and stop extending forward.
When disabled, invalidated blocks are removed from the chart.
Maximum active blocks
Maximum Active Blocks per Direction controls how many demand and supply zones can remain active at once.
Older blocks are removed automatically when the configured maximum is exceeded.
Demand and supply limits are tracked independently.
Forward projection
Forward Projection determines how far active order blocks extend to the right of the chart.
The zone continues updating forward while it remains active.
50% midline
Enable:
Show 50% Line
to display the midpoint of each order block.
This provides a visual reference for traders who use partial mitigation or midpoint interaction as part of their own process.
Structure break markers
Enable:
Show Structure Break Marker
to mark the candle where a valid displacement-driven structure break created a new order block.
These markers are optional and are disabled by default.
Labels
Enable:
Show Demand / Supply Label
to display the directional identity of each block directly inside the zone.
Colors
Demand and supply colors are fully configurable.
Users can also adjust:
fresh-block transparency
touched-block transparency
invalidated-block color
Alerts
The indicator includes alert conditions for:
New Demand Order Block
New Supply Order Block
Demand Order Block Entered
Supply Order Block Entered
Demand Order Block Invalidated
Supply Order Block Invalidated
Alerts must still be configured by the user through TradingView's alert system.
Example workflow
A trader may use the indicator to identify a demand zone created after a strong bullish displacement through prior structure.
The trader can then observe whether price:
remains away from the block → returns to the block → reaches the selected touch threshold → holds or invalidates
The indicator reports the state of the zone.
It does not determine whether the trader should enter.
Important
Coasyn Directional Order Blocks is a market-structure visualization tool.
It does not provide:
automatic entries
buy or sell recommendations
targets
stop placement
position sizing
automated execution
Order blocks should be interpreted within the trader's own market structure, risk, and strategy framework.
A displayed block is a reference zone, not a guarantee of future support, resistance, reversal, or continuation.
Built by Coasyn Market Systems. مؤشر

XZ_Research_UtilitiesLibrary "XZ_Research_Utilities"
Generic descriptive-statistics and two-column research-table utilities. Contains no XZ trading methodology or analytical authority.
resolvePosition(key)
Resolves a normalized table-position key.
Parameters:
key (string) : Position key.
Returns: Pine table position constant.
resolveTextSize(key)
Resolves a normalized text-size key.
Parameters:
key (string) : Size key.
Returns: Pine size constant.
countEqual(values, target)
Counts values equal to a target.
Parameters:
values (array) : Integer observations.
target (int) : Target value.
Returns: Matching observation count.
countPositive(values)
Counts values greater than zero.
Parameters:
values (array) : Integer observations.
Returns: Positive observation count.
countAtLeast(values, threshold)
Counts values at or above a threshold.
Parameters:
values (array) : Integer observations.
threshold (int) : Inclusive threshold.
Returns: Observation count at/above threshold.
sumInt(values)
Sums integer observations.
Parameters:
values (array) : Integer observations.
Returns: Sum.
selectedStat(values, mode)
Returns Median or Mean from float observations.
Parameters:
values (array) : Float observations.
mode (string) : "Median" or "Mean".
Returns: Selected descriptive statistic or na for an empty sample.
number(value, suffix)
Formats a numeric result with an optional suffix.
Parameters:
value (float) : Numeric result.
suffix (string) : Suffix such as d or %.
Returns: Formatted number or em dash for na.
percent(numerator, denominator)
Formats numerator/denominator as a percentage.
Parameters:
numerator (int) : Numerator.
denominator (int) : Denominator.
Returns: Percentage or em dash when denominator is zero.
createTable(positionKey, rows, backgroundColor, lineColor, showLines)
Creates a two-column research table.
Parameters:
positionKey (string) : Normalized table-position key.
rows (int) : Row count.
backgroundColor (color) : Background colour.
lineColor (color) : Frame/border colour.
showLines (bool) : Whether frame and borders are visible.
Returns: Table handle.
header(id, leftText, rightText, accentColor, textColor, backgroundColor, textSize, leftTooltip, rightTooltip)
Writes the two-column research header.
Parameters:
id (table) : Table handle.
leftText (string) : Left header text.
rightText (string) : Right header text.
accentColor (color) : Accent colour.
textColor (color) : Neutral text colour.
backgroundColor (color) : Shared background.
textSize (string) : Normalized text-size key.
leftTooltip (string) : Left-cell tooltip.
rightTooltip (string) : Right-cell tooltip.
Returns: True after rendering.
row(id, row, labelText, valueText, textColor, accentColor, backgroundColor, textSize, tooltipText, accentValue)
Writes one label/value research row.
Parameters:
id (table) : Table handle.
row (int) : Row index.
labelText (string) : Left label.
valueText (string) : Right value.
textColor (color) : Neutral text colour.
accentColor (color) : Optional emphasized value colour.
backgroundColor (color) : Shared background.
textSize (string) : Normalized text-size key.
tooltipText (string) : Shared metric-definition tooltip.
accentValue (bool) : Whether the right value uses accent colour.
Returns: True after rendering. مكتبة

Universal Daily Leverage Simulator (Candles)Have you ever wondered what any Daily Leveraged ETF on your favorite stock, index, or crypto would look like over decades?
This open-source indicator transforms any standard asset chart into a simulated daily leveraged product. By calculating the exact compounding math and daily rebalancing mechanics, it accurately reveals the powerful growth—and the destructive beta slippage (volatility decay)—associated with leveraged holding over long timeframes.
🌟 Key Features:
Universal Compatibility: Works seamlessly on ANY chart (S&P 500, NASDAQ, individual stocks like NVDA or TSLA, and Cryptocurrencies).
True Candlestick Rendering: Unlike basic line overlays, this script computes synthetic Open, High, Low, and Close (OHLC) values to print actual candlesticks.
Fully Customizable Leverage: Want to test a 1.5x, 2x, 3x, or even a 4x leverage? Simply open the Pine Editor and change the leverageFactor variable at the very top of the script to your desired number.
🛠 How to use it:
Open the chart of your choice on a Daily (1D) timeframe.
Add this script to the chart.
Zoom out to observe how severe market crashes (like 2000, 2008, or 2022) mathematically impact leveraged capital through compounding decay.
Disclaimer: This script is an educational and analytical tool designed to visualize mathematical compounding. It does not constitute financial or investment advice. Leveraged products carry extreme risk of capital loss, especially in volatile or sideways markets. Past performance does not guarantee future results. مؤشر

2x FVG + BOS/CHoCH + EMA + RSI Gradient + PVSRAOVERVIEW
2x FVG Structure and PVSRA Footprint Toolkit is an intraday market-analysis indicator designed to combine several different layers of market information into one structured workflow:
1. Trend and directional context using EMA 50 and EMA 200
2. Market structure using BOS and CHoCH
3. Price imbalance using Fair Value Gaps
4. Detection of two distinct same-direction FVG structures
5. Volume-based PVSRA / Vector Candle classification
6. Volume Footprint Buy/Sell dominance
7. Optional RSI-based candle coloring
8. Alerts for selected structural, EMA, FVG and PVSRA events
The purpose of combining these modules is not to produce a standalone automatic buy or sell signal.
Instead, the indicator is intended to help traders evaluate several independent pieces of market information on the same chart and determine whether price structure, imbalance, volume activity and directional participation are supporting the same market scenario.
The indicator does not place trades, calculate position size, define risk, or guarantee future price direction.
WHY THESE MODULES ARE COMBINED
This indicator is not intended to be a collection of unrelated indicators.
Each module has a specific role in the analysis process.
EMA 50 and EMA 200 provide broader directional context.
BOS and CHoCH identify changes or continuation in confirmed market structure.
Fair Value Gaps identify three-candle price inefficiencies.
The 2x FVG module identifies situations where two separate same-direction imbalance structures occur within a configurable number of bars.
PVSRA highlights candles with abnormal volume or volume-spread activity.
Volume Footprint statistics provide additional information about the distribution of classified Buy and Sell volume inside selected candles.
The intended workflow is therefore:
CONTEXT
→ STRUCTURE
→ IMBALANCE
→ VOLUME
→ FOOTPRINT CONFIRMATION
A trader can use each layer independently, but the main purpose of the indicator is to provide contextual confirmation between different types of market information.
EMA 50 AND EMA 200
The indicator calculates two Exponential Moving Averages:
Fast EMA:
Default length = 50
Slow EMA:
Default length = 200
Both lengths, colors and line widths can be changed in the settings.
The EMA module provides a simple representation of medium-term and longer-term price direction.
A bullish EMA cross occurs when the Fast EMA crosses above the Slow EMA.
A bearish EMA cross occurs when the Fast EMA crosses below the Slow EMA.
The script can display small visual markers when these crosses occur and can generate corresponding alert conditions.
The EMA module should be treated as market context rather than as an independent entry system.
For example, a trader may choose to give more weight to bullish structural setups while the Fast EMA is above the Slow EMA and more weight to bearish setups while the opposite condition exists.
This is only one possible interpretation and is not enforced by the indicator.
MARKET STRUCTURE: SWING HIGH AND SWING LOW
Market structure is calculated using confirmed pivot highs and pivot lows.
The Swing Length setting determines how many bars are required on each side of a potential swing.
With the default Swing Length of 5, a pivot requires five bars to the left and five bars to the right before it can be confirmed.
This has an important consequence:
A swing point cannot be known at the moment the original high or low occurs.
It becomes confirmed only after the required number of right-side bars exists.
Therefore, historical swing locations must not be interpreted as signals that were available at the original swing bar.
The indicator uses these confirmed swings as reference levels for BOS and CHoCH detection.
BOS — BREAK OF STRUCTURE
A Break of Structure identifies a break of a previously confirmed swing level in the current structural direction.
Depending on the Structure Break Confirmation setting, a break can be confirmed using:
Close
or
Wick
When Close is selected, price must close beyond the swing level.
When Wick is selected, the high or low of the candle can confirm the break.
A bullish BOS represents a confirmed break above a relevant swing high while the internal structural direction is already bullish or has not previously established a bearish reversal condition.
A bearish BOS represents the corresponding break below a relevant swing low.
BOS should generally be interpreted as a structural continuation event rather than an automatic trade signal.
CHOCH — CHANGE OF CHARACTER
CHoCH is used to identify a possible change in structural direction.
A bullish CHoCH occurs when price breaks a confirmed swing high while the previously tracked structure was bearish.
A bearish CHoCH occurs when price breaks a confirmed swing low while the previously tracked structure was bullish.
This can help identify potential transitions between bearish and bullish structure.
A CHoCH does not guarantee a reversal.
Markets frequently produce temporary structural breaks before continuing in the previous direction.
For this reason, CHoCH is intended to be evaluated together with other information such as FVGs, EMA context, PVSRA activity and Footprint dominance.
IMPORTANT STRUCTURE DISPLAY BEHAVIOR
When a BOS or CHoCH occurs, the horizontal structure line begins at the historical swing that was broken and ends at the bar that confirmed the break.
The visual line therefore extends backward to the location of the swing.
This does NOT mean the BOS or CHoCH signal was known at the swing bar.
The actual structural event is confirmed only when the later candle breaks the swing according to the selected Close or Wick confirmation method.
This distinction is important when visually reviewing historical charts.
FAIR VALUE GAP — FVG
The indicator detects traditional three-candle Fair Value Gaps.
A Bullish FVG is detected when:
Current Low > High from two bars earlier
A Bearish FVG is detected when:
Current High < Low from two bars earlier
This represents a price range that was not overlapped by the first and third candles of the three-candle sequence.
The FVG is created only on a confirmed bar.
Users can optionally apply a minimum FVG size filter.
The minimum size can be expressed in:
Points
or
Ticks
This can be useful for reducing very small imbalances that may have limited analytical value on a particular instrument.
The appropriate minimum FVG size depends on the instrument, volatility and timeframe.
There is no universal value that works for every market.
FVG VISIBILITY
The indicator allows users to display:
All available FVGs
or
Only FVGs from the most recent configured number of hours.
The default historical window is 24 hours.
A maximum number of FVG objects is also enforced to protect chart performance and TradingView object limits.
IMPORTANT:
The current implementation does not automatically remove an FVG simply because price later trades through or mitigates the zone.
The displayed FVG therefore represents the historical detection of the imbalance, not necessarily an active or unmitigated trading zone.
2x FVG LOGIC
The 2x FVG module is more selective than simply counting any two Fair Value Gaps.
The script tracks FVGs of the same direction occurring within the configurable Max Bars Between FVG setting.
The default value is 5 bars.
If a new same-direction FVG overlaps the currently tracked FVG cluster, the indicator treats the gaps as part of the same broader imbalance structure.
The cluster boundaries are expanded when necessary.
A 2x FVG event is generated when another same-direction FVG appears within the allowed bar window but forms a separate, non-overlapping imbalance rather than simply extending the existing cluster.
Therefore:
Two overlapping bullish FVGs are not necessarily treated as a completed 2x Bullish FVG signal.
Two distinct bullish FVG structures occurring close together can generate the bullish 2x marker.
The same logic applies in the bearish direction.
When an opposite-direction FVG occurs, the previous same-direction cluster is reset.
This design attempts to distinguish between one extended imbalance and two separate displacement events.
HOW TO INTERPRET 2x FVG
A 2x FVG should not automatically be interpreted as an entry.
It indicates that price has created multiple distinct inefficiencies in the same direction over a relatively short sequence of candles.
For example:
Bullish market structure
+
price above the broader EMA context
+
bullish BOS
+
two separate bullish FVGs
+
strong bullish PVSRA activity
provides more contextual information than a single FVG alone.
However, the indicator does not assign a statistical probability of success to such a configuration.
Users should test the behavior on the specific instrument and timeframe they trade.
PVSRA / VECTOR CANDLES
The PVSRA module classifies candles according to volume and candle spread.
The default volume lookback period is 10 bars.
The script calculates the average volume over this lookback period.
The default Above Average threshold is:
150% of average volume
The default Climax threshold is:
200% of average volume
A candle can also qualify as a Climax candle through the Volume x Spread calculation.
Volume x Spread is calculated as:
Volume × (High - Low)
The script compares this value with the highest Volume x Spread value over the configured PVSRA lookback.
This allows unusually large volume combined with a wide candle range to be identified even when the simple volume threshold alone may not fully describe the event.
PVSRA CANDLE COLORS
By default, the PVSRA candle categories are displayed as:
Green:
Bullish 200% / Climax candle
Red:
Bearish 200% / Climax candle
Blue:
Bullish 150% Above Average candle
Purple:
Bearish 150% Above Average candle
Light Gray:
Regular bullish candle
Dark Gray:
Regular bearish candle
All colors can be modified by the user.
The bullish or bearish classification of the candle itself is determined by comparing its Open and Close.
A bullish candle has:
Close > Open
A bearish candle has:
Close <= Open
PVSRA SOURCE SYMBOL
By default, PVSRA calculations use the current chart symbol.
An optional Override PVSRA Source Symbol setting is available.
This allows the volume calculations to use another symbol or data feed.
This feature should be used carefully.
If the PVSRA source symbol is different from the chart symbol, the volume information no longer represents exactly the same instrument displayed on the chart.
The user is responsible for selecting a logically appropriate source.
WHAT A PVSRA CLIMAX MEANS
A Climax candle indicates unusually high activity relative to recent bars.
It does NOT automatically indicate reversal.
For example, a bullish Climax candle can represent:
Strong continuation buying
Aggressive participation during a breakout
Buying absorption
Late participation near the end of a move
or increased activity around an important level.
Context is therefore essential.
A high-volume candle is evidence of increased activity, not proof of the next market direction.
VOLUME FOOTPRINT BUY/SELL DOMINANCE
The Footprint module uses TradingView's volume footprint data.
For selected candles, the script retrieves:
Total Volume
Buy Volume
Sell Volume
Volume Delta
The script then calculates:
Buy % = Buy Volume / Total Volume × 100
Sell % = Sell Volume / Total Volume × 100
Delta % = Volume Delta / Total Volume × 100
where:
Volume Delta = Buy Volume - Sell Volume
IMPORTANT INFORMATION ABOUT BUY AND SELL VOLUME
The words BUY and SELL in the Footprint module refer to TradingView's volume footprint classification.
TradingView classifies lower-timeframe volume according to the direction of intrabar price movement.
This should not be interpreted as direct access to every participant's intentions, resting limit orders, or the complete exchange order book.
The indicator does NOT display DOM resting liquidity.
It does NOT show pending limit orders.
It does NOT identify how many individual traders are buying or selling.
It displays TradingView's calculated Buy and Sell footprint volume categories.
This distinction is important when interpreting the values.
FOOTPRINT DOMINANCE
The indicator compares Buy % and Sell %.
If the difference between the two sides is smaller than or equal to the Neutral Threshold, the candle is classified as NEUTRAL.
The default Neutral Threshold is 5 percentage points.
For example:
BUY = 52%
SELL = 48%
Difference = 4 percentage points
With a 5% Neutral Threshold, this candle is considered neutral.
Another example:
BUY = 67%
SELL = 33%
Difference = 34 percentage points
This candle is classified as BUY dominance.
The same logic applies to SELL dominance.
FOOTPRINT BUBBLES
Footprint information is displayed using bubbles near selected candles.
BUY dominance is displayed below the candle.
SELL dominance is displayed above the candle.
Neutral conditions are also displayed above the candle.
The bubble can contain:
BUY or SELL classification
Buy or Sell percentage
Volume Delta percentage
A detailed tooltip can additionally display:
Buy Volume
Sell Volume
Total Volume
Buy %
Sell %
Absolute Delta
Delta %
Dominance classification
Difference between Buy and Sell percentages
DYNAMIC BUBBLE SIZE
When Dynamic Bubble Size is enabled, stronger Buy/Sell differences can produce larger bubbles.
The bubble size is therefore a visual representation of the magnitude of the Buy/Sell dominance difference.
It should not be interpreted as a prediction of future price movement.
The script also uses a simple anti-collision system that assigns nearby bubbles to different visual lanes to reduce overlap.
FOOTPRINT VISIBILITY FILTER
Users can choose which candles receive Footprint bubbles.
Available modes are:
200% Climax only
150% + 200%
All candles
The default mode is 200% Climax only.
This is intentional.
Displaying Footprint statistics only around unusually active PVSRA candles can reduce visual noise and focuses the Footprint module on bars where volume participation is already elevated.
FOOTPRINT HISTORY
The indicator includes an option to limit Footprint bubble history to approximately the most recent hour.
This reduces chart clutter and helps manage the amount of footprint data used by the script.
The current implementation also restricts footprint calculations to a limited number of recent bars for memory efficiency.
As a result, the Footprint component is primarily intended as a recent intraday analysis tool rather than a long-term historical footprint database.
The availability and precision of Footprint data can also depend on the symbol, timeframe, available market data and TradingView account/data access.
FOOTPRINT ROW SIZE
Ticks Per Footprint Row controls the aggregation size used in the footprint request.
However, this indicator currently uses the overall Buy Volume, Sell Volume, Total Volume and Delta of each requested footprint.
It does not display every individual footprint price row.
It therefore should not be confused with a complete Footprint chart showing bid/ask-style information at every individual price level.
RSI CANDLE GRADIENT
The indicator also includes an optional RSI candle-coloring mode.
The default RSI length is 14.
The gradient transitions through several ranges:
Very low RSI
→ green
Lower RSI
→ green/yellow
Mid-range RSI
→ yellow/orange
Higher RSI
→ red
Extreme high RSI
→ dark red
The default Oversold and Overbought reference values are 30 and 70.
This module is designed primarily as an alternative momentum visualization.
IMPORTANT:
PVSRA candle coloring has priority over RSI candle coloring.
If PVSRA and RSI Gradient are both enabled, PVSRA colors are displayed.
To view the RSI candle gradient directly, disable PVSRA candle coloring.
ALERTS
The indicator provides alert conditions for:
2x Bullish FVG
2x Bearish FVG
Any 2x FVG
Bullish BOS
Bearish BOS
Any BOS
Bullish CHoCH
Bearish CHoCH
Any CHoCH
Any Structure Break
Bullish EMA Cross
Bearish EMA Cross
Any EMA Cross
Bullish PVSRA Climax candle
Bearish PVSRA Climax candle
Any PVSRA Climax candle
Master "Any Signal" condition
The script also includes a repeating alert engine using alert() calls.
Signals are evaluated using confirmed bars.
This means alerts are intended to trigger after the relevant candle has closed rather than continuously changing during the still-forming candle.
The current Footprint bubble itself is not included as a separate alert condition.
PRACTICAL WORKFLOW
One possible way to use the indicator is to begin with directional context.
First evaluate the position and relationship of EMA 50 and EMA 200.
Then evaluate the most recent confirmed BOS or CHoCH.
Next examine whether the displacement created one or more Fair Value Gaps.
A 2x FVG can indicate that multiple separate price inefficiencies have formed in the same direction.
PVSRA can then be used to determine whether the move occurred with unusually high volume or Volume x Spread activity.
Finally, the Footprint bubble can provide additional information about TradingView-classified Buy/Sell volume dominance inside the selected high-activity candle.
This creates a multi-layer confirmation process rather than relying on one isolated indicator.
EXAMPLE OF BULLISH CONFLUENCE
A trader may observe:
EMA context favoring the upside
Bullish BOS or bullish CHoCH
Bullish FVG structure
Bullish 2x FVG
Bullish PVSRA Climax candle
BUY-dominant Footprint statistics
This combination may justify further investigation of a bullish scenario.
It does NOT mean a long trade must be taken.
The same concept can be mirrored for bearish conditions.
DIVERGENCE BETWEEN PRICE AND FOOTPRINT
The Footprint module may also be useful when its information disagrees with the candle direction.
For example, price may close bullish while the Footprint statistics show stronger Sell classification.
Likewise, a bearish candle may contain strong classified Buy volume.
Such situations can indicate more complex interaction between price movement and volume participation.
They can be worth observing around:
previous highs or lows
liquidity areas
major support or resistance
BOS or CHoCH levels
FVG boundaries
session extremes
However, these relationships are contextual observations and are not automatically classified by this version of the indicator as absorption or reversal signals.
TIMEFRAMES AND MARKETS
The indicator is primarily designed for intraday use.
It can technically operate on multiple standard chart timeframes, but the meaning of each component changes with timeframe and market structure.
Short timeframes generate more structural events and more FVGs, but also more noise.
Higher timeframes produce fewer signals and generally larger structural zones.
Users should adjust:
Swing Length
Minimum FVG Size
Maximum Bars Between FVGs
PVSRA thresholds
Footprint settings
according to the volatility and tick size of the instrument being analyzed.
The default settings should be treated as starting values rather than universally optimized parameters.
Volume-dependent modules are most meaningful on markets where reliable volume data is available.
STANDARD CANDLESTICK CHARTS RECOMMENDED
The indicator is designed for use with standard time-based candlestick charts.
Using synthetic chart types such as:
Heikin Ashi
Renko
Kagi
Point & Figure
Range
or Line Break
can change the relationship between displayed OHLC values and actual market prices.
For structural or signal-based analysis, standard candlestick charts are recommended.
REPAINTING, CONFIRMATION AND HISTORICAL DISPLAY
The script intentionally uses confirmed candles for FVG, structure, EMA-cross and PVSRA signal events.
The PVSRA security request uses lookahead disabled.
However, users should understand the behavior of confirmed pivots.
A pivot high or pivot low requires future right-side bars before it becomes confirmed.
The structure line is then drawn starting from the historical pivot.
Therefore, the historical location of a swing does not mean the swing was known in real time at that original candle.
Likewise, a BOS/CHoCH line visually beginning at a previous swing does not mean the structure break occurred there.
The actual BOS or CHoCH event occurs only on the later bar that confirms the break.
This is normal pivot-based structure behavior and should be considered when reviewing historical charts.
LIMITATIONS
This indicator does not predict future market direction.
It does not provide guaranteed entries or exits.
It does not calculate Stop Loss or Take Profit levels.
It does not calculate risk or position size.
It does not execute trades.
FVG zones are not automatically removed after mitigation.
BOS and CHoCH depend on confirmed swing pivots and therefore include structural confirmation delay.
PVSRA identifies unusual volume activity but cannot determine the intention of market participants.
Footprint BUY and SELL statistics are based on TradingView's footprint volume classification and should not be confused with direct DOM order-book liquidity.
The Footprint module currently uses bar-level total Buy/Sell statistics rather than displaying the complete footprint ladder at every price level.
The availability and granularity of Footprint data depend on TradingView's available lower-timeframe data and market-data access.
Historical results should not be interpreted as evidence of future performance.
INTENDED USE
This indicator is intended as a discretionary market-analysis toolkit.
It is most useful when the trader evaluates the relationship between:
market direction
confirmed structure
price imbalance
volume expansion
and Buy/Sell volume distribution
rather than interpreting any single visual element as an automatic trading signal.
Users are encouraged to test the indicator on historical and real-time data, understand each component independently, and build their own risk-management rules before using the information in live trading. مؤشر

Coasyn Session AnchorCoasyn Session Anchor
Coasyn Session Anchor is an intraday session-reference tool for marking important FX trading-session events directly on the chart.
The indicator can track:
Tokyo Open
Tokyo Close
Europe Open
London Open
New York Open
New York Close
Each enabled event can create:
a vertical timing marker showing when the session event occurred
a horizontal price anchor extending from that event
an optional label identifying the session
The indicator does not generate trade signals, determine market direction, or execute orders.
Its purpose is to provide consistent session timing and price-reference levels.
How to use it
Open the indicator settings and first choose your Anchor Timezone.
The default is:
Etc/UTC
All session times entered in the indicator are interpreted using this timezone.
For each session event, you can:
Enable or disable the event.
Enter the event time using HH:MM format.
For example:
00:00
07:00
08:00
13:30
Session times
The default configuration is:
Tokyo Open — 00:00
Tokyo Close — 09:00
Europe Open — 07:00
London Open — 08:00
New York Open — 13:30
New York Close — 21:00
These times are fully editable.
If your preferred session definition, broker convention, daylight-saving adjustment, or operating timezone is different, change the values in the settings.
Horizontal anchor price
The Horizontal Anchor Price setting determines which price is used when a session event occurs.
Event Open
Uses the chart bar's opening price when the session anchor is detected.
Event Close
Uses the chart bar's closing price.
The resulting level extends to the right as a reference for later price interaction.
Vertical session markers
Enable:
Show Vertical Session Timing Lines
to draw a vertical line at each enabled session event.
This provides a visual reference for when major trading sessions begin or end.
Horizontal session levels
Enable:
Show Horizontal Anchor Levels
to extend the selected event price across the chart.
These levels can be used to observe how price behaves relative to prior session participation points.
The indicator does not assign bullish or bearish meaning to those levels.
Labels
Enable:
Show Anchor Labels
to identify each session directly on the chart.
Labels include:
TOKYO OPEN
TOKYO CLOSE
EUROPE OPEN
LONDON OPEN
NY OPEN
NY CLOSE
Historical anchors
By default, Keep Historical Anchors is disabled.
When disabled, each session event keeps only its most recent anchor.
For example, when the next London Open occurs, the previous London Open anchor is removed and replaced with the new one.
Enable Keep Historical Anchors if you want previous session anchors to remain visible.
Be aware that keeping large amounts of historical session data can create substantially more chart objects.
Display controls
The indicator allows you to configure:
session colors
line width
horizontal levels
vertical timing markers
labels
historical anchors
Each major session can use its own color so different session events remain easy to distinguish.
Example workflow
A trader operating during the London and New York sessions might enable:
Europe Open
London Open
New York Open
while disabling session events they do not use.
The chart will then maintain timing and price anchors for those specific events.
This makes it easier to observe whether price is trading:
above or below a session-opening reference
back through a prior session level
around the transition between trading sessions
The interpretation remains entirely with the trader.
Timeframe note
Coasyn Session Anchor is designed primarily for intraday charts.
The precision of an anchor depends on the chart timeframe.
On lower intraday timeframes, the bar containing the configured session time will generally provide a more precise representation of that event.
On larger chart intervals, one candle may span multiple session events, so the event price should be treated as a broader reference rather than an exact tick-level session price.
Important
Coasyn Session Anchor is an informational charting tool only.
It does not provide:
buy or sell signals
trade entries
targets
stop placement
position sizing
automated execution
directional recommendations
It provides time and price anchors around the session events selected by the user.
Built by Coasyn Market Systems. مؤشر

ATK / DEF Temporal Session Position & Market State EngineATK / DEF — Temporal Session Position & Market State Engine is a quantitative market analysis framework built around multiple timeframes and multiple market sessions.
The framework combines HTF / MTF / LTF temporal structure with the Asian, London, and New York sessions, while calculating price position, volume relationships, volatility, statistical dispersion, and market states.
Unlike conventional multi-timeframe analysis, which primarily compares directional conditions across different periods, this framework extends the temporal structure into a quantitative relationship between price position, volume, volatility, session activity, and structural location.
## Multi-Timeframe Structure
The framework includes:
* Monthly — HTF
* Weekly — HTF
* Daily — MTF
* 4-Hour — LTF
* 1-Hour — LTF
Each timeframe provides calculated and volume data together with relative volume conditions.
The data from different periods is organized within the same analytical structure to observe changes in price position and volume relationships across multiple temporal layers.
## Multi-Session Structure
The framework calculates three major market sessions:
* Asian Session
* London Session
* New York Session
Each session maintains calculated:
* Open
* Close
* High
* Low
* Volume
Session data is further used to calculate:
* Drive
* Burst
* Decay
* Reversal
Session calculations use the exchange timezone of the selected symbol.
This creates two complementary temporal dimensions: **timeframe structure and market-session structure**.
## Quantitative Price Position
The framework calculates the current price position within the high-low range of the Monthly, Weekly, Daily, 4-Hour, and 1-Hour periods.
The multi-period position data is furth calculated into:
* Position Average
* Position Dispersion
* Alignment
* Divergence
Position Average represents the average calculated position across the available timeframe layers.
Position Dispersion represents the statistical separation between those timeframe positions.
These calculations provide a quantitative reference for observing alignment and differences between temporal layers.
## Volume & Volatility
Volume conditions are calculated through the relationship between current volume and its historical average.
Volatility is calculated using ATR relative to its ATR average and classified into:
* Very Low
* Normal
* High
* Extreme
The framework also identifies volatility state changes as:
* Expanding
* Contracting
* Flat
These states are generated from mathematical conditions defined within the script and represent calculated market-state classifications.
They do not claim to directly identify instl activity, capital flws, or specific market participants.
## Structural Reference
Swing High and Swing Low calculations provide structural price references with Support and Resistance labels.
These structural references are displayed together with timeframe position, session conditions, volume relationships, and volatility measurements.
## Statistical Observation
The core framework combines:
**Timeframe Structure
* Session Structure
* Price Position
* Volume Relationship
* Volatility
* Statistical Dispersion
The resulting structure provides a multi-dimensional analytical view of relationships between different timeframe layers and market sessions.
## Analytical Purpose
ATK / DEF is designed solely for market observation and analytical reference.
All displayed values and classifications are generated from defined mathematical conditions within the srpt. Different instr, data envir, and paras may produce different calculated results.
The displayed information is intended to remain subject to the own interpretation and defined decision-making.
Market observation, analytical reference, and decision-making only.**
مؤشر

مؤشر

Coasyn Risk GateCOASYN Risk Gate is a pre-trade risk checking tool for FX traders.
It does not generate entries, trade signals, or orders. The trader decides what they want to trade, then enters the planned trade information into Risk Gate before sizing the position.
The purpose is simple: check whether the proposed trade fits your own risk rules before you commit capital.
How to use it
Open the indicator settings and enter your planned trade information.
Choose LONG or SHORT, then enter your intended Entry Price and Stop Price.
Next, configure the risk limits you want Risk Gate to enforce:
Account Size — the account value used for the risk calculation.
Max Account Risk % — the maximum percentage of the account you are willing to risk on one trade.
Planned TradingView Risk % — the percentage you are currently planning to use when sizing the trade.
Minimum Reward R Required — the minimum reward-to-risk level you want displayed as an acceptable target.
Minimum / Maximum Stop Distance Pips — your acceptable stop-distance range.
ATR Stop Reality Gate — compares the proposed stop distance with current ATR so unusually tight or unusually wide stops can be flagged.
Min / Max Stop ATR — determines the acceptable stop-distance range relative to ATR.
Once the entry and stop are entered, Risk Gate calculates the proposed stop distance, ATR relationship, allowed account risk, planned monetary risk, and projected R levels.
Reading the panel
The top of the panel shows the current risk status.
RISK ACCEPTABLE means the trade currently passes the risk rules you configured.
Other messages explain why the trade has failed the precheck, including:
ENTRY REQUIRED — no entry price has been entered.
STOP REQUIRED — no stop price has been entered.
INVALID STOP — entry and stop are the same price.
STOP ON WRONG SIDE — a long trade has the stop above the entry, or a short trade has the stop below the entry.
RISK ABOVE LIMIT — the planned account risk exceeds your configured maximum.
STOP TOO WIDE / STOP TOO TIGHT — the proposed stop falls outside your pip-distance limits.
STOP WIDE VS ATR / STOP TIGHT VS ATR — the proposed stop falls outside your configured ATR-relative range.
At the bottom of the panel:
CAN SIZE means the setup has passed the configured risk gates.
DO NOT SIZE means one or more risk conditions still fail.
Chart levels
When Show Entry / Stop / R Lines is enabled, the indicator draws the proposed:
Entry
Stop
Minimum acceptable R target
directly on the chart.
These are planning references only. They do not place or modify orders.
The panel also displays the calculated 1R price, your configured minimum acceptable R price, and the 2R price.
Example workflow
You identify a trade setup independently.
You plan:
Direction → Entry → Stop
Enter those values into COASYN Risk Gate.
Risk Gate then checks the proposed trade against your configured risk limits.
If the panel returns CAN SIZE, you can move on to your normal position-sizing or order-entry process.
If it returns DO NOT SIZE, review the reason shown in the panel before proceeding.
Important
COASYN Risk Gate is a risk decision-support tool, not a trading system.
It does not determine whether a trade is good, predict market direction, calculate an automatic entry, or execute orders.
Your strategy determines whether you want the trade.
Risk Gate helps determine whether the proposed risk structure fits the rules you configured. مؤشر

20/50 EMA Pullback Tap IndicatorThe 20/50 EMA Pullback Tap Indicator is a simple price-action based tool designed to identify potential entries after a momentum shift, rather than entering immediately when the 20 EMA crosses the 50 EMA.
The core idea is simple:
The EMA cross identifies a change in momentum. The pullback provides the entry.
How It Works
🟢 Long Setup
The 20 EMA crosses above the 50 EMA.
The indicator arms a bullish setup.
No trade is signalled on the crossover.
Price must first establish itself above the 20 EMA.
The indicator then waits for price to pull back and touch the 20 EMA.
When the 20 EMA is tapped, a BUY signal is generated.
Only one long signal is generated from that crossover.
If price does not touch the 20 EMA within 30 candles, the setup expires.
🔴 Short Setup
The short setup works in the opposite direction:
The 20 EMA crosses below the 50 EMA.
The indicator arms a bearish setup.
No trade is signalled on the crossover.
Price must first establish itself below the 20 EMA.
The indicator waits for price to pull back and touch the 20 EMA.
When the 20 EMA is tapped, a SELL signal is generated.
Only one short signal is generated from that crossover.
If price does not touch the 20 EMA within 30 candles, the setup expires.
Why Use the Pullback?
A common problem with EMA crossover systems is entering immediately on the crossover. By the time the cross occurs, price may already have moved significantly.
This indicator takes a different approach.
The 20/50 crossover is treated as confirmation that momentum has shifted, while the 20 EMA pullback is used as the potential entry location.
This can provide a more structured entry instead of chasing the initial move.
No Additional Indicators
The indicator intentionally keeps the methodology simple.
It does not use:
RSI
MACD
VWAP
Volume filters
Additional trend indicators
Multiple confirmation indicators
The system is built around just:
20 EMA + 50 EMA + Pullback to the 20 EMA
Signal Behaviour
The indicator is designed to detect the EMA tap during the active candle rather than requiring the candle to close first.
This means signals can appear while the current candle is developing when price reaches the 20 EMA.
Because of this behaviour, traders should understand that a live-bar signal can change or disappear before the candle closes depending on market movement and TradingView's realtime calculations.
Setup Expiration
Each crossover creates a new setup.
If the required pullback does not occur within the configured number of candles, the setup is automatically cancelled.
The default expiration is:
30 candles
This prevents an old EMA crossover from generating an entry long after the original momentum shift.
Recommended Use
The indicator can be used on its own as a simple EMA pullback system or combined with a trader's own:
Support and resistance
Market structure
Liquidity levels
Risk management
Higher-timeframe analysis
However, these additional concepts are not required by the indicator itself.
Important Disclaimer
This indicator identifies potential setups based on the rules described above. A signal does not guarantee a profitable trade.
Always use appropriate risk management and test the indicator on your chosen market and timeframe before using it with real capital. مؤشر

مؤشر

Trident Swing Projector [MarkitTick]💡 A structured swing-projection tool that automates Charles Lindsay's Trident quarter-swing method, turning a manual charting technique into a filtered, alert-ready framework for identifying retracement setups and projecting forward trade levels from a confirmed three-point swing structure.
✨ Originality and Utility
This script's value is not in reinventing pivot detection — left/right bar pivot confirmation is a known technique — but in the specific architecture built around it. The 25/50/75/100% level ladder projected from the retracement point follows the quarter-swing framework described by Charles Lindsay in his Trident work: a method of projecting Support/Resistance, Critical, and Equality points from a confirmed A-B-C swing. Everything surrounding that ladder — the pullback-depth gate, the dominant-trend filter, the ADX and higher-timeframe confluence layers, the configurable stop buffer, the armed-setup expiry, and the post-TP1 break-even handling — are MarkitTick design additions layered on top of Lindsay's original concept, not part of it.
The reason these pieces are combined rather than published separately is that a quarter-swing projection on its own is only as useful as the swing that produced it. A shallow, weak, or counter-trend retracement produces a projection ladder that is statistically less meaningful than one built from a decisive, trend-aligned impulse. The trend filter, pullback-depth window, ADX threshold, and HTF bias check all exist to answer one question before a projection is drawn: was this A-B leg significant enough to justify projecting from it? The trade-management layer (stop buffer, expiry, break-even) then exists to turn that projection into something that can be monitored and alerted on in real time, rather than only viewed as a static drawing. Each component is a gate or a consequence of the others; none of them functions as an independent indicator bolted on for its own sake.
The script is an indicator, not a strategy — it does not backtest or simulate equity. It identifies swing structures, projects levels from them, tracks whether those levels are subsequently reached, and reports all of this through a live dashboard and structured alert payloads.
🔬 Methodology and Concepts
● Confirmed Pivot Detection
Swing highs and lows are identified using a left/right bar-count pivot method: a candidate high or low is only confirmed once it has stood as the extreme point across both the bars to its left and the bars to its right, using the Pivot Left and Pivot Right settings. Because the check always references bars that have already closed, a pivot is never inferred from the currently forming bar — it is published exactly one bar after its right-side confirmation window completes. This is a deliberate implementation choice made to keep pivot detection non-repainting.
● The A-B-C Swing Structure
Once two consecutive confirmed pivots exist, the script watches for a third pivot that retraces into the prior leg:
Point A — the origin pivot (a confirmed swing low ahead of a bullish setup, or swing high ahead of a bearish one).
Point B — the impulse pivot that follows A, defining the A-B leg.
Point C — a new, opposing pivot that pulls back into the A-B leg by a percentage between the Min Pullback % and Max Pullback % settings (23.6–78.6% by default). Pullbacks shallower or deeper than this window are rejected and no setup is formed.
If the Trend Filter is enabled, the A-B leg must also break the previous confirmed swing extreme in the same direction (B must exceed the prior swing high for a bullish setup, or undercut the prior swing low for a bearish one) before a retracement at C is allowed to qualify. This restricts setups to legs that are extending the dominant swing rather than forming inside a range.
● Leg Measurement and Smoothing
The A-B leg is measured either in raw price points or as a percentage move, depending on the Swing Unit setting. Before that leg size is used to derive projection levels, it can optionally be passed through one of five smoothing methods — SMA, RMA, WMA, HMA, or VWMA — set by Signal Smoothing and Smoothing Length. The smoothing is applied as a ratio between the smoothed and raw leg size and multiplied into the current leg, so that projection distances are influenced by the recent typical swing size on the instrument rather than reacting entirely to the size of a single leg. With Signal Smoothing set to None, the raw leg size is used unmodified.
● Quarter-Swing Level Projection
From point C, four levels are projected using fixed fractions of the A-B leg, applied in the direction of the new setup:
25% of the leg → Entry level.
50% of the leg → TP1, labeled as the Critical level in Lindsay's terminology.
75% of the leg → TP2.
100% of the leg → TP3, the Equality target — a projected swing from C equal in size to the original A-B leg.
The Stop is placed at point C itself, with an optional buffer applied beyond it — either a fixed number of ticks or a fraction of the current ATR (ATR Length setting) — configured through Stop Buffer, Buffer Ticks, and Buffer ATR Fraction.
● Confluence Filters
Two independent filters can each block a setup from arming even after a valid A-B-C structure is found:
ADX Filter — requires the DMI-derived ADX value (ADX Length setting) to be at or above the ADX Threshold before a setup is allowed to arm, intended to avoid projecting swing levels during weak-trend, low directional-strength conditions.
HTF Confirmation — requests a higher timeframe's close (HTF Timeframe setting) and compares it against the prior higher-timeframe close to derive a simple directional bias. A setup is only allowed to arm if this bias agrees with the setup's direction. The higher-timeframe read uses a confirmed prior-bar close with lookahead correctly paired to that offset, so this filter does not draw on unconfirmed higher-timeframe data.
● Trade Management and State
Once a setup arms, it steps through a defined state sequence: Armed, Active (entry triggered), TP1 hit, TP2 hit, TP3 hit, Stopped, or Cancelled. Entry triggers when a confirmed close crosses the Entry level; a setup is cancelled if its Armed Expiry Bars limit is reached before entry, or if price closes back through point C first. If Stop to Breakeven after TP1 is enabled, the internally tracked stop moves to the entry price once TP1 is hit — this managed stop is reported in the dashboard and in alert payloads, but the stop line and label drawn on the chart intentionally remain at the original level, so the chart never displays a level implying a fill that did not actually occur at that price.
● Confirmation Lag Notice
Because pivot confirmation requires Pivot Right bars to elapse, and entry/cancellation logic checks a confirmed prior-bar close, every swing structure, entry trigger, and cancellation event appears with a built-in lag relative to the exact bar that produced it. This is a structural trade-off, not a defect: it is what keeps the A-B-C structure and its projected levels from repainting once drawn. Separately, TP1/TP2/TP3 target detection and the corresponding alerts monitor the current bar's high/low in real time rather than waiting for bar close, so a target can be marked and alerted as reached intrabar, before that bar has finished forming. This is standard behavior for real-time level-touch monitoring, but it means the exact moment a target fires can occur before the bar closes.
🎨 Visual Guide
A · B · C labels — small grey markers placed at the three confirmed pivots that define the active setup, drawn once the pattern is confirmed (so they sit slightly in the past relative to the bar that produced them).
Projected Leg — a dashed grey line running from point C forward to the TP3 price level, spanning a time distance matched to the original A-B leg's bar length. This shows the projection visually before price has necessarily reached it.
Entry line and label — a dashed blue line at the 25% projection level, labeled with the exact price.
Stop line and label — a solid line at point C (plus buffer, if configured), colored to match the Bearish color setting, labeled with the exact price. The label updates to show a hit confirmation and the resulting percentage move once the stop is reached, noting separately if the exit was a trend-failure stop or a break-even exit.
TP1 / TP2 / TP3 lines and labels — dashed lines at the 50/75/100% levels, each labeled with price and the resulting reward-to-risk multiple. Each label updates to show a hit confirmation and percentage move once reached.
BULL / BEAR entry marker — a small label placed at the bar where the Entry level is actually crossed, confirming the setup transitioned from Armed to Active.
Dashboard table — a live panel (toggled and positioned via the Dashboard settings) showing direction, state, entry/stop/managed-stop/target prices, reward-to-risk bars for each target, pullback depth, A-B swing size, bars since entry, HTF bias, ADX condition, and active smoothing method.
Non-standard chart warning — if the chart is displaying Heikin Ashi, Renko, Kagi, Point & Figure, Linebreak, or Range bars, a warning label appears directly on the chart, since projected price levels are not meaningful on synthetic bar types.
📖 How to Use
Wait for a confirmed A-B-C structure to complete. The A and B markers appear once a swing has formed, and the C marker (with entry/stop/target lines) appears only once a pullback within the configured percentage window is confirmed.
Treat the Entry line as the level the script is watching for a confirmed close through, not an instruction to enter immediately at C.
Use the Stop line as the invalidation level for the setup — a confirmed close back through point C cancels an armed setup outright.
Read TP1 (Critical), TP2, and TP3 (Equality) as sequential projection targets rather than a single expected outcome; the dashboard's reward-to-risk bars for each target update as price approaches or reaches them.
Check the HTF Bias and ADX rows in the dashboard if those filters are enabled, to understand why a structurally valid A-B-C pattern may not have armed.
Use the webhook alert payload's state and event fields to drive automation, rather than relying on price levels alone, since the payload also reports the managed (break-even) stop separately from the originally drawn stop.
⚙️ Inputs and Settings
● Core
Pivot Left / Pivot Right — bar counts required on each side of a swing point before it is confirmed as a pivot. Larger values produce fewer, more significant, and later-confirmed pivots.
Swing Unit — measures the A-B leg in raw price Points or as a Percent move, changing how leg size (and therefore all projected distances) is calculated.
● Filters
Trend Filter — requires the A-B leg to break the prior confirmed swing extreme in the setup's direction.
Min Pullback % / Max Pullback % — the acceptable retracement depth window for point C, as a percentage of the A-B leg.
HTF Confirmation / HTF Timeframe — requires a higher-timeframe directional bias to agree with the setup direction before arming.
ADX Filter / ADX Length / ADX Threshold — requires trend strength (via DMI/ADX) to clear a minimum threshold before arming.
Signal Smoothing / Smoothing Length — applies SMA, RMA, WMA, HMA, or VWMA smoothing to the leg magnitude used for projections.
● Trade Tools
Lock Signal — freezes the current signal and blocks any new setup from arming.
Stop Buffer / Buffer Ticks / Buffer ATR Fraction / ATR Length — adds extra distance beyond point C when placing the stop, either as a fixed tick count or a fraction of ATR.
Armed Expiry Bars — cancels an armed (not yet triggered) setup if the Entry level isn't closed through within this many bars.
Stop to Breakeven after TP1 — moves the internally tracked (managed) stop to entry once TP1 is hit, reported in the dashboard and alerts without moving the drawn stop line.
● Visuals and Dashboard
Trade Levels / A · B · C Markers / Projected Leg / Entry Markers — independent toggles for each chart element.
Keep Last N Setups — limits how many historical setups' drawings remain on the chart, to stay within drawing object limits.
Show Dashboard / Position — toggles and positions the live info panel.
● Alerts
Long / Short / Close Long / Close Short / Info Action strings — customizable text values inserted into the "action" field of the JSON alert payload, for direct use in webhook automation.
● Colors
Independent color controls for bullish/bearish/neutral tones, stop, entry, target, A·B·C markers, projected leg, label text, and dashboard header/body/text colors.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The projection ladder at the core of this script is drawn from the Trident method associated with Charles Lindsay, a framework built around measuring a swing's magnitude and projecting proportional fractions of it forward from a retracement point to derive Support/Resistance, Critical, and Equality levels. The underlying premise is that markets frequently move in self-similar proportional legs, so a retracement of a known size can be used to project plausible forward extension distances — the 50% "Critical" level and the 100% "Equality" level (a projected move matching the original leg) are the two most emphasized points in that framework, reflected here in TP1 and TP3 respectively.
The pullback-depth window applied to point C (23.6–78.6% by default) situates the acceptable retracement zone within a range commonly associated with Fibonacci retracement theory, without asserting that Fibonacci ratios themselves drive the projection math — the projection ladder here is a fixed 25/50/75/100% division of the leg, independent of the retracement percentage that qualified point C.
The ADX/DMI filter is grounded in Welles Wilder's directional movement framework, which measures trend strength by comparing the smoothed magnitude of directional price movement to overall volatility; applying a minimum threshold is a common approach to excluding range-bound conditions from directional setups, though ADX is a lagging, smoothed measure and does not itself predict continuation.
The higher-timeframe bias filter reflects multi-timeframe confluence theory: the idea that a directional bias visible on a longer aggregation of price is a useful, if imperfect, filter for shorter-timeframe setups, since it reduces (but does not eliminate) the chance of trading against the prevailing higher-timeframe trend.
The leg-smoothing step applies standard moving-average theory (simple, exponential-family, weighted, Hull, and volume-weighted variants) not to price directly, but to the derived leg-size series, an approach intended to make projected distances reflect a instrument's typical recent swing amplitude rather than the idiosyncrasies of a single leg.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. مؤشر

Waves [LTW] v0.5📊Waves v0.5
Among all the indicators I have used, the most effective one remains the fundamental volume indicator, which represents the aggregate of buy and sell orders through column heights—a tool we are all familiar with. However, traditional volume indicators are often insufficient for detecting Market Maker (MM) intervention. This is because the MMs driving the crypto market typically utilize institutional-grade services (Prime Brokerage), such as Prime, Institutional/VIP, and OTC desks.
Does this render volume indicators obsolete? Ludwig Wittgenstein argued that our everyday language is, in fact, strictly bound to the rigorous rules of a massive 'language game.' From a similar perspective, price charts are bound by the strict rule that movement requires volume. Therefore, I believe volume remains an absolutely crucial metric.
Inspired by the meme "In the beginning, there was a sine wave," this custom indicator averages the heights of volume columns and applies mathematical filters—such as HMA (Hull Moving Average) for minimal lag and smooth curves, and ALMA (Arnaud Legoux Moving Average) for excellent noise reduction. This process visualizes volume as a smooth curve with specific periodic wavelengths and amplitudes. The indicator identifies "meaningful volume" only when a volume column breaches this wave amplitude, making it highly effective for visual analysis.
---
⚙️ Key Features (Concept)
Sine Waves
▪️ Low Volatility (Calm Waves): In consolidation phases where volume is practically nonexistent, the user-defined colored area flattens against the bottom and moves slowly. This can be interpreted as a phase where energy is being compressed for the next expansion. Alternatively, from an MM's perspective, this is an uninteresting zone with zero volume generation. As volume gradually dries up, it implies a higher probability of reverting to the price point where the previous volume peaked, potentially returning to the immediate Point of Interest (POI). In a bear market, meaningful volume typically occurs only when breaking new lows.
▪️ Volume Spike (Rising Wavelength & Amplitude): The visual representation of the wave gradually rising, hitting a peak, and then descending becomes highly distinct. Near this peak, there is a high probability of witnessing a trend climax or a Liquidity Sweep.
▪️ Measuring Momentum via Divergence (Short-term vs. Long-term Volume Waves): You can intuitively gauge the intensity of market intervention through these wave-like forms.
Divergence Analysis: If the price makes a higher high, but the peak (amplitude) of the volume wave is lower than the previous peak (Bearish Divergence), it signals that the volume momentum driving the trend is fading. This allows you to respond more swiftly to common RSI divergence traps and anticipate various variables. (For example, in Constance Brown's RSI, the median value of 50 is often more critical than standard overbought/oversold levels. It is very common for RSI to peak, rapidly revert to 50, and then continue to make new highs. Standard RSI divergence fails to analyze this "cooling down" process, leading to frequent false signals in strong, one-way trending markets.)
Pulse Waves
When a volume column breaches the wave, a horizontal extension line is drawn from the peak value of that column towards the right side of the chart until the next breakout occurs. This makes it easy to visually analyze whether subsequent volume is greater or less than the previous peak volume.
You can analyze market flow by observing how many smaller Pulse Waves form within a larger Pulse Wave. For instance, you can spot if the peak column of a large wave opened and closed as a bullish candle, but the peaks of the smaller inner waves are consistently closing as bearish candles.
The newly updated Pulse Wave label allows you to intuitively check the quantitative difference between the currently forming volume and the previous peak volume.
---
📌 Settings Guide
1. Waves Length: You can adjust the smoothing length in the settings. Entering Fibonacci numbers like 21, 34, or 55 groups the historical volume data and major market volume cycles into wavelengths. Applying a mathematical smoothing filter (e.g., ALMA) to this grouped data (default is 34) trims the noise (spiky volume columns) to create a perfectly smooth curve.
2. Smooth Mode: To accommodate different trading styles, users can select various smoothing methods. This allows for faster detection of divergences or quicker identification of volume inflows at POI (Point of Interest) zones.
3. Multiplier: This setting determines the release range of the extension line (which resembles a pulse wave) from the peak volume to the next peak volume, without decay.
---
🔥 Practical Trading Tips (Cautions)
This indicator does not provide standalone entry signals (Buy/Sell) like those used by indicator sellers. It is designed to be a supplementary tool. For optimal results, cross-verify your entry positions using professional order book and data aggregators like TapeSurf (formerly Okotoki), or slippage analysis indicators like the Kinetic Slippage Index (KSI) by HPotter. Rather than blindly trusting a single indicator, please use this to establish and refine your own unique trading style. مؤشر

مؤشر

XZ_Table_PrimitivesLibrary "XZ_Table_Primitives"
Generic Pine table construction and cell-rendering primitives for XZ scripts. Contains no trading methodology or analytical authority.
resolvePosition(key)
Resolves a normalized position key to a Pine table position.
Parameters:
key (string) : Position key: top_left, top_center, top_right, middle_left, middle_center, middle_right, bottom_left, bottom_center or bottom_right.
Returns: Pine position constant.
resolveTextSize(key)
Resolves a normalized text-size key to a Pine size constant.
Parameters:
key (string) : Text-size key: tiny, small, normal, large or huge.
Returns: Pine size constant.
create(positionKey, columns, rows, backgroundColor, frameColor, frameWidth)
Creates a table using caller-supplied presentation values.
Parameters:
positionKey (string) : Normalized table position key.
columns (int) : Number of columns.
rows (int) : Number of rows.
backgroundColor (color) : Table background color.
frameColor (color) : Table frame color.
frameWidth (int) : Table frame width.
Returns: New table handle.
clearRegion(id, firstColumn, firstRow, lastColumn, lastRow)
Clears a rectangular region of an existing table.
Parameters:
id (table) : Table handle.
firstColumn (int) : First column index.
firstRow (int) : First row index.
lastColumn (int) : Last column index.
lastRow (int) : Last row index.
Returns: True after clearing.
cell(id, column, row, cellText, textColor, backgroundColor, textSize, horizontalAlign, tooltipText)
Writes one fully specified table cell.
Parameters:
id (table) : Table handle.
column (int) : Column index.
row (int) : Row index.
cellText (string) : Cell text.
textColor (color) : Text color.
backgroundColor (color) : Cell background color.
textSize (string) : Pine text size constant.
horizontalAlign (string) : Pine text alignment constant.
tooltipText (string) : Cell tooltip text.
Returns: True after writing.
twoColumnRow(id, row, labelText, valueText, labelColor, valueColor, backgroundColor, textSize, labelTooltip, valueTooltip)
Writes one two-column label/value row.
Parameters:
id (table) : Table handle.
row (int) : Row index.
labelText (string) : Left-cell text.
valueText (string) : Right-cell text.
labelColor (color) : Left text color.
valueColor (color) : Right text color.
backgroundColor (color) : Shared cell background color.
textSize (string) : Shared Pine text size constant.
labelTooltip (string) : Left-cell tooltip.
valueTooltip (string) : Right-cell tooltip.
Returns: True after writing both cells.
twoColumnHeader(id, row, leftText, rightText, leftColor, rightColor, backgroundColor, textSize, leftTooltip, rightTooltip)
Writes one two-column header/decoder row.
Parameters:
id (table) : Table handle.
row (int) : Row index.
leftText (string) : Left-cell text.
rightText (string) : Right-cell text.
leftColor (color) : Left text color.
rightColor (color) : Right text color.
backgroundColor (color) : Shared background color.
textSize (string) : Shared Pine text size constant.
leftTooltip (string) : Left-cell tooltip.
rightTooltip (string) : Right-cell tooltip.
Returns: True after writing both cells.
mergedSection(id, row, firstColumn, lastColumn, sectionText, textColor, backgroundColor, textSize, tooltipText)
Writes one merged full-width section row.
Parameters:
id (table) : Table handle.
row (int) : Row index.
firstColumn (int) : First column to merge.
lastColumn (int) : Last column to merge.
sectionText (string) : Section text.
textColor (color) : Text color.
backgroundColor (color) : Cell background color.
textSize (string) : Pine text size constant.
tooltipText (string) : Cell tooltip.
Returns: True after writing and merging. مكتبة

50% Retrace of Previous HTF Candles50% Retrace of Previous HTF Candles
This indicator plots the 50% midpoint of the most recently completed candle on five higher timeframes: Daily, 4-Hour, 1-Hour, 30-Minute, and 15-Minute.
Each level is drawn as a horizontal line that starts at the exact close of the previous higher-timeframe candle and ends a short distance after the current bar. A clear label sits to the right of each line so you can quickly see which timeframe it belongs to.
How it works
The script pulls the high and low of the last fully closed candle on each timeframe using request.security(), then calculates the simple midpoint: (High + Low) / 2. Because it only uses completed candles, the levels do not repaint.
Why these timeframes?
These five timeframes cover a useful range of market structure:
Daily – Captures the broader daily bias and key structural levels.
4H – Common intermediate timeframe used by many day and swing traders.
1H – Bridges higher timeframes with intraday price action.
30m & 15m – Provide finer, more responsive levels for shorter-term entries and exits.
Together they give a layered view of recent higher-timeframe midpoints without cluttering the chart with every possible timeframe.
Why this is useful
Many traders watch the midpoint of recent higher-timeframe candles as potential areas of interest. Price often reacts around these 50% levels — either finding support/resistance or treating them as mean-reversion reference points. Having multiple HTF midpoints visible at once gives useful context without constantly switching timeframes.
Customization
You can toggle each timeframe on or off independently, change the colors, adjust the line width and style, and modify the labels if you prefer different wording. Everything is controlled from the indicator settings.
Currently uses a coral color palette designed to stay visible on both light and dark charts.
Simple, clean, and focused on one practical concept. مؤشر

XZ_Display_PrimitivesLibrary "XZ_Display_Primitives"
Generic bar-time drawing primitives for Pine scripts. Creates, updates or deletes lines, labels and boxes from caller-supplied presentation facts. Contains no trading methodology or analytical authority.
horizontalLine(id, visible, leftTime, rightTime, price, extendRight, lineColor, lineStyle, lineWidth)
Creates, updates or deletes one horizontal bar-time line.
Parameters:
id (line) : Existing line handle, or na.
visible (bool) : Whether the line should exist.
leftTime (int) : Left endpoint time.
rightTime (int) : Right endpoint time used when the line is finite and as the current anchor when projected.
price (float) : Horizontal price.
extendRight (bool) : True to project with extend.right, false for a finite segment.
lineColor (color) : Line color.
lineStyle (string) : Pine line style.
lineWidth (int) : Line width.
Returns: Updated line handle, or na when hidden/invalid.
segmentLine(id, visible, firstTime, firstPrice, secondTime, secondPrice, lineColor, lineStyle, lineWidth)
Creates, updates or deletes one finite bar-time line segment.
Parameters:
id (line) : Existing line handle, or na.
visible (bool) : Whether the line should exist.
firstTime (int) : First endpoint time.
firstPrice (float) : First endpoint price.
secondTime (int) : Second endpoint time.
secondPrice (float) : Second endpoint price.
lineColor (color) : Line color.
lineStyle (string) : Pine line style.
lineWidth (int) : Line width.
Returns: Updated line handle, or na when hidden/invalid.
priceLabel(id, visible, xTime, price, labelText, textColor, backgroundColor, labelStyle, labelSize, tooltipText, textAlign)
Creates, updates or deletes one price-anchored bar-time label.
Parameters:
id (label) : Existing label handle, or na.
visible (bool) : Whether the label should exist.
xTime (int) : Label time coordinate.
price (float) : Label price coordinate.
labelText (string) : Visible label text.
textColor (color) : Label text color.
backgroundColor (color) : Label background color.
labelStyle (string) : Pine label style.
labelSize (string) : Pine label size.
tooltipText (string) : Tooltip text.
textAlign (string) : Pine text alignment.
Returns: Updated label handle, or na when hidden/invalid.
timeBox(id, visible, leftTime, rightTime, top, bottom, extendRight, fillColor, borderColor, borderStyle, borderWidth)
Creates, updates or deletes one bar-time box.
Parameters:
id (box) : Existing box handle, or na.
visible (bool) : Whether the box should exist.
leftTime (int) : Left box time.
rightTime (int) : Right box time used when finite and as the current anchor when projected.
top (float) : Top price.
bottom (float) : Bottom price.
extendRight (bool) : True to project with extend.right, false for finite geometry.
fillColor (color) : Box fill color. May be na.
borderColor (color) : Box border color. May be na.
borderStyle (string) : Pine line style for the border.
borderWidth (int) : Border width.
Returns: Updated box handle, or na when hidden/invalid.
setBoxColors(id, fillColor, borderColor)
Applies fill and border colors to an existing box without changing geometry.
Parameters:
id (box) : Box handle.
fillColor (color) : New fill color.
borderColor (color) : New border color.
Returns: True after the no-op or update.
setBoxBorderColor(id, borderColor)
Applies only a border color to an existing box without changing geometry.
Parameters:
id (box) : Box handle.
borderColor (color) : New border color.
Returns: True after the no-op or update.
setLabelTextColor(id, textColor)
Applies text color to an existing label without changing its geometry or text.
Parameters:
id (label) : Label handle.
textColor (color) : New text color.
Returns: True after the no-op or update.
clearBoxText(id)
Clears box text without changing geometry or styling.
Parameters:
id (box) : Box handle.
Returns: True after the no-op or update. مكتبة

XZ_Core_UtilitiesLibrary "XZ_Core_Utilities"
Generic formatting, identifier parsing and neutral geometry helpers for XZ scripts. Contains no XZ methodology or analytical authority.
csvContainsPositiveInt(objectId, csvIds)
Returns true when a positive integer ID occurs as a comma-separated token.
Parameters:
objectId (int) : Positive integer to search for.
csvIds (string) : Comma-separated integer text. Spaces are ignored.
Returns: True when objectId occurs as an exact parsed token.
csvFirstPositiveInt(csvIds)
Returns the first positive integer token in comma-separated text.
Parameters:
csvIds (string) : Comma-separated integer text. Spaces are ignored.
Returns: First parsed positive integer, or 0 when none exists.
nearDuplicateBounds(lowA, highA, lowB, highB, tolerancePct)
Tests whether two low/high geometries are near-duplicates under a supplied percentage tolerance.
Parameters:
lowA (float) : First lower bound.
highA (float) : First upper bound.
lowB (float) : Second lower bound.
highB (float) : Second upper bound.
tolerancePct (float) : Tolerance as a percentage of the wider geometry.
Returns: True when both corresponding boundaries fall within the calculated tolerance.
formatDate(eventTime, timezone)
Formats a timestamp as yyyy-MM-dd in the supplied timezone.
Parameters:
eventTime (int) : UNIX timestamp in milliseconds.
timezone (string) : Timezone string accepted by str.format_time().
Returns: Formatted date, or an em dash for na.
formatPercent(value)
Formats a percentage value with up to two decimals.
Parameters:
value (float) : Percentage value.
Returns: Percentage text, or an em dash for na.
formatSignedPercent(value)
Formats a signed percentage value with up to two decimals.
Parameters:
value (float) : Percentage value.
Returns: Signed percentage text, or an em dash for na.
timeframeLabel(tf)
Converts common TradingView timeframe strings into compact readable labels.
Parameters:
tf (string) : TradingView timeframe string.
Returns: Compact label such as 1D, 1W, 4H or 15m.
formatDistance(distance, useTicks, minTick)
Formats an absolute price distance as points or ticks. Unit policy is supplied by the caller.
Parameters:
distance (float) : Raw price distance.
useTicks (bool) : True to convert distance to ticks.
minTick (float) : Instrument minimum tick.
Returns: Formatted absolute distance with explicit unit.
directionalMovePct(fromPrice, toPrice, minTick)
Calculates signed percentage move from one price to another.
Parameters:
fromPrice (float) : Chronological starting price.
toPrice (float) : Chronological ending price.
minTick (float) : Instrument minimum tick used to reject a near-zero denominator.
Returns: Signed percentage move, or na when unavailable.
normalizedPositionPct(currentValue, lowPrice, highPrice)
Calculates normalized position of a value within low-to-high geometry.
Parameters:
currentValue (float) : Value being located.
lowPrice (float) : Geometry lower bound.
highPrice (float) : Geometry upper bound.
Returns: Position percentage where 0 is the lower bound and 100 is the upper bound. Values may fall outside 0-100.
formatElapsedDays(fromTime, toTime)
Formats elapsed milliseconds between two timestamps as fractional days.
Parameters:
fromTime (int) : Starting timestamp.
toTime (int) : Ending timestamp.
Returns: Day text with singular/plural unit, or an em dash when invalid.
quartilePrice(low, high, levelIndex)
Returns one of five equally spaced 0/25/50/75/100 geometry levels.
Parameters:
low (float) : Lower geometry bound.
high (float) : Upper geometry bound.
levelIndex (int) : Integer level index from 0 to 4.
Returns: Price at the requested quartile level.
quartileText(levelIndex)
Returns the display text for quartile level index 0-4.
Parameters:
levelIndex (int) : Integer level index from 0 to 4.
Returns: 0%, 25%, 50%, 75% or 100%.
appendUniqueToken(current, token, separator)
Appends a token only when it is not already present in a separator-delimited string.
Parameters:
current (string) : Existing token string.
token (string) : Token to append.
separator (string) : Delimiter between tokens.
Returns: Original or extended token string. مكتبة

Futures Settlement [DigitalD] - LabeledFutures Settlement Levels is a market-structure tool designed to help traders identify and monitor key futures settlement prices directly on the chart.
The indicator plots Daily, Weekly, Monthly, and Quarterly settlement levels, providing clear reference points that can be used to evaluate price location, support/resistance, trend conditions, and potential areas of reaction.
Key Features
Daily Settlement — Displays the most recent daily futures settlement price.
Weekly Settlement — Tracks the current weekly settlement level.
Monthly Settlement — Provides the latest monthly settlement reference.
Quarterly Settlement — Optional quarterly settlement level for higher-timeframe analysis.
Historical Weekly & Monthly Levels — Optionally reprints previous settlement levels for additional historical context.
Settlement Averages — Optional midpoint/average of the previous two weekly or monthly settlements.
Quarterly Contract Settlements — Optional final settlement levels for quarterly futures contracts.
Chart Labels — Clearly identifies each settlement level and displays its corresponding price.
Back-Adjusted Futures Support — Provides an option for analyzing continuous back-adjusted futures data.
Non-Standard Chart Support — Designed to maintain accurate settlement references on charts such as Heikin Ashi and Renko.
How Traders Can Use It
Settlement prices can serve as important reference levels throughout the trading session. Traders can monitor whether price is:
Above settlement → potential bullish positioning/context
Below settlement → potential bearish positioning/context
Repeatedly rejecting settlement → potential support/resistance or balance area
Breaking and holding beyond settlement → potential shift in market structure
The indicator is particularly useful when combined with price action, volume, VWAP, market structure, and higher-timeframe analysis.
Important
This indicator is a reference and analysis tool, not a standalone trading system. Settlement levels should be evaluated in the context of the specific futures contract, market conditions, liquidity, and your broader trading strategy.
Designed for traders who want clean, objective futures settlement levels without cluttering the chart. مؤشر

Rob Hoffman IRB + MA Trend OVERVIEW
This indicator combines Rob Hoffman's Inventory Retracement Bar (IRB) setup with his moving average overlay set and "No-Trend Zone", and adds a trend gate so IRB signals only fire when the market is actually trending. The idea is simple: trade continuation in a clean trend, and stay out when price is chopping around the averages.
Everything runs on the price chart — no separate pane.
THE INVENTORY RETRACEMENT BAR (IRB)
An IRB is a bar that pushes against the prevailing trend and then closes back in a way that shows the counter-trend move is running out of steam.
- Long IRB: the bar's open AND close are both at least 45% below its high (a long upper wick in an uptrend).
- Short IRB: the bar's open AND close are both at least 45% above its low (a long lower wick in a downtrend).
IRB bars are marked with small triangles. The IRB itself is not the entry — it's the setup.
ENTRY TRIGGER
After an IRB forms, the indicator waits up to 20 bars (adjustable) for price to confirm:
- "Extreme high/low break" (default): entry when price breaks one tick beyond the IRB's high (long) or low (short). This is the classic rule.
- "Close past retracement level": an earlier, more aggressive entry that triggers when a bar closes back through the IRB's 45% retracement level.
If price instead breaks the opposite side of the IRB before triggering, the setup is cancelled. Confirmed entries are labeled "IRB L" / "IRB S".
IRBs with an unusually large range (more than 2x ATR by default) are ignored, since oversized retracement bars tend to fail more often.
MOVING AVERAGE OVERLAY
The full MA set is plotted for context:
- SMA 3 and 5 (fast speed lines)
- EMA 18 and 20 (primary trend lines — the 20 EMA is highlighted in gold)
- SMA 50, SMA 89, EMA 144, SMA 200 (longer-term trend lines)
The ribbon can be hidden if you only want the core lines.
NO-TREND ZONE
The blood-red cloud is the No-Trend Zone: a Keltner-style channel built from a 34-period EMA with a band of 0.45x the EMA-smoothed true range. When price is inside or hugging this zone, the market isn't trending and IRB signals are suppressed.
The band smoothing can be switched to RMA (Wilder ATR). If you want to match the original overlay set exactly, use length 35, multiplier 0.5, and RMA smoothing.
TREND GATE
An IRB only counts when all of these agree:
1. Price has closed outside the No-Trend Zone in the direction of the trade.
2. Price is on the correct side of the 20 EMA — or, optionally, still on the correct side of the 89 EMA anchor, so a deep pullback through the 20 doesn't cancel an otherwise healthy trend.
3. (Optional, on by default) No long IRBs below the 89 EMA anchor and no short IRBs above it.
The gate can be turned off to see every raw IRB bar shape regardless of trend.
Trend angle: Hoffman looks for the 20 EMA sloping at roughly 45 degrees. This is deliberately NOT coded — Pine Script has no access to the chart's pixel scale, so any "degrees" value would change with zoom and wouldn't match what you see. Judge the slope by eye.
TRAILING STOP REFERENCE
A yellow dotted line shows a reference stop: it starts at the IRB's low (long) or high (short) when an entry triggers, then trails at 1.5x ATR while the trend holds, and clears when hit or when the trend is lost. It's a visual guide only and does not manage any position.
ALERTS
Two alert conditions are available: "Hoffman IRB Long Entry" and "Hoffman IRB Short Entry". Signals on the live, unconfirmed bar can change until that bar closes, so "Once Per Bar Close" is recommended when creating alerts.
HOW TO USE IT
- Trade in the direction of the trigger labels only.
- When price is sitting in the red cloud, stand aside — that is the chop the zone exists to keep you out of.
- Look for a clearly sloping 20 EMA; flat averages mean weak continuation.
- Use the IRB's opposite extreme (or the trailing stop line) as a logical stop reference.
CREDITS
The Inventory Retracement Bar setup, the moving average overlay set, and the No-Trend Zone concept are Rob Hoffman's publicly taught methods. The overlay set was cross-referenced against UCSgears' open-source "Rob Hoffman - Overlay Set" script. This script is an independent implementation and is not affiliated with or endorsed by Rob Hoffman.
This indicator is for educational purposes and is not financial advice. Past signals do not guarantee future results.
مؤشر
