Chaikin Fisher Transform Divergence & Early Reversal# 📌 CFisherDiv — Chaikin Fisher Transform Divergence & Early Reversal
## Purpose of the Indicator
This indicator combines the **Chaikin Oscillator**, a volume-based momentum oscillator, with **Fisher Transform** mathematics, which converts price/momentum extremes into sharp turning points. The goal is to take the "soft" and lagging signals produced by the classic Chaikin Oscillator and make them earlier and clearer through the Fisher transform's sharp peak/trough structure, which approximates a Gaussian distribution.
On its own, the indicator addresses:
- Removing the ambiguity in interpreting the raw Chaikin Oscillator (by offering a normalized oscillation line with defined boundaries via the Fisher transform)
- Catching trend exhaustion early through **pivot-based divergence** detection, in addition to classic crossover signals
- Giving advance notice of reversals from overbought/oversold zones with **"early reversal"** signals, before a full crossover forms
## Attribution for Methods Used
This indicator is an original synthesis of two independent, well-known technical analysis methods:
- **Chaikin Oscillator**: Developed by Marc Chaikin, this classic volume-momentum oscillator takes the difference between short- and long-period EMAs of the Accumulation/Distribution line. In this indicator it's calculated via the built-in `ta.accdist` function.
- **Fisher Transform**: Developed by John F. Ehlers, this mathematical method compresses any oscillating series into the -1 to +1 range and then applies a logarithmic transform to produce a sharp, approximately Gaussian-distributed signal. Originally applied to price, this technique is applied here to the classic Chaikin Oscillator's output instead.
The pivot-based divergence detection and "early reversal" logic are additional layers designed originally for this script; no third-party code was used as a base.
## How Is It Calculated?
1. **Chaikin Oscillator**: `ema(accdist, fast length) - ema(accdist, slow length)`
2. **Fisher Normalization**: The oscillator value is normalized into the -0.5 to +0.5 range based on the highest/lowest values within the chosen period, then smoothed with a weighted average and clamped to ±0.999.
3. **Fisher Transform**: The normalized value is logarithmically transformed via `0.5 × ln((1+x)/(1-x))`, then weighted with the previous bar's value. The result is the Fisher line (`fish`) and its one-bar-lagged trigger (`trigger`).
## Parameters
**Chaikin Oscillator**
- *Fast Length* (default 3): The short EMA period of the Accumulation/Distribution line
- *Slow Length* (default 10): The long EMA period of the Accumulation/Distribution line
**Fisher Transform**
- *Fisher Normalization Length* (default 10): The lookback window over which the oscillator's highest/lowest values are calculated. Shortening it speeds up the signal but increases noise.
- *Overbought Level* (default 1.5) / *Oversold Level* (default -1.5): Horizontal thresholds defining the Fisher line's extreme zones.
**Divergence**
- *Show Divergences*: Toggles divergence lines and labels on/off.
- *Pivot Left Bars / Pivot Right Bars* (default 4/4): The number of bars required on each side of a peak or trough for it to be confirmed as a pivot. Increasing this produces more reliable but more delayed pivots.
- *Max Bars Between Pivots* (default 60): The maximum bar distance over which divergence is searched for between two pivots; prevents meaningless pairing of pivots that are too far apart.
**Early Reversal**
- *Show Early Reversal Signals*: Toggles early signals that form on exit from an extreme zone.
- *Signal Cooldown (Bars)* (default 5): The mandatory minimum bar distance between consecutive early signals (prevents excessive signal repetition).
## How to Interpret the Signals
- **Green/Red triangle (Long/Short Crossover)**: The Fisher line crossing its own trigger up/down — a classic momentum reversal signal.
- **RegBull / RegBear (Regular Divergence)**: Price makes a new low/high while the Fisher line fails to confirm it — indicates the current trend is losing steam, a potential trend reversal.
- **HidBull / HidBear (Hidden Divergence)**: Price makes a shallower low/high while the Fisher line makes a deeper low/high — a confirmation signal that the current trend is likely to continue.
- **Cyan/Orange diamond (Early Bullish/Bearish Reversal)**: A leading signal triggered when the Fisher line begins to turn while still in the oversold/overbought zone, before a full crossover forms. Earlier than the other signals but carries a higher risk of false signals; confirmation with price action or another indicator is recommended.
## Usage Note
Since the indicator relies on volume data, it will not work on symbols that don't provide volume information (some forex pairs, indices, etc.) and will report this with an error message on the chart. The signals are designed to be used for trend following and confirmation alongside other technical/fundamental analysis tools, not as standalone buy/sell decisions. Past performance is not a guarantee of future results. مؤشر

