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.
Indicator

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.
Indicator

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. Indicator

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.
Indicator

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. Indicator

Indicator

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. 追いたいトレンドイベントに合わせてアラートを設定します。
Indicator

[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.
Indicator

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. Indicator

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. Indicator

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. Indicator

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. Indicator

Indicator

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

Indicator

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

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

Smart Flow Imbalance [StrixEDGE]TRADINGVIEW CATEGORIES
1. Volume
2. Trend Analysis
3. Oscillators
SEARCH TAGS (9)
smart-flow-imbalance, overlay-signals, order-flow, volume, relative-volume, buying-selling-pressure, accumulation-distribution, momentum, market-structure
DESCRIPTION
StrixEDGE Smart Flow Imbalance is Engine #06 in the StrixEDGE indicator framework. It is a flow-focused market-state tool designed to identify changes in directional quality, liquidity behavior, volatility structure and confirmation strength without relying on a single conventional oscillator.
WHAT THIS INDICATOR IS DESIGNED TO DO
Blends persistent flow, displacement and range structure into a directional participation score.
Rather than treating one input as a complete signal, StrixEDGE combines the engine's dedicated core logic with an optional DNA layer. The final result is normalized into a 0–100 Strix Score so the same framework can be read consistently across different symbols and timeframes.
HOW TO READ THE STRIX SCORE
• Above 72: bullish state / long-side trigger zone.
• Below 28: bearish state / short-side trigger zone.
• Around 50: balanced or neutral state.
• A signal is generated on a transition into a trigger zone, not on every bar that remains inside it.
SIGNAL & POSITION FRAMEWORK
When a valid state transition is detected, the overlay version can create a structured trade plan containing:
• Entry
• DCA level
• TP1
• TP2
• TP3
• Stop Loss
Each projected level includes its percentage distance from Entry. When a level is reached, the same chart label is updated with a ✓ marker. TP and SL outcome tracking is mutually controlled so the dashboard does not report contradictory terminal results for the same setup.
PROFESSIONAL DASHBOARD
The built-in StrixEDGE dashboard summarizes the active market state in a compact TradingView table, including:
• Engine and category
• Strix Score and directional bias
• Signal / market regime
• Flow pressure and trend quality
• Relative volume and ATR volatility
• Structure / VWAP context
• Active position and signal age
• Entry, DCA, TP1, TP2, TP3 and SL
• Hit status for each projected level
COMBINATION PROFILE
• CORE BALANCE
• Active DNA modules: 3
• Lookback: 24
• Smoothing: 5
• Signal threshold: 72
ENGINE DNA
• Displacement Efficiency — Directional body displacement normalized by ATR and relative volume.
• Range Structure Balance — Maps close location inside rolling high/low structure to a signed state.
• Normalized Flow Acceleration — Smooths ATR-normalized return × relative volume to estimate directional flow.
MARKET / STYLE PROFILE
• Market focus: Crypto
• Intended style: Swing
• Core engine: #06 Smart Flow Imbalance
• Category: Flow
NON-REPAINT / DATA HANDLING
By default, signals require a confirmed chart-bar close. This reduces intrabar signal fluctuation and makes historical signal placement more stable.
ALERTS
The generated script includes alert conditions for:
• Long state shift
• Short state shift
• DCA reached
• TP1 reached
• TP2 reached
• TP3 reached
• Stop Loss reached
HOW I USE IT
StrixEDGE is designed as a market-state and trade-structure tool rather than a standalone prediction system. Stronger setups generally occur when the Strix Score, market regime, flow pressure, structure and volatility context agree instead of relying on the trigger alone.
LIMITATIONS
No indicator can predict future price movement with certainty. Signals can fail during sudden news events, illiquid conditions, gaps, abnormal volatility, regime transitions or unreliable volume. DCA, TP and SL levels are systematic projections derived from the active setup and should not be interpreted as guaranteed outcomes.
Users should validate the indicator on the symbol, exchange and timeframe they trade, and should apply independent position sizing and risk management. Historical behavior does not guarantee future performance.
ORIGINALITY
StrixEDGE Engine #06 is built from generic price, volume, volatility, structure and confirmed-context primitives arranged in a dedicated engine formula and optional DNA layer. It is not intended to reproduce or rename a specific community indicator.
DISCLAIMER
For research and educational purposes only. This indicator is not financial advice and does not guarantee profitability. Indicator

Adaptive Hurst Cycle Engine [SpokoStocks]Adaptive Hurst Cycle Engine measures the cycles that are actually present in price, reads where the market sits inside each of them right now, projects the combined cycle forward, and scores its own cycle lows against real price lows so you can see on the chart how well it is doing. Nothing is drawn with hindsight and nothing moves once it is on the chart.
WHAT YOU SEE ON THE PRICE CHART
• A cycle-model line: price with the noise removed and the measured cycles kept. Where it hugs price, the cycles explain the movement; where it drifts, they do not.
• A dashed projected path continuing that model forward from the last bar, built from the current amplitude and phase of each cycle.
• Bars coloured by cycle position, from teal at a trough through violet to crimson at a peak.
• Composite lows scored after the fact: a teal triangle where the composite low landed on a real price low, a small grey triangle where it missed. The dashboard reports the hit rate on the chart you are looking at.
WHAT YOU SEE IN THE PANE
• The composite cycle, the sum of the measured components, with a two-tone fill.
• A diamond at each composite low, placed one bar after the turn and never moved.
• A dashed projection of the composite with the next projected low labelled.
• A background shade when two or more cycles are near a trough at the same time.
• The individual components can be switched on behind a toggle.
DASHBOARD
For each cycle: measured period, spectral power, whether it is rising or falling, and the bar count and date of its next low. Below that: the dominant period, how many cycles are synchronised near a trough, the projected composite low, and the low-accuracy score.
HOW IT WORKS
1. A roofing filter, a high-pass at the longest period and a super-smoother at the shortest, isolates the band in which cycles can exist. Both filters are from John Ehlers' published work.
2. An autocorrelation periodogram, also after Ehlers, measures spectral power for every period in the range on every bar and smooths it over time, so the spectrum reflects persistent cycles rather than single swings. Power is normalised so 100% is the strongest period seen recently.
3. The cycle set is either the strongest spectral peaks above your minimum power (Measured peaks) or Hurst's nominal model built from the dominant period in 2:1 ratios (Harmonic set). Periods are smoothed to prevent jitter. If no peak clears the threshold, the dominant period is used so the chart is never empty.
4. Each cycle is extracted with a band-pass filter tuned to its period. The output and its quadrature give the phase, which tells the script how many bars remain to the next low and peak, and the amplitude.
5. The composite is the sum of the components, Hurst's principle of summation. The projection extends each component as a cosine from its current phase and amplitude and adds them; on the price chart the same projection is placed on top of the trend with its recent slope.
6. Accuracy scoring: when the composite turns up, the previous bar is a composite low. Once the bars on both sides are known, that bar's low is compared with the lowest low of the surrounding window. A match within a quarter of an ATR is a hit. Hits and total are accumulated and shown as a percentage.
HOW TO USE IT
• Check the hit rate first. It tells you, on this symbol and timeframe, how often the composite lows have coincided with price lows.
• Read spectral power per cycle. Below about 50% a cycle is weak on this chart and its dates deserve less weight.
• The next-low column is the working forecast for each cycle; the composite low is where they combine, and the confluence shade marks the windows Hurst's model treats as the most important lows.
• Use the projected path as an expectation, and the bar colours to see at a glance which side of the cycle the market is on.
NON-REPAINTING AND LAG
All filters are recursive and use only closed bars. Composite-low diamonds are confirmed one bar after the turn and fixed. The projection is a forecast redrawn only forward of the current bar. Every causal cycle filter carries a delay of one to two bars; the phase readout and the projection exist to give notice of a low before it happens rather than to remove that delay. The hit and miss triangles are the one deliberately delayed element: they are a scorecard drawn once the surrounding window has closed, not a live signal.
LIMITATIONS
• The spectrum needs roughly twice the longest period of history to settle; the first bars on a chart are unreliable.
• Dates in the dashboard count chart bars and ignore weekends and closed sessions.
• Cycles change; a projection is only as good as the persistence of the cycles behind it.
• The hit rate is descriptive, not a guarantee, and depends on the accuracy window you set.
The roofing filter and autocorrelation periodogram follow John Ehlers, Cycle Analytics for Traders (2013). The cycle-set selection, phase-based low forecasts, composite projection on price, phase colouring and on-chart accuracy scoring are original to this script. Indicator

Smart Money Concepts [AxeAlgo]Overview
- Smart Money Concepts is a clean, non-repainting indicator designed for traders who want to identify institutional market structure without clutter.
The indicator visualizes where smart money is likely to defend, attack, and accumulate positions by displaying order blocks, fair value gaps, liquidity pools, and premium/discount dealing ranges on your chart.
What It Shows
Market Structure (CHoCH and BOS)Identifies when the market changes direction (Change of Character) and when new directional commitment breaks prior structure (Break of Structure). Each signal confirms only after a specified number of bars, ensuring no repainting.
Order BlocksHighlights the price zones where the last aggressive institutional movement originated. These are areas where smart money entered positions and often acts as support or resistance on subsequent pullbacks.
Fair Value GapsDetects imbalances between candlesticks (gaps not filled by wicks). The indicator marks these zones because institutions often return to fill them as price moves away.
Liquidity PoolsAutomatically identifies clusters of equal highs and equal lows where retail traders typically set stop losses. The indicator marks when price breaks through these pools (institutional sweeps).
Premium and DiscountDisplays whether price is trading above (premium) or below (discount) the 50% equilibrium level between the most recent swing high and low. Extreme premium or discount often precedes reversals.
How to Use It
Enable individual components using the dashboard toggles: Show Structure, Show Order Blocks, Show Fair Value Gaps, Show Liquidity Pools, Show Premium/Discount.
Turn on the dashboard to see your current swing bias, internal structure direction, and range position at a glance.
Auto-Tune automatically scales all sensitivity parameters based on your chart timeframe. Turn it off if you prefer manual tuning.
Use Simple Mode to display only swing structure without internal noise for a cleaner chart.
Key Settings
Confirmation Bars: How many bars confirm a pivot before a structure signal fires. Higher values filter out false signals but add lag. Default is 2.
Min Displacement: The minimum price movement (in ATR multiples) required for a structure signal to register. Default is 1.0 ATR.
Zone Sizing: Controls the minimum and maximum height of order blocks and FVGs. Adjust to filter noise or capture smaller opportunities.
P/D Lookback: How many bars back to scan for the swing high and low that define your premium/discount range.
Dashboard Position and Size: Choose where the info table appears and how large you want it.
Colors: Customize bullish, bearish, and gap colors to match your chart theme.
What This Indicator Is For
Smart Money Concepts is intended for traders who want to visually identify institutional order flow patterns and understand where smart money accumulates and distributes. It helps you:
Spot areas where institutions likely accumulated or distributed (order blocks and FVGs)
Recognize when price is overextended and vulnerable to reversal (premium/discount extremes)
Distinguish real structural breaks from noise during choppy consolidation
Plan entries and stops around levels where smart money defends
How It Works
The indicator uses pivot-point analysis to identify swing highs and lows, then marks the price zones where directional movement originated (order blocks). Fair value gaps are detected using standard three-candle imbalance logic. Liquidity pools are identified by clustering equal price levels within a configurable tolerance.
All signals confirm only on closed bars. Zones never repaint, but they shrink or change state as price action develops.
Limitations
The indicator shows 5 active zones at a time to keep your chart clean. If multiple institutional structures are forming simultaneously, older zones will age out. This is by design to prioritize the most recent price action.
This indicator identifies structural levels and patterns. It does not predict price direction or guaranteed support/resistance. Use it as one component of a complete trading plan, not as a standalone signal.
Fair value gaps and order blocks are useful but not infallible. Price may skip through them or reverse before reaching them.
Important Disclaimer
This indicator is for educational and analytical purposes only. It does not provide financial advice, and past performance does not guarantee future results. Trading involves risk of loss. Always use proper risk management, stop losses, and position sizing. Never risk more than you can afford to lose.
The accuracy and effectiveness of this indicator depends on your market conditions, timeframe, and trading methodology. Results vary by trader and asset class.
Indicator

Moving Average Crossover Signal
Moving Average Crossover Signal
This is a customizable multi-symbol, multi-timeframe indicator that provides a compact visual signal based on the relationship between two user-defined moving averages. It is designed to function as a simple “red light” or “green light” for the current trend, allowing moving average conditions to be monitored without displaying the moving averages themselves. The signal can also track a ticker different from the active chart symbol, making it possible to monitor another market without keeping that ticker’s chart open.
The indicator calculates two independently configurable moving averages on a selected ticker and timeframe, then displays a persistent signal icon in a user-selected area of the chart. Instead of plotting historical crossover markers or moving average lines, it provides a clean at-a-glance indication of whether the configured MA condition is currently active.
Signal Logic
Two signal modes are available:
Crossover Only — the signal is active while Moving Average 1 is above Moving Average 2.
Crossover + Both MAs Sloping Up — the signal is active only while Moving Average 1 is above Moving Average 2 and both moving averages are rising over the selected slope lookback period.
The signal icon uses independently configurable colors for active, inactive, and unavailable-data conditions.
Ticker and Timeframe Selection
The signal can be calculated from a ticker that is different from the symbol currently displayed on the chart. Leaving the ticker input blank uses the active chart symbol.
A separate Signal Timeframe input allows the moving averages and signal logic to be calculated using a timeframe independent of the chart timeframe. Leaving the timeframe set to the chart interval uses the current chart timeframe.
This makes it possible, for example, to monitor a daily moving average condition while viewing an intraday chart, or to monitor one symbol's higher timeframe trend while analyzing another symbol.
Moving Average Configuration
Both moving averages can be configured independently with:
SMA
EMA
WMA
RMA
HMA
The slope-filtered mode also includes a configurable lookback period that determines whether each moving average is considered to be rising.
Signal Display
The on-chart signal is designed to remain compact and unobtrusive. Display options include:
Multiple signal icon styles
Active, inactive, and no-data colors
Automatic display of the selected ticker
Custom text that can override the ticker label
Signal icon before or after the display text
Independent icon and text sizes
Nine standard chart locations
Additional spacer rows above or below the signal for finer vertical positioning
Customizable panel background, including full transparency
The indicator does not plot the moving averages themselves, keeping the chart free of additional lines.
Alerts
A TradingView alert condition is included for the actual bullish moving average crossover event.
When Crossover + Both MAs Sloping Up is selected, the crossover must also occur while both moving averages satisfy the selected upward-slope condition.
This keeps the persistent visual signal separate from the crossover event: the icon shows the current state of the configured condition, while the alert identifies the point at which a qualifying crossover occurs.
Usage and Limitations
For the most reliable results, use a Signal Timeframe that is the same as or higher than the chart timeframe.
Lower timeframe selections may not capture every crossover that occurs between chart bars, so signals can be missed.
Higher timeframe signals may also change while that candle is still forming, so they should be considered provisional until the selected timeframe closes. Indicator

Trend Pullback GuardTrend Pullback Guard
A trend has started. Does its next pullback stabilize — or lose its structure?
Trend Pullback Guard follows pullbacks through a defined sequence: detection, stabilization, continuation confirmation, or invalidation. It combines an EMA trend regime with frozen structure levels, volatility-normalized pullback depth and candle-overlap measurements.
The same rules work in both directions. Everything is included in one overlay indicator.
QUICK VISUAL GUIDE
• Blue line: Fast EMA; gray line: Slow EMA.
• Small blue dot: A pullback has been detected.
• Subtle green/red zone: The developing long/short pullback range.
• Red level: Frozen structure boundary.
• Amber level: Confirmation threshold after stabilization.
• Green upward/red downward triangle: Long/short continuation conditions confirmed.
• Red cross: A close broke the frozen structure boundary.
• Gray square: The trend regime was lost or the observation window ended.
The dashboard distinguishes an active episode's LAST CLOSE from frozen LAST EPISODE values. The structure and confirmation levels describe the rules; they are not suggested order prices.
1 — ESTABLISH THE TREND
Default settings use a 21-period EMA and a 55-period EMA.
For a long regime, the fast EMA must be above the slow EMA and the slow EMA must be above its value three bars earlier. Short conditions are reversed.
Before a pullback can begin, a confirmed impulse bar must lie entirely beyond the fast EMA's 0.25 ATR touch band and close in the trend direction relative to the previous close. This arms the monitor. A new episode requires a new qualifying impulse after the previous episode ends.
2 — DETECT AND FREEZE THE REFERENCE
A long pullback begins when a later bar reaches the fast EMA's upper touch band and closes below the previous close. Short detection uses the lower band and a higher close.
At detection, the script freezes:
• ATR from the previous bar, using a 14-period ATR by default.
• The lowest low of the preceding 10 bars minus 0.1 frozen ATR for long structure; the highest high plus that buffer for short structure.
• The preceding 10-bar high for long pullback depth, or low for short depth.
The detection bar is excluded from these historical reference windows. No pivot that needs future bars is used. The structure boundary remains fixed throughout the episode.
3 — WAIT FOR STABILIZATION
By default, two consecutive bars must avoid lowering the previous bar's low for a long setup, or raising its high for a short setup.
The confirmation level is then frozen at the highest high of those two stabilization bars plus 0.1 frozen ATR for longs. Shorts use their lowest low minus the buffer.
A new adverse extreme of the monitored pullback resets stabilization and removes the old trigger. The script must establish a new one. A bar that makes a new adverse extreme cannot also confirm continuation.
4 — APPLY THE GUARD
Confirmation requires a LATER bar to close strictly beyond the frozen trigger and on the trend side of the fast EMA. The original trend regime must still hold, and both guard limits must pass:
• Maximum pullback depth: 3.0 frozen ATR by default. Depth measures the move from the pre-detection reference extreme to the worst pullback extreme observed so far.
• Maximum mean candle overlap: 70% by default. Each sample is the intersection of two consecutive high-low ranges divided by the smaller range. Samples are averaged from detection through the current bar; a zero-range candle counts as 100% overlap.
TOO DEEP and HIGH OVERLAP explain why confirmation is blocked. These are rule thresholds, not estimated probabilities. High overlap can later decline; the maximum observed depth cannot shrink within an episode.
HOW AN EPISODE ENDS
• STRUCTURE BROKEN: The close moves strictly beyond the frozen structure boundary against the setup. A wick alone is insufficient.
• TREND LOST: The EMA regime no longer supports the monitored direction.
• CONTINUATION CONFIRMED: A later close passes the trigger, trend and guard requirements.
• WINDOW ENDED: No confirmation within 12 bars after detection by default.
Structure failure takes priority over other outcomes, followed by loss of the trend regime. An otherwise valid confirmation on the final allowed bar takes priority over timeout. Only one episode is active at a time.
ILLUSTRATIVE LONG EXAMPLE
Suppose the pre-pullback high is 104 and the frozen ATR is 2. A pullback low at 100 represents a depth of 2 ATR.
After two qualifying stabilization bars, their highest high is 102.50. With the default buffer, the confirmation level is 102.70.
A later close above 102.70 confirms only if the EMA regime remains bullish, the close is above the fast EMA, and the depth and overlap limits still pass. A wick above 102.70 does not confirm. A new pullback low on that bar resets the trigger instead.
This example illustrates the rules; it is not a historical trade or a return claim.
DASHBOARD AND ALERTS
The compact dashboard shows status, direction, bars since detection, depth in frozen ATR units, mean overlap, guard status, structure and confirmation levels.
The Confirmed / broken / other counters describe events in the loaded chart history. Other combines trend loss and timeout. These counts are not trading win rates; confirmed events are not followed to a profit target or stop.
Seven alert conditions are provided: pullback detected, stabilization, long confirmation, short confirmation, structure broken, trend lost and observation window ended. Stabilization can alert again if a new adverse extreme resets the setup. Create the desired alerts separately in TradingView.
USAGE AND LIMITATIONS
Use standard candles with a fast EMA length smaller than the slow EMA length. Long-only, short-only and both-direction modes are available. All calculations use the chart's symbol and timeframe; there is no external indicator dependency or higher-timeframe data request.
Event states and markers update only at confirmed bar closes and are never shifted backward. EMA lines can move while a live bar is forming. Changes to settings, available history or historical prices can change the resulting events.
This is a descriptive technical-analysis tool, not an automated trading strategy. Confirmation describes the specified conditions at that close; it does not guarantee that the trend will continue. No profitability or superior performance has been established. Indicator

FIA Trend + Momentum 20/50/200## FIA Trend + Momentum 20/50/200
The **FIA Trend + Momentum 20/50/200** indicator combines long-term trend structure with momentum analysis and multi-timeframe confirmation.
It is designed to make market direction easier to identify visually while also filtering potential setups through RSI, MACD and Higher Timeframe confirmation.
### EMA Trend Structure
The indicator uses three Exponential Moving Averages:
EMA 20 for the short-term trend
EMA 50 for the medium-term trend
EMA 200 for the long-term trend
The background changes automatically depending on the EMA structure.
**Green**
EMA 20 > EMA 50 > EMA 200
Clearly bullish trend structure.
**Blue**
EMA 20 < EMA 50 while EMA 50 > EMA 200
Short-term weakness within a broader bullish trend.
**Orange**
EMA 20 > EMA 50 while EMA 50 < EMA 200
Short-term strength while the broader trend has not yet turned fully bullish.
**Red**
EMA 20 < EMA 50 < EMA 200
Clearly bearish trend structure.
The background colors are based only on the EMA structure. RSI, MACD and Higher Timeframe confirmation do not change the background color.
### RSI
The indicator uses a classic RSI calculation with a default length of 14.
RSI above 50 supports bullish momentum.
RSI below 50 supports bearish momentum.
The indicator also checks whether RSI is currently rising or falling, which is used as additional confirmation for pullback setups.
### MACD
The indicator uses the classic MACD settings:
Fast Length: 12
Slow Length: 26
Signal Length: 9
The MACD is used to evaluate:
Bullish or bearish momentum
MACD signal-line crossovers
Increasing or decreasing histogram momentum
### Higher Timeframe Confirmation
A selectable Higher Timeframe filter is included.
The indicator calculates the EMA 20/50/200 structure on the selected Higher Timeframe and checks whether the broader trend confirms the current setup.
This filter can be enabled or disabled in the settings.
### Setup Score
The indicator uses a scoring system with a maximum of 6 points.
EMA trend structure: 2 points
RSI confirmation: 1 point
MACD confirmation: 1 point
MACD momentum: 1 point
Higher Timeframe trend: 1 point
The minimum score required for a valid setup can be adjusted in the settings.
The default minimum score is 5 out of 6.
### Pullback Logic
The indicator also searches for potential pullbacks within established trends.
A bullish pullback requires a bullish EMA structure, a retracement toward the EMA 20, a close back above the EMA 20, rising RSI and bullish MACD confirmation.
The bearish logic works in the opposite direction.
### BUY and SELL Signals
A BUY or SELL label is only generated when several conditions align.
A **BUY signal** requires a sufficiently strong bullish setup score and either:
a confirmed bullish pullback
or
a bullish MACD crossover.
A **SELL signal** requires a sufficiently strong bearish setup score and either:
a confirmed bearish pullback
or
a bearish MACD crossover.
Signals are only marked when the condition appears for the first time, helping to avoid repeated labels on consecutive candles.
The signals are intended as confirmation tools and should not be interpreted as automatic trading instructions.
### Alerts
Built-in alerts are available for:
EMA 20/50 bullish crossover
EMA 20/50 bearish crossover
EMA 50/200 Golden Cross
EMA 50/200 Death Cross
FIA BUY setup
FIA SELL setup
### Important
This indicator is designed as a **trend and momentum analysis tool**.
It combines:
**EMA = trend direction**
**RSI = momentum strength**
**MACD = momentum direction and change**
**Higher Timeframe = broader trend confirmation**
It should not be used as a standalone trading system.
Always consider price action, support and resistance levels, volatility, market structure and appropriate risk management before making trading decisions.
For educational purposes only.
**Not financial advice.**
Indicator