MOYA Sessions & Volume Profile [RealSebastianMoya]Hello traders!
Introducing: "MOYA Sessions and Volume Profile"
This script rebuilds a full Volume Profile for any session length you choose — from a single Tokyo/London/New York session up to a full Yearly cycle — and layers on POC, Value Area High/Low, a live in-progress profile, and (new) real futures volume normalization for Forex/CFD charts.
But before getting into the settings, it's worth explaining where this way of reading the market comes from, because the indicator has no real value if you don't know what questions it's actually answering.
The Underlying Theory: Auction Market Theory
The market isn't a line going up or down. It's a continuous auction. At every moment, buyers and sellers are negotiating a "fair" price, and price moves searching for the level where both sides are willing to transact in volume.
This theory — originally developed for Market Profile by J. Peter Steidlmayer at the CBOT — starts from a simple idea:
Price tells you where the market moved. Volume tells you how much conviction was behind that move.
A regular candlestick chart only shows you the time sequence of price. A Volume Profile rotates that information 90 degrees and asks a different question at every price level: "how much actually traded here?"
The level with the most activity is the Point of Control (POC) — the price the market has "voted" for most often as fair.
The Two Market Regimes
Under this theory, the market constantly alternates between two regimes:
Balance / Equilibrium
Technical name: Balance, Rotational Value Area
What it means: Buyers and sellers accept a range and price rotates inside it without clear direction
Profile shape: Bell curve (D-Shape) — POC centered
Imbalance / Trend
Technical name: Imbalance, Trend Day, Directional Auction
What it means: One side (buyers or sellers) dominates and price refuses to rotate, moving away from the range
Profile shape: Spike (P-Shape or b-Shape) — POC at one extreme
Knowing which regime the market is in completely changes what a touch of the POC or a Value Area edge should mean to you. This is what many newer traders miss: they apply the same rule ("buy at VAL, sell at VAH") regardless of regime, and end up fading strong trends as if they were reversions.
Correct Terminology — What Each Thing Is Actually Called
Here's the real vocabulary used when trading with Volume Profile, so you know exactly which term to use and what each one means:
Levels
POC (Point of Control): the price with the highest traded volume in the session. It's the center of gravity of price.
VAH (Value Area High): the upper boundary of the zone where 70% (adjustable) of volume occurred.
VAL (Value Area Low): the lower boundary of that same zone.
Value Area (VA): the full range between VAH and VAL — the fair price zone accepted by the market.
Naked POC: a POC from a previous session that price has not yet returned to touch. These act as strong magnets because they represent unresolved business.
Price Behaviors
Mean Reversion: when price moves away from the POC but returns to it because the market is in balance. This is the dominant behavior inside an equilibrium regime.
Continuation: when price breaks a Value Area extreme and keeps moving in that direction without returning, because the market is in imbalance.
Rejection: price touches a level (VAH, VAL, or POC) and snaps back quickly, leaving a wick — a sign that level was defended.
Acceptance: price enters a zone and stays there, building new volume — a sign the market considers that new range fair.
Excess: a long, thin wick with no volume behind it — a sign of violent rejection of a price, typical at range extremes.
Breakout: when price exits the Value Area with force and increasing volume. If acceptance follows the breakout, it confirms as a trend start; if there's no acceptance, it's a false breakout (fakeout) and price returns to the range (this is mean reversion after a failed breakout attempt).
Double Distribution (B-Shape): when the profile shows two high-volume zones separated by a low-volume zone — indicates the market was in two distinct price agreements during the session, typical of a trend that paused midway.
On Buyers and Sellers
Classic Volume Profile doesn't directly measure who bought or sold (that's what Delta/CVD does, not part of pure profile reading), but dominance can be inferred by observing:
If the POC shifts upward session after session, buyers are defending higher prices, buyer control.
If the POC shifts downward session after session, seller control.
If the POC stays relatively fixed while volume grows, both sides are actively negotiating without ceding ground, balance, indecisive market.
How the Indicator Works Within This Theory
The script tracks session boundaries using exact timeframe change detection and rebuilds the price/volume grid every time a new session starts.
Each candle's volume is distributed across the price levels its high-low range actually touched (body/wick weighted model), so the profile reflects where price genuinely spent time and volume — not just where it closed.
Once a session closes, the script locates the POC and expands outward, level by level, until the configured percentage of total volume (default 70%) is captured — that boundary becomes your Value Area.
Rather than just showing you where price moved, this helps you answer:
Where did volume concentrate during the session?
Was the session accepted (balance) or rejected (imbalance)?
Where is the fair price zone for this period?
How does that zone line up against higher or lower timeframe context?
While a session is still forming, the script keeps its profile, POC, and Value Area updating in real time (Live Zone) — not just the last closed session — so you can react to developing structure instead of only analyzing it afterward.
Trading Scenarios — How This Is Actually Traded
These are the real scenarios where this reading applies. You add the chart; here's the logic behind each one.
Scenario 1 — Mean Reversion Inside Balance
Regime context: The previous session's profile shows a bell-curve shape (D-Shape), POC centered, and a wide Value Area that has stayed stable across several sessions. This indicates a market in balance.
What you see on the Volume Profile: Current price is drifting away from the POC toward the VAH without growing volume behind it (little real push).
Reading: Since we're in a balance regime, the move toward VAH is likely testing the edge of the range, not the start of a trend.
How it's traded: Look for a short on rejection at the VAH, targeting the POC. Stop above the VAH with a small buffer. This is the classic fade trade — and it only makes sense because the regime is balance; the same signal in a trending regime would be a trap.
Scenario 2 — Continuation After a Breakout With Acceptance
Regime context: Price breaks above the previous session's VAH. Instead of falling back, price stays above that level for several candles, and the new forming profile (Live Zone) starts building its own POC above the old VAH.
What you see on the Volume Profile: Acceptance — the market is actively trading in the new price range, not just passing through it.
Reading: This is evidence of directional imbalance — control shifted hands (likely to buyers) and a new Value Area is forming higher up.
How it's traded: Look for a long entry on the first pullback into the old VAH (which now acts as support — the classic resistance-to-support flip), targeting the next significant volume level from a higher timeframe (e.g., the weekly POC if you're trading on Daily). Stop below the old POC.
Scenario 3 — False Breakout (Fakeout) — Reversion, Not Continuation
Regime context: Price breaks below the VAL with a strong candle, but in the following session (or in the indicator's Live Zone) price returns inside the original Value Area without building new volume below.What you see on the Volume Profile: No acceptance — the new profile forming outside the range has very little volume compared to the prior profile, a sign nobody is defending that price.
Reading: The breakout was a liquidity grab, not a real regime change. The market is still in balance.How it's traded: Look for a long entry on the return inside the Value Area, targeting the POC and potentially the opposite VAH. This is the scenario where confusing "breakout" with "continuation" costs the most money — which is why the indicator's Live Zone is key: it lets you see in real time whether the new profile is gaining volume (real continuation) or staying empty (fakeout).
Scenario 4 — Double Distribution (B-Shape) — A Pause Inside a TrendRegime context: The session's profile shows two separate high-volume zones with a thin low-volume "neck" between them.
What you see on the Volume Profile: The market traded heavily in one range, then migrated and traded heavily again in another range, without spending much time in the middle.Reading: This typically occurs inside a trend that paused — two distinct price agreements in the same session, usually connected by a fast directional move (the low-volume "neck" is where price moved without resistance).
How it's traded: The low-volume neck (the thin part of the profile) is a low-liquidity zone — if price returns there, it tends to cut through quickly in either direction, not stay. It's not a zone to trade reversion; it's a zone to wait for price to cross through and react at the POC of whichever side it's heading toward.
Scenario 5 — Multi-Timeframe Confluence (the Indicator's Most Powerful Use)Regime context: You run the indicator on Weekly and see current price touching the weekly VAL. You switch to Daily and see a daily POC also forming right at that same level.
What you see on the Volume Profile: Two different timeframes coinciding at the same price — the "why" (weekly context) and the "when" (daily execution) are aligned.Reading: This confluence across timeframes is the highest-probability signal in the whole system, because it doesn't depend on a single profile — it depends on the market respecting the same level from two different time perspectives.
How it's traded: Take the entry on Daily (precise execution), with directional bias given by the weekly regime (if weekly price is in balance, trade the reversion toward the weekly POC; if weekly is in imbalance, trade continuation toward the next relevant volume level). Stop goes outside the daily Value Area; target is the weekly POC or the opposite VAH/VAL, depending on the identified regime.
Scenario 6 — Using Real Futures Volume to Confirm Regime on Forex/CFDRegime context: You're trading XAUUSD on your CFD broker. Your broker's tick volume is synthetic (it counts price changes, not real contracts), so a profile built on that volume can show a different shape than actual market activity.
What you see on the Volume Profile: With External Futures Volume enabled and auto-detect pointing to COMEX:GC1! (Gold futures), the profile now reflects real futures market participation, while price levels still come from your XAUUSD chart.
Reading: This matters especially when your broker's tick volume gives you a POC in one place and real futures volume gives you a POC somewhere else — the difference tells you that real institutional market activity sits at a different level than what your broker is showing.
How it's traded: Prioritize the POC/VA calculated with real futures volume over native tick volume when the two diverge, because regulated futures volume (CME/COMEX/NYMEX) is auditable and reflects real participation, while tick count only reflects your specific broker's activity.Summary — Why Use This IndicatorThis script is designed for traders who read the market through:Volume Profile and Point of Control / Value Area (Auction Market Theory)Market regime identification (balance vs. imbalance)Multi-timeframe confluenceReal vs. synthetic volume on Forex/CFD instruments
Because you can run the same profile logic across completely different session lengths — from a single hourly cycle to a full year — you can compare how conviction built across timeframes: does the Daily POC sit inside last week's Value Area? Is price accepted or rejected at last month's VAH? That layered context is where this script earns its keep.Note: every scenario assumes you identify the market regime (balance vs. imbalance) first before deciding whether to trade reversion or continuation — trading the wrong signal for the wrong regime is the most common cause of losses when using Volume Profile.
Features
56 Session Lengths — 1 to 55 Minutes (1m, 2m, 3m, 4m, 5m, 6m, 7m, 8m, 9m, 10m, 12m, 15m, 20m, 25m, 30m, 35m, 40m, 45m, 50m, 55m), Tokyo, London, New York, 1 Hour through 12 Hours, Daily through 7 Days, Weekly through 5 Weeks, Monthly through 7 Months, Quarterly, Yearly.
POC, VAH, VAL with lines and text labels.
HVN/LVN — detects multiple volume peaks and valleys per session, not just the single POC.
External Futures Volume — auto-detects the real related futures contract for your symbol (metals, forex, indices, energy, crypto).
Live Panel — POC, VAH, VAL, distance, VA position, active volume source.
Configurable Styling — independent colors, widths, and sizes for every element.
Open Source Attribution and Credits
In strict compliance with TradingViews House Rules regarding open-source code reuse, I explicitly credit and thank the original developer @LeviathanCapital for their open-source script "Market sessions and Volume profile - By Leviathan", which served as the structural foundation for the session isolation and baseline volume array logic in this indicator.
Significant Algorithmic Enhancements and Added Value:
While the primary mathematical grid expansion retains architectural roots from open source, this script introduces massive procedural improvements, structural upgrades, and new calculations developed entirely by me to transform it into an institutional-grade utility:
Automated External Futures Volume Normalization (Forex/CFD Context): Implemented a dictionary algorithm (getAutoFuturesTicker) to auto-detect and scale native tick charts against centralized futures markets (e.g., CME:6E1!, COMEX:GC1!, CME_MINI:NQ1!). This replaces synthetic broker data with authentic trading volume while maintaining local price scales.
Volume Nodes Engine (Multi-Peak HVN / LVN Detection): Developed an array scanning filter that runs on closed sessions to automatically isolate contiguous high/low volume anomalies. This effectively flags multiple supply/demand zones (like the humps of a double-distribution profile) beyond the baseline single POC.
Real-Time Live Zone Tracking: Integrated a dynamic recalculation engine for ongoing unclosed trading sessions, updating developing POCs, VAHs, and VALs seamlessly on the active bar state.
Interactive Live Dashboard Panel: Programmed a comprehensive on-screen status table displaying absolute values for POC/VAH/VAL, current distance from point of control, value area boundary status, and status indicators of the active volume feed.
Expanded Graphical and Period Customization: Redesigned aesthetic configurations, text label sizing, box boundary styles, and added resolution adjustments alongside line right-extensions.
Open Source Attribution and Credits
In strict compliance with TradingViews House Rules regarding open-source code reuse, I explicitly credit and thank the original developer LeviathanCapital for their work.
The original script "Market sessions and Volume profile - By @LeviathanCapital served as the logical foundation for the session isolation and baseline volume array logic in this indicator. All rights and original logical baselines remain under their respective ownership.
مؤشر

Top Strategy Finder [SpokoStocks]Top Strategy Finder
What if your chart could tell you which trading rule has actually worked on it?
Add this script to any symbol, any timeframe, and it backtests up to 2,304 complete strategies on that exact chart, ranks them, and shows a leaderboard you can read like a sentence: "Buy when RSI(2) drops below 10, only in calm volatility, exit on the reverse signal." Pick a row. Its trades appear on your price chart, its open position shows entry, stop and target, and its alerts are ready. No coding, no settings to tune.
Then it does something most strategy finders never show you: it walks forward and reports, without hindsight, whether trusting its own picks would have made money.
The problem it solves
Every strategy finder finds a winner. That is the easy part. Test enough rules on the same data and something always looks brilliant. The question that decides whether you make money is different: would that rule have worked from the moment you picked it?
This script answers it on the chart. On every bar it re-ranks all strategies using only the bars seen so far and follows a basket of the current leaders. The blue curve is what following those picks, bar by bar, would have produced. The gold curve is the champion's in-sample record. The gap between them is selection bias, drawn in the open. When both rise, the edge survived being chosen. When only the gold one does, you were looking at luck.
What you get
Leaderboard
• The top strategies (6 by default, up to 10) in plain language: entry on the first line, exit and filter on the second
• Trades and win rate as a bar, profit factor, net and max drawdown, all heat-coloured, in a table kept narrow so the chart stays visible
• Rank 1 starred, your selected row highlighted
• A trading plan for the selected row: exactly when to buy or sell, in which market condition, and how to exit
• A walk-forward line: what following the top basket would have earned, and how often the champion changed
• A "now" line: what your selected strategy and the basket hold on this bar
Performance pane
• Growth from the same start bar: buy & hold, the walk-forward basket, the champion, your selected row
• Each curve named with its result at the right edge
• Basket profit or loss area, optional drawdown shading, optional log scale
Price chart
• The selected strategy's recent trades drawn as green or red segments
• Its open trade with entry, stop and target lines
• Exposure shading and markers whenever the followed strategy turns long, short or flat
Alerts
• Selected strategy enters long, enters short, exits
• Basket turns long or short
• Champion enters long or short, champion changed
What is tested
Each strategy = one entry signal × one direction × one exit rule × one market filter.
24 entries, each with a long and a mirrored short version: EMA 9/21 and 20/50 crosses · close crossing SMA 20 and SMA 50 · RSI(2) beyond 10/90 and 5/95 · RSI(14) leaving 30/70 and crossing 50 · close beyond the 2σ and 2.5σ Bollinger bands · 10, 20 and 55-bar breakouts · MACD histogram crossing zero · MACD line crossing signal · Supertrend (3,10) and (2,14) flips · Stochastic leaving 20/80 · inside-bar breakout · three closes against the trade · ADX above 20 with a DI cross · Williams %R beyond −90/−10 · fresh 10-bar extreme with a reversal close · gap continuation.
8 exits: after 5, 10 or 20 bars · stop 2 ATR / target 3 ATR · stop 1 ATR / target 2 ATR · stop and target 1.5 ATR · trailing stop 3 ATR · exit on the reverse signal.
6 filters: any market · with the 200-bar trend · against it · calm volatility · high volatility · with 20-bar momentum.
Search sizes: Quick 288 · Standard 768 · Deep 1,536 · Max 2,304.
How the backtest works
• Entries at the close of the signal bar.
• Stops and targets are checked against the following bars' highs and lows; if both are touched in one bar, the stop is assumed.
• Every side pays the cost you set (default 0.05%).
• A strategy must reach the minimum number of trades (default 30) and, by default, be net profitable to rank at all.
• Rank by Win %, SQN, profit factor, net profit, expectancy, return / drawdown, or average win / average loss.
• The champion keeps its title until a challenger beats it by a margin you set, so the title does not flip on noise.
• The walk-forward basket follows the top K (default 5) equally weighted, chosen at each bar's close and exposed to the next bar's move.
Repainting and data
All signals are evaluated on the chart's own OHLC data, with no higher-timeframe requests. Entries, exits and rankings are confirmed at the close of each bar; the walk-forward curve and every trade in the logs are built only from closed bars and do not change afterwards. The leaderboard order can change as new bars close, because new trades change the statistics; that is the ranking updating, not a redraw of history.
How to use it in five minutes
1. Add it to the chart you trade. Start with the Standard size.
2. Read the leaderboard. Favour rows with many trades and a modest drawdown over rows with a large net and few trades.
3. Look at the pane. Blue rising with gold: the edge survived being chosen. Blue flat while gold soars: the leaders are curve-fit to this chart.
4. Pick the row you want to trade. Read its plan under the table, check its drawn trades, set its alerts.
5. Switch the ranking metric. Rules that stay on top under several metrics are the robust ones.
What it is not
An indicator, not a strategy() script, so there is no order-by-order report from the built-in tester. It is a discovery tool: it tells you which rule to build and shows you, without hindsight, whether choosing that rule would have paid. Results depend on the bars tested (default the last 2,500) and on your cost setting. Past results do not guarantee future performance. This is not financial advice.
مؤشر

GM Institutional LevelsGM Institutional Levels is a clean price-level indicator designed to highlight important psychological market levels where price may react, pause, reject or break through.
The indicator was originally built from my round-number logic on USDNOK and later adapted for Gold and other markets.
It separates levels into:
Minor Institutional Levels
Major Institutional Levels
For Gold, the default structure uses:
$50 Minor Institutional Levels
$100 Major Institutional Levels
The indicator also includes presets for Gold, Forex, Indices, Crypto and Custom markets, together with price labels, a dashboard and optional alerts when price approaches or crosses an important level.
These levels are not automatic buy or sell signals. They are intended as areas to watch for confirmation from price action, market structure, FVG/IFVG, divergence and other forms of confluence.
Main Features:
• Minor and Major Institutional Levels
• Gold, Forex, Index and Crypto presets
• Custom level spacing
• Full-chart horizontal levels
• Price labels
• Nearest-level dashboard
• Proximity alerts
• Cross alerts
• Clean and simple chart layout
The goal of GM Institutional Levels is to keep the chart simple and focus attention on important psychological price areas.
Trade the level.
Wait for confirmation.
Execute the setup. مؤشر

مؤشر

US Yield Curve 3D Term Structure [MantisAlgo]US Yield Curve 3D Term Structure maps official US Treasury benchmark yields across five core tenors: 3M, 2Y, 5Y, 10Y, and 30Y. Extended tenors (off by default) add 6M, 1Y, 3Y, 7Y, and 20Y.
TERM = Maturity from 3M to 30Y
TIME = Each tenor’s evolution over the latest ten monthly closes by default, from current to oldest. 10 daily sessions are also available.
YIELD = Nominal Treasury yield in percent
The indicator can be used on any chart symbol as a U.S. rates context tool.
🌐 3D SURFACE
The lower pane displays the current Treasury curve with ten months of historical depth by default (the current month plus nine prior monthly closes). Switch Surface history to 10 Sessions for the current daily close plus nine prior sessions. Surface colors compare each tenor with its own selected daily average:
- 21 trading days — one month
- 63 trading days — one quarter (default)
- 126 trading days — six months
- 252 trading days — one year
Cooler colors indicate values below the selected average, while warmer colors indicate values above it. If an older month is missing for a tenor, that point is left off the mesh. Camera rotation changes only the viewing angle.
Surface steepness changes only how tall the mesh looks. Soft (default) keeps a mild curve looking mild. Normal sits between Soft and Sharp. Sharp makes the same curve look steeper.
📈 HISTORY RIBBON
The Treasury tenors are also plotted as 2D history on the active chart timeframe. 2Y and 10Y are the thicker traces. Each line’s color reflects that tenor’s relative level versus its selected daily average.
📊 DASHBOARD
Curve State classifies the current shape of the core five:
- 🟢 UPWARD SLOPING — yields rise from 3M to 30Y
- 🟠 HUMPED — 2Y, 5Y, or 10Y stands above both 3M and 30Y
- 🟠 FLAT — the core five span 5 bps or less
- 🔴 DOWNWARD SLOPING — 3M is the high
- 🟠 MIXED — the core five do not form a clean rise, fall, hump, or flat
Curve Shift classifies how the 10Y−2Y spread just moved versus the previous trading day, even when the surface shows ten months:
- UNCHANGED — the spread change is inside 1.5 bps
- BULLISH STEEPENING — the spread widens as 2Y falls more than 10Y
- BEARISH STEEPENING — the spread widens as 10Y rises more than 2Y
- BEARISH FLATTENING — the spread narrows as 2Y rises more than 10Y
- BULLISH FLATTENING — the spread narrows as 10Y falls more than 2Y
The dashboard also reports the 3M, 2Y, 5Y, 10Y, and 30Y yields.
Rate Level uses the median relative level of 2Y, 5Y, and 10Y:
- 🟢 LOW RATE — 0.90 or lower
- 🟠 MID RATE — between 0.90 and 1.08
- 🔴 HIGH RATE — 1.08 or higher
⚙️ SETTINGS
Surface history sets the 3D time axis:
- 10 Months — current month plus nine prior monthly closes (default). TIME → 10 MO
- 10 Sessions — current daily close plus nine prior sessions. TIME → 10 SESS
Extended tenors (default Off):
- Off — core five only (default)
- On — add 6M, 1Y, 3Y, 7Y, and 20Y between the core 3M / 2Y / 5Y / 10Y / 30Y anchors
This changes only what is drawn.
Heat average length controls the historical baseline used for surface colors and Rate Level. It uses daily data even when Surface history is monthly:
- 21 trading days — one month; most responsive, more sensitive to noise
- 63 trading days — one quarter; balanced short-to-medium-term baseline and the default
- 126 trading days — six months; broader regime comparison
- 252 trading days — one year; slowest to react to recent regime changes
Changing Heat average length does not change the live tenor values or Curve State. It changes only how current yields sit versus their historical baseline.
Surface steepness changes only how tall the 3D mesh looks:
- Soft — keeps a mild curve looking mild (default)
- Normal — between Soft and Sharp
- Sharp — makes the same curve look steeper
Surface labels are flags on the live 3D curve. Exact yields are on the dashboard:
- Tenor — names only (default)
- Tenor + % — names and yield
- Off — hide flags
View rotates the 3D surface. Default is Back-left: TIME recedes back and left so the live curve faces you.
- Near-right
- Back-left (default)
- Straight-up
- Side-right — full right side view
- Side-left — full left side view
- Top-down — looks down on the term × time plane
- Top-reverse
- Custom
Custom angle is used only when View is Custom. Range is −90° to +90° in 5° steps (default −60°). −90° is full left; +90° is full right.
Panel selects the dashboard corner on the price chart (default top_right):
- top_right
- top_left
- bottom_right
- bottom_left
🧭 HOW TO USE
Use Curve State to read the slope of the Treasury curve and Curve Shift to read how 10Y−2Y moved versus the previous trading day. Use the surface to track how each tenor has changed over the latest ten months (or ten sessions).
Colors show whether each tenor is above or below its selected historical average. The surface provides rates context rather than a directional price target.
🔔 ALERTS
Alerts fire when Curve State changes to DOWNWARD SLOPING, UPWARD SLOPING, or HUMPED, and when Curve Shift changes to BULLISH STEEPENING, BEARISH STEEPENING, BULLISH FLATTENING, or BEARISH FLATTENING.
مؤشر

Edo Swing LevelsEdo Swing Levels — Tracks the Swing High and Low, Marks the Strong Level Defending the Trend and Flags the CHoCH When It Breaks
At any moment, market structure comes down to two prices: the last swing high and the last swing low. But they are not equal. One of them is the level that defends the current trend —the one a trader watches to know whether the trend continues or breaks— and the other is only a matter of time before it is taken. Edo Swing Levels keeps both always in view and, crucially, tells them apart.
It marks the level defending the trend as Strong —a solid, marked line— and the other as Weak —a dashed, faded line. In an uptrend the swing low is Strong (the support that holds) and the high is Weak; in a downtrend the swing high is Strong (the cap that holds) and the low is Weak. When price closes through the Strong level, a change of character (CHoCH) occurs: the structure that held the trend up breaks, the bias flips and the roles swap. Everything is validated on closed bars, so it does not repaint. The strong and weak levels, their roles and the change of character are all resolved on the chart's own series, with nothing else required.
STRONG AND WEAK LEVELS
The indicator keeps the last confirmed swing high and swing low, and classifies them by the bias. In a bullish bias, the low is the Strong level and the high is Weak. In a bearish bias, the high is Strong and the low is Weak. The Strong level is drawn solid, thicker and at full opacity; the Weak level is dashed, thinner and faded. Each line carries a label —Strong High, Weak High, Strong Low or Weak Low— and both are projected to the right by a configurable number of bars so they sit ahead of price as live references. The high level is red and the low level teal by default, with a neutral gray until a trend is defined.
SWING PROFILES
The sensitivity of the levels is set by the Swing Profile: Scalper (5 bars each side) for fast intraday levels on low timeframes, Swing (10 bars, the default) for the balanced 4H and daily read, and Long Term (21 bars) for the major levels on weekly and higher horizons. The larger the length, the more significant a turn has to be, and the more important and spaced out the marked levels are.
BIAS AND CHoCH
The bias is inferred from the breaks of structure and is what decides which level is Strong and which Weak. A close above the last swing high turns the bias bullish; a close below the last swing low turns it bearish. The decisive event is the change of character: when price closes through the Strong level —below the Strong Low in an uptrend, or above the Strong High in a downtrend— the trend that the level defended breaks, the bias flips and the strong level becomes weak. Taking out the Weak level, by contrast, is a simple continuation that confirms the trend without changing it. The solid/dashed distinction separates, at a glance, the decisive level from the one that is a mere target.
INFORMATION PANEL
A compact panel under the indicator header shows the market bias (Bullish / Bearish / Neutral) and, for the high and the low, their exact price and whether each is the Strong or Weak level, in the same red/teal color code. The bias row gives the direction; the High and Low rows give the prices and, above all, which of the two is the Strong level to watch. The panel sits in any of the four chart corners (Top Right by default), comes in three sizes (Tiny / Small / Normal) and two themes (Dark / Light), and can be hidden entirely. To keep the calculation light, it is drawn only on the last bar.
NO REPAINTING
Levels are built on confirmed pivots and breaks are validated on closed bars, so a level never appears or disappears intrabar and a wick that pierces a level but closes back on the same side does not count as a break. There are no higher-timeframe functions: all logic runs on the current chart timeframe. For a multi-timeframe read, apply it on several charts at once.
CONFIGURATION
The inputs are grouped by block. Structure sets the swing profile and how many bars the levels are projected to the right. Style exposes the high-level and low-level colors, the neutral color, the label size and the Dark/Light theme. Panel controls panel visibility, position and size. The defaults are calibrated to work without adjustment on stocks, crypto, forex, indices and futures, on any timeframe — the input most users touch is the Swing Profile, to set the sensitivity of the levels to their trading horizon.
ALERTS
Four predefined alerts cover the structure read. Strong High taken and Strong Low taken fire on the change of character —when price closes through the Strong level and the trend turns— and are the context alerts. New swing high and New swing low fire when a new level is fixed. All alerts fire on bar close, consistent with the indicator's anti-repaint validation.
HOW TO READ IT
Take the Strong level as your invalidation line: while price respects it, trading with the bias has the wind at its back, and its close-through is the signal that the trend has broken. Take the Weak level as your target: in an uptrend price tends to go for the weak high, in a downtrend for the weak low, and the distance between the two levels gives the room available inside the current structure. And treat the taking of the Strong level as the cleanest turn warning —it often marks the start of a new leg in the opposite direction. Pairing it with the HH/HL/LH/LL sequence classification reinforces the read.
OPEN SOURCE
Edo Swing Levels is published as a free open source indicator. The full Pine Script is publicly accessible on TradingView for study, adaptation and integration into any workflow. Part of the Edolab Markets free tools ecosystem, all available on TradingView.
This indicator is a technical analysis tool for educational and informational purposes only. It does not generate automatic buy or sell signals and should not be considered financial advice. Trading financial markets involves significant risk of capital loss. Past performance does not guarantee future results. Always use proper risk management. مؤشر

Breakout Retest Signals [algotim]Overview
Breakout Retest Quality Signals is a price-structure indicator designed to distinguish ordinary level breaks from breakouts that produce a meaningful retest.
The script does not treat every cross of a swing level as a valid breakout. A confirmed swing high or low first establishes the structural reference. Price must then close beyond that level by a minimum ATR-adjusted distance. Once the breakout qualifies, the script creates a volatility-scaled zone around the broken level and monitors the following price action for a retest.
The central purpose of the indicator is to evaluate the quality of that retest rather than simply marking every touch of the broken level.
Problem Statement
A basic breakout indicator can produce signals whenever price moves marginally above or below a previous high or low. Likewise, a basic retest indicator may treat any return to the broken level as confirmation.
Those approaches do not distinguish between a decisive breakout followed by a controlled rejection and a weak breakout followed by deep penetration of the level.
This script addresses that problem by separating the setup into three stages:
**structural breakout -> volatility-scaled retest zone -> retest quality evaluation**
This makes the retest itself part of the signal validation process.
Methodology
1. Confirmed structural levels
The script uses confirmed pivot highs and pivot lows to establish the most recent structural reference points.
A pivot is confirmed using the configured swing length, so the structural levels are not based on unconfirmed turning points.
2. ATR-qualified breakout
A bullish breakout occurs when price crosses above the most recent confirmed pivot high.
A bearish breakout occurs when price crosses below the most recent confirmed pivot low.
The breakout must also exceed the configured minimum breakout strength, measured as a multiple of ATR:
**Bullish displacement = close - broken high**
**Bearish displacement = broken low - close**
The displacement must be at least the user-defined ATR multiple.
This prevents small crosses around a structural level from automatically becoming breakout events.
3. Dynamic breakout zone
After a qualified breakout, the script creates a zone around the broken structural level.
The zone width is calculated from ATR rather than from a fixed number of ticks or points:
**Zone width = ATR x Zone Width Multiplier**
This allows the same methodology to account for different volatility conditions.
For a bullish breakout, the broken level becomes a potential support area.
For a bearish breakout, the broken level becomes a potential resistance area.
4. Retest monitoring
After the breakout, the zone remains active while the script waits for price to return to it.
The retest is only considered during the configured retest window. The zone also has a maximum lifetime so that an old breakout does not remain active indefinitely.
This creates an explicit state sequence rather than evaluating every bar independently:
**Breakout detected -> zone active -> retest pending -> retest evaluated -> confirmed or invalidated**
5. Retest Quality Engine
The primary differentiating component is the Retest Quality Engine.
When price enters the breakout zone, the script measures how deeply price penetrates the zone before moving back in the breakout direction.
Penetration is normalized against the width of the zone, allowing the measurement to remain related to the current volatility regime.
The resulting quality score favors relatively shallow and decisive rejection while assigning lower quality to deeper penetration.
The score is then compared with the user-defined minimum quality threshold.
This means that touching the zone alone is not necessarily enough to generate a signal.
6. Rejection confirmation
When the rejection-candle option is enabled, the retest must also close back outside the zone in the original breakout direction.
For a bullish setup, price must reject the zone and close back above it.
For a bearish setup, price must reject the zone and close back below it.
This additional condition separates a retest rejection from a simple penetration of the breakout area.
Signal Workflow
Bullish workflow
1. A confirmed pivot high establishes a structural resistance level.
2. Price crosses above that pivot.
3. The close must exceed the pivot by at least the configured ATR displacement.
4. A bullish breakout zone is created around the broken level.
5. The script waits for price to return to that zone.
6. Penetration depth is measured relative to the zone width.
7. The Retest Quality Engine converts the penetration into a quality score.
8. If the score meets the minimum threshold, the retest can qualify.
9. When rejection-candle confirmation is enabled, price must close back above the zone.
10. A bullish confirmation is then displayed.
Bearish workflow
1. A confirmed pivot low establishes a structural support level.
2. Price crosses below that pivot.
3. The close must exceed the pivot by at least the configured ATR displacement.
4. A bearish breakout zone is created around the broken level.
5. The script waits for price to return to that zone.
6. Penetration depth is measured relative to the zone width.
7. The Retest Quality Engine calculates the retest quality.
8. If the score meets the minimum threshold, the retest can qualify.
9. When rejection-candle confirmation is enabled, price must close back below the zone.
10. A bearish confirmation is then displayed.
Why This Indicator Is Different
A conventional breakout script generally answers one question:
**Did price break the level?**
A conventional retest script generally adds:
**Did price come back to the level?**
This indicator adds another layer:
**How cleanly did price reject the breakout zone after returning to it?**
The distinction is important because not all retests have the same structure.
The implementation combines the breakout and retest stages into one state-based process. ATR is used in two separate but related ways: first to filter weak structural breaks, and then to scale the breakout zone to current volatility.
The Retest Quality Engine then evaluates the interaction with that zone rather than treating every retest as equivalent.
The result is a more selective breakout-retest workflow instead of a collection of unrelated indicators.
Inputs
Structure Detection
**Swing Lookback (Pivot Length)**
Controls the number of bars used to confirm swing highs and lows.
**Minimum Breakout Strength (x ATR)**
Sets the minimum closing displacement beyond the structural level required for a breakout.
Breakout Zone
**Zone Width (x ATR)**
Controls the width of the dynamic breakout zone.
**Zone Max Lifetime (bars)**
Limits how long a breakout zone remains active.
Retest and Quality Engine
**Max Bars to Wait for Retest**
Defines the maximum number of bars allowed between breakout and retest.
**Minimum Retest Quality Score**
Sets the minimum quality score required for confirmation.
**Require Rejection Candle on Retest**
Requires the retest candle to close back in the breakout direction.
Volatility
**ATR Length**
Controls the ATR calculation used for breakout displacement and zone sizing.
Visual Style
The visual settings control bullish and bearish colors, zone opacity, confirmation labels, and the number of active zones displayed.
Alerts
The script can be used with TradingView alerts for the available confirmation conditions.
Alerts should be configured from the script's available alert conditions after adding the indicator to the chart.
Practical Usage
The indicator is intended to be used as a structural price-action filter.
A practical workflow is to first identify the direction and broader market context, then use the script to monitor qualified structural breaks and their subsequent retests.
Higher minimum breakout-strength and retest-quality settings will generally make the conditions more selective.
Lower thresholds will allow more setups but may also admit weaker breakouts and less decisive retests.
The breakout zone can also be used as a visual reference for evaluating whether price is accepting or rejecting the broken structure.
Signals should be evaluated together with the instrument, timeframe, market conditions, and the trader's own risk-management process.
Limitations
Pivot levels require confirmation and therefore are identified only after the required swing bars have formed.
A breakout that satisfies the ATR threshold does not guarantee continuation.
The quality score measures the geometry of the retest relative to the calculated zone; it does not predict the future direction or magnitude of price movement.
ATR-based measurements adapt to volatility but do not eliminate market noise.
A retest can fail after confirmation, particularly during rapidly changing or range-bound conditions.
The indicator is an analytical tool and should not be interpreted as a guarantee of profitable trading results.
Notes
This script is based on a single price-structure workflow: confirm the structural level, qualify the breakout using ATR displacement, define a volatility-scaled zone, monitor the retest, and evaluate the quality of the rejection.
The intention is to provide a consistent framework for studying breakout-retest behavior rather than to claim that every qualified setup will produce continuation. مؤشر

Multi-Timeframe Supertrend Pro [algotim]Overview
Multi-Timeframe Supertrend Consensus is a trend-analysis indicator designed to address a common problem with single-timeframe trend signals: a direction change on one chart timeframe does not necessarily represent a broader change in market direction.
Instead of treating one Supertrend state as the complete trend decision, the script evaluates up to three independently configured Supertrend calculations and converts their directional states into a single timeframe-consensus reading.
The purpose is to distinguish isolated timeframe changes from situations where multiple timeframe structures are aligned.
Problem Statement
A conventional Supertrend evaluates price direction from one timeframe. This can be useful for identifying local trends, but it can also produce direction changes that are not supported by the broader timeframe structure.
A trader may therefore see a bullish change on the chart timeframe while the higher timeframe remains bearish.
This script addresses that problem by separating trend detection into three layers:
1. Primary trend on the current chart timeframe.
2. Confirmation trend on an optional timeframe.
3. Higher-timeframe trend on a configurable timeframe.
The resulting directional states are evaluated together rather than interpreted independently.
Methodology
Each Supertrend calculation uses ATR-based bands derived from the selected ATR length and multiplier.
The calculation begins from the midpoint price (`HL2`) and determines upper and lower volatility-adjusted bands using ATR.
The Supertrend state then maintains directional continuity until price crosses the relevant previous band. A bullish state uses the upper calculated Supertrend line, while a bearish state uses the lower line.
The three calculations are independently parameterized, allowing the confirmation and higher-timeframe models to use different ATR lengths and factors from the primary model.
For non-current timeframes, the script requests the corresponding Supertrend state through `request.security()` using `barmerge.lookahead_off`. This prevents the requested timeframe from intentionally using future bars.
The important part of the architecture is what happens after these calculations: their directional states are counted and evaluated through a configurable consensus threshold.
Signal Workflow
The analytical workflow is:
1. Calculate the primary Supertrend using the current chart timeframe.
2. Calculate the optional confirmation Supertrend using the selected confirmation timeframe.
3. Calculate the higher-timeframe Supertrend using the configured higher timeframe.
4. Determine whether each Supertrend is bullish or bearish.
5. Count the number of aligned bullish and bearish timeframe states.
6. Compare that alignment against the user-defined consensus threshold.
7. Issue the corresponding consensus trend state when sufficient timeframe agreement exists.
8. Display the individual Supertrend lines and the consensus information so the trader can see both the underlying states and the resulting agreement.
The consensus threshold controls how selective the framework is. A lower threshold allows a signal with less agreement, while requiring all three timeframes produces the strictest alignment condition.
Why This Indicator Is Different
The primary purpose of this script is not to provide three separate Supertrend lines.
Its purpose is to convert multiple Supertrend states into a **single timeframe-agreement framework**.
A conventional Supertrend answers:
> "What is the trend according to this timeframe?"
This script adds another question:
> "How many of the monitored timeframes agree with that direction?"
This distinction is useful when a trader wants to separate local trend changes from broader directional alignment.
The confirmation and higher-timeframe calculations are also independently configurable rather than being simple copies of the primary settings. This allows the user to make the faster timeframe more responsive while keeping the broader timeframe more selective.
The resulting workflow can therefore be viewed as:
**Local trend -> Confirmation trend -> Higher-timeframe trend -> Agreement calculation -> Consensus state**
This is the central analytical contribution of the script.
Inputs
Primary Supertrend
Controls the Supertrend calculated directly on the chart timeframe.
* ATR Length
* Factor
Confirmation Supertrend
Controls the optional second timeframe calculation.
* Timeframe
* ATR Length
* Factor
Leaving the timeframe blank uses the primary chart-timeframe calculation.
Higher-Timeframe Supertrend
Controls the broader trend reference.
* Timeframe
* ATR Length
* Factor
Consensus Engine
Controls how much timeframe agreement is required.
* Minimum Timeframes Needed for Signal
* Confidence Shading
A threshold of 3 requires all three monitored states to agree and therefore provides stricter filtering than a threshold of 2.
Visual Settings
The script provides independent visibility controls for:
* Primary Supertrend line
* Confirmation Supertrend line
* Higher-timeframe Supertrend line
* Consensus entry signals
Bullish and bearish colors can also be customized.
Alerts
The script provides alert functionality for its consensus-based trend events.
Alerts should be configured from the indicator's available TradingView alert conditions/functions after adding the script to a chart.
Practical Usage
A practical workflow is to use the primary Supertrend to observe the local market direction while using the confirmation and higher-timeframe calculations to determine whether that direction is supported by broader timeframe structure.
For example, requiring two of three timeframes to agree can provide a moderate filtering level. Requiring three of three creates a stricter consensus condition and may result in fewer signals.
The individual lines should remain visible while evaluating the indicator so that the trader can see why a consensus state was produced rather than treating the consensus output as a standalone trading decision.
The indicator can be used for trend filtering, directional analysis, and identifying periods of stronger multi-timeframe alignment.
Limitations
Supertrend remains a reactive, volatility-based trend-following calculation. It does not predict future price movement.
Because the methodology depends on ATR and price crossings, rapid volatility changes can produce direction changes or conflicting timeframe states.
Higher-timeframe values also update according to the availability of confirmed data from their respective timeframe. Signals should therefore be evaluated with awareness of the timeframe relationship.
A consensus state indicates agreement between the configured Supertrend calculations; it does not guarantee continuation of the resulting trend.
The indicator is an analytical tool and should not be treated as a standalone trading system or a guarantee of future performance.
Notes
The script is designed to make multi-timeframe Supertrend agreement visible within one analytical framework.
Its main distinction from a conventional single-timeframe Supertrend is the explicit consensus layer that evaluates the directional state of multiple independently configured timeframe calculations.
Users should select timeframe and ATR parameters appropriate to the instrument and timeframe being analyzed and validate the resulting signals with their own market analysis and risk-management process. مؤشر

FlyTV - a real fruit fly connectome trading on your chartA real fruit-fly brain, wired into a trading strategy and tested honestly. 17,000 measured connections from the MaleCNS v1.0 connectome run on every bar: looming detectors watch the candles, the giant fiber fires the escape reflex, and the mushroom bodies learn from realised P&L. The answer to the obvious question is no — it does not beat buy & hold, and this publication shows exactly how that was established.
█ WHAT IS REAL AND WHAT IS MODELED
Measured — taken from the connectome, not invented:
the wiring: 995 neurons and 17,000 connections in this script, distilled from a 5,084-neuron, 108,317-connection subgraph of MaleCNS v1.0
the looming pathway LC4 / LPLC2 → DNp01, 11,198 synaptic contacts
connection signs derived from predicted neurotransmitters
the identity and function of the command neurons, known from stimulation experiments
the KC→MBON plasticity rule and MBON valence, which matched the published literature
Modeled — our assumptions, and they matter:
spiking dynamics: leaky integrate-and-fire, 20 steps per bar
sensory tuning, which the annotations do not contain at all
the entire mapping from market data to sensory organs
how spikes become an order
no retinotopy: every detector receives the same stimulus
A connectome is a static anatomical snapshot, not a living brain. This is a visualization of measured neuroscience, not a validation of fly physiology.
█ CONCEPTS
Most connectome demos begin by choosing where to plug the neurons in. That question is already answered by biology: the fly has command neurons whose function is known from experiments, and they span the same discrete action space a trader picks from.
DNp09 — walks forward → go long
MDN, the "moonwalker" — walks backward → exit
DNa01 / DNa02 — turns → flip direction
DNp01, the giant fiber — takes off and escapes → flatten now, risk-off
DNg11 — grooms → stay flat and wait
A selloff is, to a fly, an object rushing toward its eye. That is not a metaphor: LC4 and LPLC2 are looming detectors and they feed the giant fiber directly, which is the fastest escape pathway in the animal.
Reward is not bolted on with reinforcement learning — the moment an optimiser touches the weights, the gradient is trading, not the fly. The animal ships its own machinery: Kenyon cells give a sparse code of context, dopaminergic PAM and PPL1 neurons carry reward and punishment, and KC→MBON synapses depress when a cell was active as dopamine arrived. Realised P&L drives that dopamine, so learning happens bar by bar, inside the backtest, using only bars the fly has already seen.
█ THREE LAYERS, ONLY ONE OF THEM LEARNS
Reflexes — frozen. The measured connections. No reward, no gradient, no fitting. There is nothing here to overfit with.
Body interface — about 15 numbers. Sensory gain, the spikes-to-order threshold, the escape cooldown. These are not in the connectome, so they were tuned externally. The brain was not touched.
Mushroom bodies — online learning. 4,934 KC→MBON synapses in this build, updated by the three-factor rule the animal uses.
█ FEATURES
Version selector: buy & hold, reflexes only, reflexes + mushroom bodies, or mushroom bodies only. Use it to see which layer is responsible for what.
The fly panel : one pixel fly with a see-through head, drawn on the price chart. Optic lobes, mushroom bodies, central complex, giant fiber and legs light up as the circuits that carry them fire.
HUD : per-circuit readout — looming input, giant-fiber charge against its threshold, mushroom body bias, dopamine, and how much of the synaptic weight the learning has eaten so far.
Crowd sense : an optional non-price input, the long/short account ratio on the perpetual. Off by default, and the description below explains why.
█ HOW TO USE IT
Built and tested on crypto, H1. Start with the defaults, watch the giant-fiber charge during a selloff, and switch Version between "reflexes" and "reflexes+MB" to see which part moves the curve. Every state update happens on bar close; the avatar animates intraday, the network does not. The network is computed over the last 4,000 bars only — 17,000 connections times 20 steps per bar does not leave room for more inside the 20-second run budget — so the Strategy Tester covers that window, not the seven and a half years quoted below. The mushroom bodies need a long run to accumulate anything, so keep the timeframe low enough that 4,000 bars still span a meaningful stretch.
█ RESULTS, AND WHY THEY PROVE NOTHING
Tested on BTCUSDT, H1, from 7 October 2018 to 3 May 2026 — 66,315 bars, one window, no window shopping. Starting equity $1,000, long only, one position.
the fly: $4,231, max drawdown 48%, exposure 44.6%, 13,958 round trips
buy & hold: $11,904, max drawdown 77%, one entry in seven and a half years
random entries at the same exposure, 12 seeds: $7,400 ± 8,900 — the fly beat six of twelve
with a realistic maker fee of 0.02% per side: $16
So it ends up in profit, and the profit carries no information. It was long 45% of the time in an asset that went up 12x; any process entering at that rate would also print a gain, and the random benchmark's dispersion swallows the result whole. The simplest possible approach — buy and do nothing — wins by almost three times. Fees finish what randomness starts.
One result did survive every control: drawdown came in below the random benchmark in ten runs out of twelve, and 1.6x below buy & hold. The effect is small and it is about risk, not return.
█ LIMITATIONS
No edge was found. Ten hypotheses, roughly forty-five runs, each with a shuffled-weight control and an out-of-sample split. None beat a random benchmark reliably on price inputs.
The escape reflex does not anticipate. It fires on the close of the bar that already fell. It catches crashes cleanly — 19 of the 20 largest drops — but there is no foresight in it.
Crowd sense is non-stationary : 17/18 in-sample, 6/18 out-of-sample. That is why it ships off.
Trade count is high. Any realistic fee dominates the result. The script ships with a 0.02% maker fee per side and no slippage, because that is what the published test used. Set both to your own venue before drawing conclusions from the Strategy Tester.
This is a distillation. The full subgraph is six times larger; it does not fit in the platform budget. Measured on a separate 2022-2026 window, the distilled circuit reproduces 0.968 of the full circuit's giant-fiber activity and 36 of its 39 escapes to within one bar.
█ THE CONTROL THAT MAKES THIS MORE THAN A STUNT
Any connectome demo faces one question: is the brain responding, or the scaffolding around it? Shuffle the connection weights while preserving the node degree distribution — same neurons, same connection count, same total activity, random addressing. On the same looming stimulus the real wiring produces 98 giant-fiber spikes over 100 simulation steps and the shuffled one produces zero, identically across ten seeds, while total network activity differs by half a percent (15,648 versus 15,570). The avoidance response lives in the measured connections, not in the code around them.
█ WHY THIS IS IN PINE AND NOT IN A NOTEBOOK
The platform limits are the interesting part: 500 ms per bar, 20 seconds per run, a cap on tokens in the source. A budget you cannot buy your way out of, which is what forced the distillation and then the proof that the decisions had not moved. Two techniques do the heavy lifting and are reusable for any network with fixed weights: a string literal costs one token regardless of length, so the edge list ships as packed text and expands on the first bar; and propagation is event-driven, walking a spike queue instead of sweeping every cell. The source is open — take them.
█ DATA AND CREDITS
Connectome: MaleCNS v1.0, licensed CC BY 4.0 — FlyEM at HHMI Janelia Research Campus, University of Cambridge, MRC Laboratory of Molecular Biology, and Google Research. Berg et al., 2026. The FlyWire connectome is deliberately not used here: its licence is non-commercial.
Nothing in this publication is financial advice. Past behaviour of any strategy, including this one, says nothing about the future. استراتيجية

مؤشر

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. مؤشر
