Weinstein Human-Like Stage Layout [v6]This indicator automates the classic Stan Weinstein 4-Stage Market Cycle Analysis (from his legendary book “Secrets for Profiting in Bull and Bear Markets” ) using a custom context-aware layout engine.
Most automated stage analysis scripts create immense visual clutter, resetting indicators and stacking labels on every minor bar cross. This script uses a human-like design philosophy, relying on multi-week absolute price structures to print exactly one clean, dynamic tracking label per macro phase.
Human-Centric Visual Design
The indicator adapts its graphics engine based on the style of phase the market is currently experiencing:
Stage 1 (Accumulation) : Draws a clean, horizontal Dashed Blue Box around the absolute support/resistance boundary floor, with a floating blue label centered over the base.
Stage 2 (Markup) : Strips away consolidation frames and softly tints the entire chart vertical background Green to signify a clean, institutional buying regime.
Stage 3 (Distribution) : Places a precise, horizontal Dashed Orange Box around the macro topping range to track turning points.
Stage 4 (Markdown) : Softly tints the chart vertical background Red to warn traders away from catching a falling knife.
How the Boundary Engine Works
Instead of calculating mathematical slope percentages (which shift falsely on volatile weeks), the engine operates via a shifted Donchian Price Channel Model:
Breakout Tracking : It evaluates the asset's closing price against the Highest High / Lowest Low of the prior 20 weeks (using a lookback offset to remove current bar skew).
Expansion Filtering : A true Stage 2 or Stage 4 regime shift will only trigger when price completely bursts out of the historical multi-month ceiling or floor line while confirming its position relative to the 30-Week Simple Moving Average.
Automatic Clean-Up : The script natively tracks historical nodes. The moment a new cycle phase is mathematically confirmed, it deletes overlapping data to keep your screen spotless.
Best Practices for Setup
Timeframe : To stay true to Weinstein's original methodology, always run this indicator on a Weekly (1W) chart.
Customization : Open the settings gear panel to adjust the Consolidation Range Lookback (Weeks) up or down depending on whether you want to focus on intermediate market movements or structural multi-year cycles.
⚠️ Disclaimer & Risk Disclosure
Educational Purpose Only : This script is an automated open-source visual aid designed solely for educational, historical analysis, and charting convenience. It does not constitute investment advice, financial advice, or a recommendation to buy, sell, or hold any financial asset or security.
No Guarantees of Accuracy : Market conditions are subject to rapid change. Past performance, channel breakouts, or historical bounding boxes generated by this script are not indicative of future market results.
Backtesting & Verification : Systems using algorithmic filters can generate false breakouts or delayed lag-signals during highly volatile or macroeconomic events. Users should always cross-reference these automated stages with their own fundamental analysis, independent price action charting, and volume verification.
Risk of Loss : Trading financial markets involves a high degree of financial risk. The author of this script assumes absolutely no liability or responsibility for any direct or indirect financial losses, trading errors, or damages resulting from the use or interpretation of this indicator.
مؤشر

Auto Fibonacci Retracement, Golden Zone & OTE Levels [LunqFX]Every fibonacci retracement tool draws the same six lines, and every one of them assumes you already picked the right swing. Drag the fib from a different high and the golden pocket lands somewhere else entirely — so the fibonacci level you are about to buy is not a level the market chose, it is a level your cursor chose.
This auto fibonacci indicator takes the swing out of your hands. The leg is anchored to confirmed pivots and re-anchors itself the moment structure makes a new extreme, so the fib retracement on the chart is always drawn from the leg the market is actually trading, and the golden pocket and OTE zone sit where that leg puts them.
And it adds the number no fibonacci retracement indicator has ever given you: how deep this symbol actually retraces.
Included: automatic fibonacci retracement from confirmed swing pivots, an adjustable golden pocket and OTE zone filled on the chart, fibonacci extension targets beyond the leg, gold candles on the bars that traded inside the zone, a measured typical retracement depth for the current symbol, a dashboard reading the live fib retracement, and alerts on the zone.
❶ HOW THE FIBONACCI IS ANCHORED
Swing points come from confirmed pivots, so a leg only exists once the bars on both sides of its pivot have closed. Nothing appears and then vanishes.
The active leg runs from the anchor pivot to the extreme pivot. A new pivot beyond the extreme, in the same direction, extends the leg — the fibonacci retracement stretches with it. A pivot the other way flips the leg and the fib re-anchors to the new one. There is no setting for "which high to use", because the structure decides.
❷ THE GOLDEN POCKET AND THE OTE ZONE
The band between 0.618 and 0.786 is filled, with a soft halo behind it so it reads at a glance on a crowded chart. Smart money traders call this band the OTE — the Optimal Trade Entry — and it is where continuation entries are taken after a pullback, because it is deep enough that the move is discounted and shallow enough that the leg is still intact.
The golden pocket, the narrow 0.618–0.65 strip, sits along the top edge of that band. Both edges are adjustable, so set them to 0.618 and 0.65 if the pocket alone is what you trade, or to 0.5–0.618 if that is your definition of the golden zone. The whole tool follows whatever you set — the depth statistics, the dashboard and the alerts all read from the same two numbers.
❸ EXTENSIONS
Three projections beyond the leg, negative fib values by default at −0.272, −0.618 and −1.0. They are drawn from the same anchors as the retracement, so a target is measured against the same swing the entry came from rather than against a fib you dragged separately.
They ship switched off. A target at −1.0 sits far enough from price that the chart's autoscale stretches to include it and squashes the candles into a band — useful once you are in a trade, in the way while you are reading the chart. Switch them on in the Extensions section when you need them.
❹ A SPENT LEG STOPS SHOUTING
When price trades all the way through the anchor, the leg has done everything it was going to do. The fib cannot re-anchor until the next pivot confirms, so in the meantime the whole drawing fades: the levels dim, the golden zone loses its glow and its label reads spent.
It is a small thing that most tools get wrong. A fib left burning at full brightness over a setup that is already finished is not neutral — it is the chart arguing for a trade that is no longer there.
❺ TYPICAL RETRACEMENT DEPTH — what a fibonacci tool never shows
0.618 is a number from a sequence. It is not a fact about gold, or about the euro, or about this timeframe.
So the indicator measures it. Every time a leg pulls back and then makes a new extreme in the same direction, the depth of that pullback is recorded. The average of those depths is printed on the chart as its own line, and in the panel with the sample size behind it:
Typical depth 0.547 (23 legs)
Read it against the golden zone. When the measured depth sits at 0.55 and the golden zone starts at 0.618, this symbol has been turning BEFORE the golden zone — waiting for 0.618 means the move leaves without you. When it sits at 0.72, shallow entries at 0.5 have been getting run over.
Only pullbacks that were followed by continuation are counted. A leg that reversed outright is not a retracement, and folding those in is how a depth average gets quietly inflated past anything useful. Samples under eight legs are marked with a tilde, because an average of three is not an average.
❻ THE CHART ITSELF
Every candle stands in a soft lit column — an aura drawn behind it, its body stretched across the full range and left almost transparent with its outline switched off. The effect is a neon tube rather than a coloured rectangle.
The glow is not constant. Its brightness is driven by the bar's range against ATR, so a conviction candle burns and a doji barely registers. Strength becomes something you feel across a screen of price action instead of something you measure bar by bar, and the decoration is carrying information rather than existing for its own sake.
The candle on top has a translucent body against a solid outline. That one detail is what makes it read as part of the chart instead of a sticker placed over it: the background shows faintly through while the edge stays crisp.
Five palettes, because one set of colours cannot suit every background. Neon Bloom is turquoise against magenta, a matched pair that leaves gold free for the zone. Midnight Cyan is the common signature dark scheme, Vibrant Neon the high-contrast crypto pairing, Classic Soft the muted everyday version. Cool Blue drops red entirely — a number of full-time traders run blue against grey, since red carries a stress response that gets in the way of reading a chart objectively for eight hours at a stretch.
Bars of the current leg that closed inside the golden zone are drawn in gold, so the OTE is visible in the price action and not only in the band behind it. Only the current leg is marked — a highlight left over from a leg that ended months ago sits nowhere near the zone on screen and reads as a fault.
The levels follow the same restraint, in three tiers rather than nine identical lines: the two ends of the leg carry its direction, the levels between them sit back in muted grey, and the accent is spent once, on the golden zone. Candle colouring can be switched off entirely if you would rather keep your own.
❼ THE DASHBOARD
Leg direction and size, the live retracement as a single large number, whether price is inside the golden zone or has not reached it yet, the measured typical depth with its sample count, and the 0.618 and 0.786 prices ready to be turned into orders.
HOW TO USE IT
1 — Wait for the leg, not the level. The fib only exists after a confirmed pivot. That delay is the point: it is what stops you fibbing a swing that is still forming.
2 — Compare the golden zone with the typical depth line. If they overlap, the zone is doing its job on this symbol. If the typical depth sits well above or below it, trade the measured level and treat 0.618 as decoration.
3 — Use the extensions as the other half of the trade. An entry in the golden zone with a target at −0.272 is a defined structure; an entry with no target is a hope.
4 — Change the swing length to change the timeframe of the analysis. A short length gives the fib of the current intraday leg; a long one gives the fib of the swing the whole session is trading inside. Both are valid, and they answer different questions.
HOW IT WORKS
Pivot highs and lows of your chosen length define the leg. Span is the distance between anchor and extreme; a retracement level is the extreme moved back toward the anchor by its fraction of the span, and an extension is the same arithmetic past the extreme. The live retracement is the current close expressed in that same fraction. Depth statistics keep a rolling window of completed pullbacks and report their mean.
Works on any symbol and any timeframe. On higher timeframes raise the swing length so the fib tracks the swing rather than the noise inside it.
SETTINGS
▸ Swing — pivot length and how far levels extend to the right. ▸ Retracement Levels — each level individually switchable. ▸ Golden Zone / OTE — fill on or off, and both edges of the band. ▸ Extensions — three targets, any fib values you like. ▸ Depth Statistics — on or off, and how many legs are remembered. ▸ Visuals — labels, line width, five candle palettes plus off, aura glow and its strength, gold OTE bars, dashboard position.
ALERTS — price entered the golden zone, 0.618 reached, leg fully retraced, and fib re-anchored. All fire on closed bars.
NON-REPAINTING — the fib is anchored to confirmed pivots, which means a leg is only drawn after the bars either side of its pivot have closed. The depth record is built from completed pullbacks and never changes retroactively.
WHY THESE PARTS ARE ONE SCRIPT
The auto-anchoring, the golden zone and the depth measurement describe one object. Auto-anchoring alone gives you a fib that is correctly placed but still generic. The golden zone alone is a band drawn on an assumption. The measurement exists only to tell you whether that assumption holds on the symbol in front of you — and it needs the anchoring to have legs to measure. Remove any one and the other two lose their point.
This indicator is an educational market-analysis tool, not financial advice. The depth statistic describes pullbacks that have already happened on the loaded chart; it does not predict the next one. Always confirm with your own analysis and manage your risk.
مؤشر

Turtle Trading System - Full (S1+S2)Turtle Trading System - Full (System 1 + System 2)
A complete implementation of the original Turtle Trading rules (Richard Dennis, 1983),
built for Daily timeframe use. Pine Script v6.
FEATURES:
- System 1: 20-day breakout entry / 10-day breakout exit
- System 2: 55-day breakout entry / 20-day breakout exit (failsafe, never filtered)
- Last-Trade Filter: skips a System 1 signal if the prior System 1 trade was a winner,
reducing false breakouts in ranging markets. Falls through to System 2 when filtered.
- ATR-based (N) position sizing reference and 2N initial stop
- Pyramiding: adds units every 0.5N in the favorable direction, up to 4 units max
- Trailing stop that only tightens in the trade's favor, never loosens
- No-repaint option: signals confirm only on closed bars (barstate.isconfirmed)
- Live status table: current position, units held, active system, current N, filter state
NOTES:
- Calibrated for Daily charts, consistent with the original system's historical backtesting.
Using it on lower timeframes changes what the lookback lengths represent and has not been
validated here.
- The Last-Trade Filter only tracks trades entered via System 1. Trades triggered by the
System 2 failsafe do not update the filter, per the original rule set.
- This is a signal/reference tool, not an auto-trading strategy. Verify signals in replay
mode before trading live. Be claude IA مؤشر

Volume FootprintVolume Footprint
First and foremost, a special thanks to @bassnavy for the direct request and inspiration to build this tool. I truly appreciate your comment!
Disclaimer: This is essentially a simplified script inspired by premium footprint tools (lol). I pay my utmost respect to TradingView and its amazing community!
This indicator is an "Advanced Precision Footprint Visualizer" built strictly on Pine Script v6. Standard footprint charts often struggle with TradingView's rendering limits (max 500 boxes). To overcome this, I engineered a dynamic tick-grouping algorithm that visualizes exact Bid/Ask deltas, volume densities, and Point of Control (POC) with extreme precision, without breaking the platform's constraints.
This tool is designed for highly disciplined traders who rely on verified entry setups. It filters out market noise and visually isolates true liquidity nodes.
Core Mechanics & Calculation Logic:
Tick Grouping (Step Calculation): step = syminfo.mintick * active_ticks
Why: Processing every single minimum tick would instantly exceed the 500-box drawing limit. By grouping ticks based on ATR (Auto Tiers) or a manual input, we compress the data while maintaining visual fidelity.
Output Example: If syminfo.mintick is 0.01 and active_ticks is set to 1, the step size becomes 0.01. If the bar's high is 16.59 and low is 16.26, the engine calculates exactly 34 rows for rendering.
Row Delta Determination: row_delta = Ask Volume - Bid Volume
Why: To accurately gauge whether buyers or sellers absorbed the liquidity at a specific price tier.
Output Example: If Ask volume is 2.5K and Bid volume is 1.0K at a specific row, the row_delta is +1.5K. The text dynamically changes to the "Plus Delta" color (Green).
3-Step Volume Gradient: half_max = max_r_v * 0.5
Why: To create a seamless 3-step color gradient (Low -> Mid -> High). By calculating the 50% threshold of the maximum volume (POC) inside the bar, it intuitively separates high-interest zones from market noise.
Premium Plan TF Downgrade Logic: actual_ltf = (not is_premium and is_sec_tf) ? "1" : ltf_res_input
Why: TradingView restricts seconds-based timeframes (like 1S or 15S) to Premium users and above. Requesting this data on lower plans causes script crashes. This logic automatically downgrades the timeframe to 1 (1-minute) if the Premium toggle is disabled, ensuring stability for all users.
Output Example: If the user inputs 15S and the Premium toggle is false, is_sec_tf evaluates to true. The condition not is_premium is met, so actual_ltf outputs "1" (1-minute). If the toggle is true, it outputs "15S".
Warning: This script operates at the absolute edge of TradingView's rendering capabilities. If you encounter rendering errors, please reduce the "Lookback Bars" or increase the "Lower Timeframe (LTF)" resolution.
مؤشر

Uptrick: Adaptive Trend TrailIntroduction
Uptrick: Adaptive Trend Trail is a trend-following overlay indicator that holds one of three states, bullish, bearish or neutral, where neutral applies only before the first confirmed flip on the chart. That state is visualized through a layered ATR trail or volatility bands, colored candles, and reversal labels. Rather than deriving direction from a single crossover, the indicator builds a composite regime score from nine weighted measurements, requires agreement from three internally calculated adaptive Supertrends, and then applies confirmation, cooldown and hysteresis rules whose strictness changes with measured market conditions. It also includes a valuation meter and a set of internal simulation statistics displayed in the Data Window.
The design intent is to require more evidence before accepting a state change when measured directional efficiency is low, rather than to detect every turn as early as possible.
Originality
A trend state can be derived from a single measurement: a moving average cross, one Supertrend, or one oscillator threshold. Each responds to a different aspect of price and each has conditions where it carries less information. A long moving average responds slowly. A single volatility-stop line can change direction repeatedly when price oscillates within its band width. An oscillator carries no information about price structure or volatility state. This script combines measurements that are informative under different conditions, so that no single one can force a state change on its own, and it makes the strictness of the decision depend on measured market conditions rather than holding it fixed.
Why these specific components were chosen :
Directional efficiency (net movement over total path traveled over 10 bars) is used because it distinguishes directional movement from back-and-forth movement covering the same ground. Its inverse, chop, is the central control variable of the script. Chop is not only an input to the score; it directly changes how many Supertrends must agree, how many bars a signal must persist, how wide the hysteresis gate is, and how long the cooldown lasts. This is the mechanism that lets one configuration behave differently in high-efficiency and low-efficiency conditions without the user changing settings.
Three Supertrends at different ATR lengths (fast 9, medium 14, slow 21) are used instead of one because a single Supertrend returns a binary direction with no measure of agreement. Three produce a vote count, which serves both as a gate (how many must agree) and as a continuous input to the composite score (vote difference divided by three). Their ATR multipliers are not fixed: chop and volatility expansion are added on top of the user's base factor, so all three widen as efficiency falls or volatility expands.
Distance from the EMA baseline and momentum are both normalized by ATR rather than used raw. This expresses them relative to recent volatility and reduces their dependence on the instrument's absolute price scale, so the same threshold values remain meaningful on instruments with very different nominal prices.
Baseline slope and a slower HL2 baseline slope are included because distance alone does not distinguish a market moving away from its mean from one moving back toward it. Two slopes at different speeds mean a short-term push against a flat longer-term structure contributes less to the score than an aligned move.
RSI is included with a small weight (0.08) as a momentum cross-check rather than as a signal generator. At that weight it cannot on its own carry the score past the gate.
Candle pressure (body direction and close location within the bar) and structure breaks (close beyond the prior N-bar high or low) are included with small weights (0.05 each) because they respond on the current bar, adding a small amount of immediacy to a score otherwise built from lagging averages.
How they work together : the nine fields are blended into one regime value smoothed by a 3-period EMA. That value must exceed a dynamic gate whose size grows with selectivity, chop and volatility deviation. Price must also be displaced from the baseline. Momentum must have the correct sign. The Supertrend vote must be confirmed and persistent. Only then does a candidate exist, and the candidate must persist for one to three consecutive bars depending on chop, with a cooldown of six to ten bars since the last flip. A separate strong-move path can bypass the candidate persistence requirement and the cooldown when all three Supertrends agree unanimously, the score exceeds the gate by an additional margin, momentum is strong and efficiency is above 0.42. It does not bypass the underlying Supertrend persistence requirement. Finally, a takeover rule requires the fast Supertrend plus at least one slower one to agree with the new direction, so a flip cannot occur against the shorter-term Supertrend structure.
The valuation meter and the internal simulation exist to provide context on the same chart rather than requiring separate indicators: one shows where smoothed RSI currently sits on a segmented scale, the other reports how the script's own state changes would have resolved under a simple trailing-stop assumption.
Features
Single trend state driving all visuals, bullish or bearish once the first flip occurs, neutral before that point
Composite regime score built from nine weighted fields, blended and smoothed with a 3-period EMA
Weighting: baseline distance 0.22, Supertrend consensus 0.20, momentum 0.19, baseline slope 0.14, slow baseline slope 0.10, directional efficiency 0.09, RSI 0.08, candle pressure 0.05, structure break 0.05
Directional efficiency engine measuring net movement against total path over 10 bars, producing a chop value used throughout the script
Volatility regime measurement comparing current ATR to its 50-period EMA, producing expansion and deviation values
Three internally calculated Supertrends (fast, medium, slow) used for logic only and not plotted on the chart
Adaptive Supertrend factors, where chop and volatility expansion are added on top of each user-set base multiplier, with the slow Supertrend receiving the largest adjustment
Vote-based Supertrend consensus requiring two of three in normal conditions and three of three when chop exceeds 0.70
Supertrend persistence requirement of one confirmed bar normally and two when chop exceeds 0.72
Dynamic hysteresis gate that widens with the selectivity input, with chop, and with volatility deviation
Price displacement filter requiring close to be above or below the baseline by an ATR-scaled amount
Momentum sign filter requiring directional momentum beyond a small deadband
Adaptive confirmation requiring one, two or three consecutive candidate bars depending on measured chop
Strong-move path that can bypass the candidate confirmation requirement and the cooldown when all three Supertrends agree, the score clears the gate by an additional 0.26, momentum exceeds 0.16 and efficiency exceeds 0.42, while still requiring Supertrend persistence
Takeover rule requiring the fast Supertrend plus one slower Supertrend to align with the new direction before any flip
Adaptive cooldown of six to ten bars between state changes, scaled by chop
All state changes evaluated on confirmed bars only, so the state does not flip on an unclosed bar
Trail overlay mode with three layers constructed at 0.55, 1.15 and 1.60 ATR multiples from the smoothed baseline, placed below it in bullish states and above it in bearish states, scaled by the width input
Bands overlay mode with three levels on each side of the baseline at 1.30, 2.00 and 2.90 ATR multiples, scaled by the width input, using an additional smoothing stage applied to the already-smoothed baseline and ATR
Overlay None mode that hides the Trail and Bands while leaving the other independently controlled outputs available
Smoothness control applied to the baseline and ATR used for the overlay geometry
Trend candles that recolor the price bars to the active state
Reversal labels printed on the bar where the state changes, placed relative to the outer trail layer
Valuation meter drawn as a table with a segmented scale and a pointer showing where 3-period smoothed RSI(14) currently sits
Four meter sizes: Off, Compact (11 segments), Normal (17 segments) and Large (25 segments)
Six meter positions covering top and bottom, left, center and right
Internal historical trade simulation driven by the script's own state changes, reported in the Data Window
Simulation outputs: return percent, win rate percent, profit factor, maximum drawdown percent and closed trade count
Simulation uses a fixed 10000 starting equity and full-equity sizing, with a fee equal to 0.1 percent of entry equity deducted at entry and a further amount equal to 0.1 percent of that same entry equity applied at exit
Simulation stop is set from the outer trail on the entry bar, constrained to at least one minimum tick beyond the entry close, and thereafter can only move in the position's favorable direction using the previous bar's outer trail value
Simulation return figure includes unrealized profit or loss on any position still open, so it is not a closed-trade-only figure
Two alert conditions, one for the bullish flip and one for the bearish flip, each carrying the ticker in the message
Inputs
Group 01, Trend Engine
Trend Length, default 34, range 10 to 200. Sets the primary EMA baseline used for the overlay, the distance field and the baseline slope field. It also determines two internally derived lengths: the slower HL2 baseline is calculated at approximately 70 percent of this value with a floor of 10, and the structure-break lookback is approximately 12 percent of this value with a floor of 3.
Momentum Length, default 12, range 3 to 100. Lookback used to measure directional momentum before ATR normalization.
Signal Selectivity, default 0.35, range 0.10 to 1.25. Raises both the hysteresis gate and the required price displacement. Higher values produce fewer state changes.
Group 02, Supertrend Confirmation
Fast Length, default 9, range 2 to 100. ATR length of the fast internal Supertrend.
Fast Factor, default 1.45, range 0.25 to 10.0. Base ATR multiplier of the fast internal Supertrend before adaptive widening.
Medium Length, default 14, range 2 to 150. ATR length of the medium internal Supertrend.
Medium Factor, default 1.95, range 0.25 to 10.0. Base ATR multiplier of the medium internal Supertrend.
Slow Length, default 21, range 2 to 200. ATR length of the slow internal Supertrend, acting as the broader continuation confirmation.
Slow Factor, default 2.55, range 0.25 to 10.0. Base ATR multiplier of the slow internal Supertrend.
Group 03, Overlay
Overlay, default Trail, options Trail, Bands, None. Selects which overlay geometry is drawn, or hides both.
Width, default 1.00, range 0.40 to 2.50. Scales the distance of all trail layers and all band levels from the baseline. Because the internal simulation uses the outer trail layer as its stop, this input also changes the Data Window statistics. It does not affect the trend engine.
Smoothness, default 5, range 1 to 20. Smooths the baseline and ATR used to build the overlay geometry, and is applied a second time to those already-smoothed values when Bands mode is selected. Because the outer trail layer is built from these smoothed values, this input also changes the Data Window statistics. It does not affect the trend engine.
Group 04, Valuation
Meter Size, default Normal, options Off, Compact, Normal, Large. Controls whether the meter is shown and how many segments it uses.
Position, default Top Center, options Top Left, Top Center, Top Right, Bottom Left, Bottom Center, Bottom Right.
How It Works
The baseline is an EMA of close over the Trend Length. ATR(14) is the volatility unit and is floored at one tick to avoid division problems on illiquid data.
Directional efficiency is the absolute 10-bar net price change divided by the sum of the absolute bar-to-bar changes over the same window, clamped between 0 and 1. Chop is one minus that value. Efficiency is signed by the 10-bar direction to form the efficiency field.
Volatility regime compares current ATR to its 50-period EMA. Expansion is the amount above one, clamped to 1.25. Deviation is the absolute distance from one, clamped to 1.50.
The three Supertrend factors are the user's base values plus a chop term and a volatility expansion term. Their directions become bullish or bearish votes. The vote requirement is two of three normally and three of three when chop exceeds 0.70, and the confirmed vote must persist for one confirmed bar, or two when chop exceeds 0.72.
Nine fields are then blended. Distance from baseline and momentum are divided by ATR and clamped. Baseline slope and slow baseline slope are three-bar changes divided by ATR and clamped. RSI(14) is centered on 50 and clamped. The Supertrend field is the vote difference divided by three. Candle pressure combines body direction and close location within the bar. Structure is plus one when close breaks the prior N-bar high and minus one when it breaks the prior N-bar low. The weighted sum is smoothed with a 3-period EMA to produce the regime value.
The gate is 0.22 plus selectivity times 0.12, plus chop times 0.085, plus a volatility deviation term capped at 0.06. A bullish candidate exists when the regime exceeds the gate, close is above the baseline by the required ATR displacement, momentum is positive beyond its deadband, and the bullish Supertrend consensus is persistent. The bearish candidate is the mirror.
A candidate must persist for one bar in high-efficiency conditions, two when chop exceeds 0.40, and three when chop exceeds 0.72. The strong-move path can bypass that candidate persistence requirement and the cooldown, but only when all three Supertrends agree, the regime clears the gate by an additional 0.26, momentum exceeds 0.16 in absolute terms and efficiency is above 0.42. Because the strong-move path is itself built on the candidate condition, it does not bypass the Supertrend persistence requirement. It is intended to provide a faster response when directional evidence is unusually strong under the script's own measurements.
Before any flip is accepted, the takeover rule requires the fast Supertrend and at least one of the medium or slow Supertrends to be aligned with the new direction. A cooldown of six bars plus up to four additional bars scaled by chop must also have elapsed since the last flip, unless the strong-move path is active. All of this is evaluated on confirmed bars only.
When the state flips, the counters reset, the label prints, the candles recolor and the overlay switches sides. Before the first flip on a chart the state is neutral, candles are yellow, and the trail layers sit flat on the baseline.
The valuation meter takes RSI(14), smooths it with a 3-period EMA, and maps it onto the selected number of segments with a pointer. It is a positioning display for smoothed RSI and nothing more; it does not measure fair value and is not part of the trend decision.
The Data Window values come from a simplified internal historical trade simulation implemented inside the indicator. The script is an indicator, not a TradingView strategy, so these are not Strategy Tester results and no Strategy Tester properties apply. The simulation opens a position at the close of each flip bar and closes it on either an opposite flip or a stop. The stop is set on the entry bar from the outer trail, constrained to at least one minimum tick beyond the entry close, and thereafter can only move in the position's favorable direction using the previous bar's outer trail value. Starting equity is 10000, the full equity is used on every position, a fee equal to 0.1 percent of entry equity is deducted at entry, and a further amount equal to 0.1 percent of that same entry equity is applied at exit. Win rate and profit factor are classified on the fee-inclusive result of each position. The return figure is calculated from equity including unrealized profit or loss on any position still open, so it is not a closed-trade-only figure.
These assumptions are deliberately simplified. The purpose is to compare the effect of different settings against one another on the same symbol, not to model a tradable account. Full-equity sizing is used so the figures are not dependent on an arbitrary position size choice, and no sizing shown here is being recommended. No slippage, spread, funding cost or gap-through-stop execution is modelled, so the simulation does not reproduce actual execution conditions and may differ materially from live trading. There is no take profit and positions are never partially closed. These values describe the script's own historical state changes under those assumptions and are not evidence about future behavior.
How to Use
Add the indicator to a clean chart and read the current state from the candle color and the overlay side. In Trail mode the layers are constructed below the smoothed baseline while the state is bullish and above it while the state is bearish. In Bands mode the three levels on each side show how far price has extended from the baseline in ATR terms.
Increase Signal Selectivity if you are getting more state changes than you want, or increase Trend Length for a slower baseline. Increase the Supertrend factors to require larger moves before the internal confirmation layer will agree. Reduce the factors and lengths for faster and noisier behavior on lower timeframes.
Width and Smoothness do not affect the trend engine, so flips and alerts are identical regardless of their values. Both do change the Data Window statistics, because the stop used by the internal simulation is drawn from the outer trail layer.
The two alerts fire on confirmed bars when the state changes. Treat the Data Window values as a rough comparison tool between settings on the loaded symbol and history, subject to the assumptions listed above.
Limitations to be aware of: because confirmation, persistence, takeover and cooldown conditions must all be satisfied before a state change is accepted, a flip can occur after price has already moved some distance from where the previous state ended. During lower-efficiency conditions the script requires additional Supertrend agreement and additional confirmation bars, which increases that distance further. These mechanisms intentionally prioritize confirmation over earliest possible detection, and that trade-off cannot be removed by settings, only shifted. Values on the current unclosed bar can change until that bar closes, since state changes are only committed on confirmed bars. The chart begins in a neutral state until the first flip is accepted. Behavior varies substantially between symbols and timeframes, and the defaults are a starting point rather than an optimized configuration.
Conclusion
Uptrick: Adaptive Trend Trail derives a trend state from nine weighted measurements rather than a single crossing, and makes the strictness of that decision a function of measured directional efficiency and volatility through the chop and volatility terms. The overlay, the trend candles, the valuation meter and the internal simulation are there to make that state and its context readable on one chart. It is a decision-support tool for discretionary trend reading and is intended to be used alongside your own analysis and risk management rather than as a standalone system.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice and does not constitute a recommendation to buy or sell any instrument. All trading involves risk and can result in substantial losses. Leveraged products can involve additional risks that depend on the instrument, broker and account structure. Past behavior of this indicator, including any statistics it displays, does not predict or guarantee future results. Signals, statistics and visuals vary across symbols, timeframes and market conditions. You are solely responsible for your own trading decisions and should test any tool thoroughly and apply your own risk management before using it with real capital. مؤشر

VWAP Rope Band by ByblloVWAP Rope Band plots a smoothed trend line (the "rope") that only moves once price has traveled beyond a VWAP-deviation threshold from its last position - small back-and-forth noise around VWAP is absorbed, and the line only steps when a move is statistically meaningful.
The threshold is the standard deviation of (close - VWAP) over a lookback period, scaled by a multiplier, so the surrounding band automatically widens or narrows with how far price is currently dispersing from VWAP - no manual adjustment needed as volatility changes.
A genuine trend reversal is only registered once the rope actually reverses direction (not on every VWAP wiggle). That short transition window gets its own color, an optional gradient cloud, and an optional Buy/Sell badge at the exact bar the reversal is confirmed.
INTENDED USE
Works well for short-term futures scalping - Nasdaq futures, KOSPI200 futures, and similar instruments. Built and tested primarily on the 1-minute chart, but the underlying VWAP/rope/band logic is timeframe-agnostic and holds up well on 2, 3, and 5-minute charts and other intraday timeframes too. The StdDev Length and Band Multiplier adapt to volatility automatically, but it's worth rechecking them when you switch timeframe or instrument.
FEATURES
- Threshold-based "rope" trend line that ignores VWAP noise, only stepping on statistically meaningful deviations
- Volatility-adaptive band (self-widening/narrowing standard-deviation envelope around the rope)
- True-gradient cloud fill between rope and band, with adjustable steepness
- Confirmed-reversal transition detection with its own color/cloud, auto-expiring after 5 bars if unresolved
- Optional Buy/Sell badge plotted at the exact bar a reversal is confirmed
- Two alert families: simple rope crossover/crossunder, and confirmed Buy/Sell signal alerts
- Works on any chart type (candlestick, Heikin Ashi, Renko, etc.) since prices are pulled via request.security() from the underlying ticker
This is a visual/alerting tool only - it does not place real orders. For educational and informational purposes only, not financial advice. Always verify how the rope and bands behave on your specific symbol and timeframe before relying on them for live trading. مؤشر

Adaptive Trend Direction Indicator [ATR Trail + Regime]Adaptive Trend Direction
WHAT IT DOES
Adaptive Trend Direction is a trend-following state indicator. It answers three questions on every bar: which way is the trend pointing, is the market currently orderly enough for a trend signal to be worth taking, and where is the level that would invalidate that view.
The core is an ATR trailing stop that flips between a bullish and a bearish state. On its own a trailing stop flips constantly in choppy conditions, which is the well-known failure mode of every trend follower. This script's purpose is to gate those flips behind a two-factor regime test, so that the flips which occur inside directionless price action are marked as such instead of being presented as trend signals.
HOW IT WORKS
ATR trailing stop. A stop is placed one ATR-multiple away from the close (default ATR 23, multiplier 3.0). While the state is bullish the stop only ratchets upward; while bearish it only ratchets downward. A close beyond the stop flips the state and the stop jumps to the opposite side of price. The state flip is the raw directional signal.
Regime detection — ADX plus Efficiency Ratio. Two independent measures must agree before the market counts as trending. ADX (default period 10) must exceed its threshold (default 21), measuring directional strength. Kaufman's Efficiency Ratio must exceed its threshold (default 0.15), calculated as the absolute net move over N bars divided by the sum of the absolute bar-to-bar moves over the same window — a value near 1 means price travelled in a straight line, a value near 0 means it covered the same ground repeatedly. ADX can rise on volatile chop; the Efficiency Ratio cannot. Requiring both is what filters out that case.
Hysteresis. The regime does not flip the moment the two tests agree. It requires N consecutive confirming bars (default 3) before switching, in either direction. This stops the regime label from oscillating bar to bar around the thresholds, which would otherwise reintroduce the exact noise the filter is meant to remove.
RSI momentum filter. A directional flip is only accepted if RSI confirms it — above the long threshold for longs, below the short threshold for shorts. The defaults (48 long, 43 short) sit close to the midline, so this rejects flips that occur against prevailing momentum rather than demanding an extreme reading.
Signal end conditions. An open directional signal is marked as finished on whichever comes first: an opposing trailing-stop flip, an EMA slope reversal against the signal (optional, off by default), or a maximum bar count (default 140) that retires a signal which has gone nowhere.
Optional mean-reversion mode. When the regime is ranging, the default behaviour is to stand aside — no signals are generated. Setting "Ranging Mode" to 1 instead generates counter-trend signals from RSI extremes (default below 30 / above 70) with ATR-based take-profit and stop levels drawn on the chart. This is opt-in because it is a different premise from the rest of the script and should be evaluated separately.
WHAT YOU SEE ON THE CHART
Trailing stop line, green in the bullish state and red in the bearish state.
Background tint: green while the regime is trending, amber while ranging.
Triangles mark trend signals, circles mark mean-reversion signals, crosses mark where a signal ends.
Bars are tinted while a signal is active, so the held periods are visible at a glance.
A label at the end of each signal shows the percentage move over that leg, with a tooltip giving entry, exit, end reason and bars held. This is a measurement of the price move between two chart events. It is not a return, and it accounts for no costs.
A dashboard reports ATR, stop level, direction, RSI, EMA slope, regime with live ADX/ER values, current signal state, and which components are switched on.
SIZING READ-OUT
The dashboard also reports a volatility-normalised exposure figure: leverage that scales inversely with recent ATR so that a fixed percentage of a reference account is at risk regardless of how volatile the market currently is, clamped between a floor and a ceiling. Setting the vol target to 0 switches to a stop-distance-based calculation instead. This is informational only. It gates no signal, and the reference account size affects only the displayed units — the leverage figure itself is independent of it.
WHY THIS IS AN INDICATOR AND NOT A STRATEGY
The script tracks an internal long/short/flat state so the chart can colour bars and measure each leg, but it submits no orders and produces no Strategy Tester report. That is intentional. Fill assumptions, funding and leverage modelling on a leveraged instrument dominate any backtest of a system like this, and a tester report would imply a precision the model does not have. What is shown here is the signal logic and the price move between signals, which is what can be verified directly on the chart.
SETTINGS AND USAGE NOTES
The defaults were fitted by a parameter search on a single market and timeframe (BTC on a 6-hour chart). They are a starting point for that context, not universal values, and there is no reason to expect them to transfer unchanged to other symbols or timeframes — the ATR multiplier and the regime thresholds in particular are the ones to revisit first. The volatility estimate used by the sizing read-out assumes roughly a 6-hour bar; on other timeframes it should be recalibrated.
Every component has an independent toggle, so the contribution of each can be isolated: turn the regime filter off to see the raw trailing-stop flips, then turn it back on to see which ones it removed. Signals are evaluated on bar close.
Alerts are available for signal start and signal end, in plain text or as a JSON body for programmatic consumers.
LIMITATIONS
This is a trend-following model. It will give back open gains at every reversal, because the exit is a trailing stop rather than a target. It will produce clustered false flips at regime boundaries, since the confirmation delay lags a genuine turn by design. The mean-reversion mode takes positions against the prevailing move and behaves very differently from the trend mode. Signal-leg percentages shown on the chart exclude commission, slippage and funding.
Published open-source. Not financial advice, not a recommendation to trade any instrument, and nothing here is a forecast. Test it yourself before relying on it. مؤشر

Kinetic MTF Trend & Structure RibbonsKinetic Trend & Structure Ribbons is a multi-layer trend framework designed to make market structure visible across multiple time horizons on a single chart.
Instead of treating moving averages as isolated crossover signals, Kinetic organizes them into a visual hierarchy: Execution → Trend → Structure → Long-Term Regime
The goal is simple: quickly identify whether price is trending, pulling back, compressing, transitioning, or undergoing a deeper structural change.
The framework is primarily designed around stocks and swing trading , while retaining enough short-term information to assist with lower-timeframe execution.
Core Concept
Markets operate across multiple time horizons simultaneously.
A short-term selloff can occur inside a strong intermediate uptrend. An intermediate downtrend can occur while long-term structure remains bullish. Likewise, a short-term breakout means much more when the larger structural layers are aligned behind it.
Kinetic separates these horizons visually rather than compressing everything into a single bullish/bearish signal.
The framework is designed to answer four questions:
1. What is price doing right now?
2. What direction is the active trend?
3. Where is deeper market structure?
4. What is the long-term regime?
The relationship between these layers is often more important than any individual moving average.
Visual Hierarchy
1. Execution Ribbon
The fastest group of averages follows price closely and represents short-term market behavior.
Use it to observe:
*Short-term momentum
* Expansion and contraction
* Trend rotation
* Pullbacks
* Reclaims
* Early changes in direction
When the ribbon is tightly compressed, the market may be entering equilibrium.
When it expands cleanly in one direction, short-term trend strength is increasing.
2. Gaussian Trend Line
The Gaussian filter acts as a smooth trend spine between short-term price action and the broader structural ribbons.
Its purpose is to reduce short-term noise while remaining responsive enough to identify meaningful changes in direction.
Watch for:
* Price reclaiming or losing the Gaussian
* Changes in Gaussian slope
* Interaction between the Gaussian and execution ribbon
* Compression between the Gaussian and larger trend structure
The Gaussian should be interpreted in context rather than as a standalone buy or sell signal.
3. Blue Trend Ribbon
The blue ribbon represents the primary trend layer.
This is the area where normal pullbacks within an established trend can often be distinguished from more meaningful structural deterioration.
Key characteristics include:
* Rising + expanding: strengthening bullish trend
* Falling + expanding: strengthening bearish trend
* Flattening: trend momentum is weakening
* Compressing: equilibrium or transition
* Price repeatedly respecting the ribbon: established trend behavior
The location of the execution layer and Gaussian relative to the blue ribbon provides additional context.
4. Gold Structure Ribbon
The gold ribbon represents slower, deeper market structure.
Because this layer reacts more slowly than the blue trend ribbon, interaction with gold generally represents a more significant event than an ordinary short-term pullback.
The gold ribbon can help distinguish between:
* Routine trend retracement
* Intermediate correction
* Structural reset
* Major trend transition
A market can lose its short-term trend while its deeper structure remains intact.
This distinction is one of the central ideas behind Kinetic.
5. Red Long-Term Regime
The red layer represents the slowest structural reference within the framework.
It is intended to provide long-term regime context rather than short-term entries.
Think of the hierarchy as:
Fast price behavior
↓
Execution
↓
Gaussian
↓
Blue Trend
↓
Gold Structure
↓
Red Long-Term Regime
As price penetrates progressively deeper layers, the significance of the move generally increases.
Reading the Framework
Bullish Alignment
The cleanest bullish environments occur when the layers become progressively ordered beneath price.
Typical characteristics:
* Price above the execution ribbon
* Execution ribbon expanding upward
* Gaussian rising
* Blue trend ribbon rising
* Gold structure ribbon rising
* Faster layers positioned above slower layers
This creates a visual hierarchy in which shorter-term momentum is supported by progressively deeper structure.
Bearish Alignment
The opposite configuration represents bearish alignment.
Typical characteristics:
* Price below the execution ribbon
* Execution ribbon expanding downward
* Gaussian falling
* Blue trend ribbon declining
* Gold structure deteriorating
* Faster layers positioned beneath slower layers
The more completely the hierarchy becomes inverted, the more significant the bearish regime.
Compression → Expansion
One of the most important concepts in Kinetic is compression and expansion.
During compression, multiple layers begin moving closer together. Trend separation decreases and the market approaches equilibrium.
Compression itself does not predict direction.
Instead, it identifies an environment where the existing trend structure has weakened and a new directional move may eventually develop.
The subsequent expansion provides the directional information.
Compression
Look for:
* Narrowing ribbons
* Flattening slopes
* Gaussian convergence
* Price repeatedly crossing the same structural area
* Reduced separation between fast and slow layers
Expansion
Look for:
* Ribbon separation increasing
* Consistent slope developing
* Price holding one side of the framework
* Faster layers leading slower layers
* Structural ordering becoming increasingly clean
Compression represents potential energy. Expansion reveals direction.
Pullbacks vs. Structural Breaks
Not every decline is bearish.
This framework was specifically designed to preserve the distinction between short-term weakness and long-term structural weakness.
For example, price may:
1. Lose the execution ribbon while remaining above blue.
2. Enter the blue trend ribbon while gold remains intact.
3. Lose blue and test deeper gold structure.
4. Lose both trend and structure and begin approaching the long-term regime layer.
These events should not be treated as equivalent.
The deeper price moves through the hierarchy, the more meaningful the structural deterioration becomes.
The same concept applies in reverse during recovery from a bearish regime.
Trend Transitions
Markets rarely move instantly from fully bullish to fully bearish structure.
Transitions frequently occur progressively:
Expansion → Deceleration → Compression → Rotation → Reordering → Expansion
Kinetic is designed to make this process visible.
Rather than attempting to predict every turning point, the framework allows the trader to observe the market reorganizing itself across multiple time horizons.
Practical Use
Kinetic is best used as a context and structure framework, not as a mechanical buy/sell system.
Potential applications include:
* Trend identification
* Swing-trade filtering
* Pullback evaluation
* Structural support/resistance
* Compression identification
* Breakout context
* Trend continuation
* Regime identification
* Multi-timeframe alignment
* Risk management context
A trader may combine the framework with independent tools such as price action, volume, relative strength, volume profile, or anchored VWAP depending on their methodology.
These external tools are not required for the framework itself.
Signals
Where enabled, Kinetic includes visual signals designed to highlight changes within the faster components of the framework.
Signals should not be interpreted as automatic entries or exits.
Their significance depends heavily on surrounding structure.
For example, a bullish short-term signal occurring above rising blue and gold ribbons represents a very different environment from the same signal occurring beneath declining structural layers.
Context comes first. Signal comes second.
Timeframe Philosophy
Kinetic uses multiple structural horizons so that a lower-timeframe chart can retain awareness of the larger trend.
This makes it particularly useful for traders who execute on shorter charts while making decisions based on higher-timeframe structure.
The objective is not to make every timeframe look identical.
It is to maintain a consistent structural framework while allowing price behavior to be examined at different levels of detail.
What Kinetic Is — and Isn’t
Kinetic is designed to visualize trend architecture.
It is not intended to:
* Predict exact tops or bottoms
* Generate guaranteed trade entries
* Replace risk management
* Eliminate false breakouts
* Function as a standalone trading strategy
The framework organizes information that already exists in price into a more intuitive structural hierarchy.
Its value comes from interpreting the relationships, slopes, ordering, compression, and expansion of those layers.
Quick Reference
Execution Ribbon → Short-term behavior and rotation
Gaussian → Smoothed trend spine
Blue Ribbon → Primary trend
Gold Ribbon → Deeper market structure
Red Layer → Long-term regime
The basic visual rule:
Ordered + expanding = trend
Compressed + intertwined = equilibrium / transition
Reordered + expanding = new trend structure
Final Notes
Kinetic was built around a simple premise: Price should not be viewed against one moving average or one timeframe in isolation.
Trend exists as a hierarchy.
Short-term momentum moves first. Intermediate trend follows. Deeper structure moves more slowly. Long-term regime changes slowest of all.
Kinetic brings those layers together so that their relationship can be read visually on a single chart.
Execution → Trend → Structure → Regime
The goal is not to predict what the market must do next.
The goal is to make it easier to see what the market is doing now.
مؤشر

Supertrend Confirmed Close | forexs# Supertrend Confirmed Close
Supertrend Confirmed Close is an open source modification of the classic ATR based Supertrend indicator. Its main purpose is to confirm trend reversals only after the current bar has closed, so temporary intrabar crossings do not create confirmed Buy or Sell signals.
## How it works
The indicator builds trailing volatility bands from Average True Range and a user selected price source.
Default settings:
ATR Period: 10
ATR Multiplier: 3.0
Source: HL2
ATR Method: Wilder ATR
An SMA of True Range can also be selected as an alternative ATR calculation.
During a bullish state, the lower Supertrend band trails price. During a bearish state, the upper Supertrend band trails price.
A bullish reversal is confirmed when the previous trend state is bearish and a completed bar closes above the previous bearish Supertrend band.
A bearish reversal is confirmed when the previous trend state is bullish and a completed bar closes below the previous bullish Supertrend band.
## What is different in this version
This implementation adds explicit closed bar confirmation to the reversal logic. The trend state, Buy signal, Sell signal, and direction change alerts are not confirmed until the bar is complete.
It also includes an optional "Freeze Supertrend Line Until Candle Close" setting. When enabled, the displayed active Supertrend line remains at its previous confirmed value while the realtime bar is forming, then updates when the bar closes.
Other additions include Pine Script v6 compatibility, organized inputs, optional trend change circles, trend highlighting, and separate alert conditions for bullish, bearish, and any confirmed direction change.
## Signals and alerts
BUY marks a confirmed change from a bearish Supertrend state to a bullish Supertrend state.
SELL marks a confirmed change from a bullish Supertrend state to a bearish Supertrend state.
These labels describe the indicator's trend state. They are not forecasts or guarantees of future price direction.
Alert conditions are provided for confirmed Buy, confirmed Sell, and confirmed direction changes. Users may also select TradingView's Once Per Bar Close frequency when creating an alert.
## Settings
Users can adjust the ATR period, ATR multiplier, source, and ATR calculation method. Buy and Sell labels, trend change circles, trend highlighting, and realtime line freezing can also be enabled or disabled.
## Limitations
Supertrend is a trend following method. In sideways or choppy markets it can change direction frequently and produce false or late signals.
Closed bar confirmation intentionally waits until the bar is complete. This avoids treating temporary intrabar crossings as confirmed reversals, but it can also make signals occur later than an intrabar implementation.
ATR settings materially affect sensitivity. Different symbols, market conditions, and timeframes can produce different behavior.
This indicator does not include position sizing, stop loss rules, profit targets, trade management, or performance guarantees. It should not be treated as a complete trading system.
For signal based use, apply it to standard price charts such as regular candles or bars rather than synthetic chart types whose prices do not represent directly traded market prices.
## Credits and open source reuse
This script reuses and modifies the open source SuperTrend implementation published by TradingView author KivancOzbilgic. That publication also credits everget, Alex Orekhov, for inspiration related to highlighting, signals, and alerts.
The reused Supertrend logic is credited here in accordance with TradingView's open source reuse requirements. This modified publication should remain open source unless the necessary permission for another publication mode has been obtained from the original author.
## Disclaimer
This indicator is provided for technical analysis and educational purposes only. It is not financial or investment advice. No signal or indicator can guarantee a profitable outcome.
مؤشر

FCPO KDJ Tower HA EMA StrategyFCPO 5-Min Strategy Backtest v1 — A day-trading strategy for FCPO (Malaysia Crude Palm Oil Futures, BMD:FCPO1!) built on a 5-layer confluence system: KDJ + Tower (Baota) + Heikin Ashi + EMA20 + MACD. It uses the exact same entry logic as the companion "FCPO 5min Signal System v2" indicator, converted to the Strategy Tester to validate signal quality.
Entry Conditions (all 5 layers must align) :
- Layer 1 — Trend filter: price above EMA20 = long only; below EMA20 = short only
- Layer 2 — Momentum: MACD histogram direction (5,20,5)
- Layer 3 — Extreme signal: KDJ J value < 20 (oversold) or > 80 (overbought)
- Layer 4 — Candle confirmation: Heikin Ashi direction matches raw candle close direction
- Layer 5 — Final filter: Tower (Baota) line flips red (bullish) / green (bearish)
- Entries only when flat; each signal fires once, on the first bar all conditions align
Exit Rules (intraday discipline) :
- Fixed stop-loss / take-profit: 8 points each by default (1 lot = RM25 per point, i.e. RM200 / RM200)
- Max holding time: 60 bars by default (can be disabled)
- End-of-day liquidation at 17:45 — no overnight positions
- No new entries after 17:15 (MYT)
Backtest Settings : commission RM12.5/lot and 1-tick slippage included; initial capital 10,000, fixed 1 lot.
How to Use : Open FCPO1! (or BMD:FCPO1!) on a 5-minute chart — keep regular candlesticks (do NOT enable Heikin Ashi candles, as fill prices would be distorted) — add the strategy, then open the Strategy Tester. All parameters (EMA / KDJ / MACD / stop-take points / time windows) are adjustable in the settings panel.
Disclaimer: This script is a technical-analysis tool for validation only. Backtest results do not guarantee future performance, and this is not financial advice. Futures trading involves high risk; always use proper risk management and stop-loss discipline.
FCPO 5分钟 策略回测 v1 —— 基于 KDJ + 宝塔线 + Heikin Ashi + EMA20 + MACD 五层共振入场系统的 FCPO(马来西亚棕榈油期货,BMD:FCPO1!)日内交易策略,与「FCPO 系统警报 v2」指标使用同一套入场逻辑,用于在策略回测器中验证信号质量。
入场条件(五层全部满足才开仓) :
- 第1层 大方向:价格在 EMA20 上方只做多,下方只做空
- 第2层 动量背景:MACD 柱状线方向(5,20,5)
- 第3层 极端信号:KDJ J 值 < 20(KDJL)或 > 80(KDJH)
- 第4层 K线确认:Heikin Ashi 同向 + 普通K线收盘同向
- 第5层 最终过滤:宝塔线翻红 / 翻绿
- 只在空仓时进场,信号首次满足时只触发一次
出场规则(按日内交易纪律) :
- 固定止损 / 止盈:默认各 8 点(1手合约每点 = RM25,即 RM200 / RM200)
- 最长持仓超时:默认 60 根K线(可关闭)
- 日内强平:17:45 触发清仓,不留隔夜仓
- 17:15 后不开新仓
回测设置 :已含手续费(RM12.5/手)与滑点(1 tick);初始资金 10,000,固定 1 手。
使用方法 :FCPO1!(或 BMD:FCPO1!)5 分钟图 → 保持普通K线蜡烛模式(不要开 Heikin Ashi 蜡烛,否则成交价失真)→ 添加策略 → 打开策略回测器查看结果。EMA / KDJ / MACD / 止损止盈点数 / 时间窗口等参数均可在设置面板调整。
提醒:本策略仅为技术分析验证工具,回测结果不代表未来表现,不构成任何投资建议。期货交易风险高,请务必配合资金管理与止损纪律。 استراتيجية

SHM - RSI Momentum MatrixSHM - RSI Momentum Matrix (Pine Script v6)
Executive Overview
The SHM - RSI Momentum Matrix is a quantitative, sub-pane momentum filter engineered for high-probability trend-following strategies. Acting as the dedicated momentum gate for the Sovereign Horizon Matrix (SHM) v8.0 ecosystem, this indicator isolates high-velocity structural breaks while strictly filtering out late, momentum-exhausted entries.
Rather than using standard, single-timeframe momentum oscillators that chop during consolidation, the Matrix utilizes a Timeframe-Locked RSI Engine paired with dual Weighted Moving Averages (WMAs) and a macro structural trend filter.
Core Architectural Pillars: How It Works
1. Timeframe-Locked RSI Momentum Engine
* Non-Repainting Security Calculations: Uses request.security() with offset closed bars (rsi_raw ) to eliminate repainting.
* Higher-Timeframe Alignment: By default, the RSI calculation is locked to a 24-hour (1440) rolling evaluation window regardless of the chart timeframe you are viewing.
* Narrow Velocity Gates & Exhaustion Caps:
* Long Entry Gate (42.0 – 48.0 RSI): Captures bullish acceleration before price becomes overbought. If RSI exceeds 48.0, the system flags the move as overextended and blocks the signal.
* Short Entry Gate (46.0 – 52.0 RSI): Captures bearish distribution before price reaches oversold levels.
2. Dual WMA Structural Framework
* Fast Institutional WMA (63): Tracks immediate directional momentum shifts.
* Macro Baseline WMA (480): Acts as the primary macro structural trend floor/ceiling.
* Sensitivity Filter (41 SMA): Ensures price is trading on the correct side of short-term structure before validating a setup.
3. Macro Tide Filter
Requires price action to align with the macro 480 WMA trend direction (Price > 480 WMA for Longs; Price < 480 WMA for Shorts), ensuring you never trade against primary market tide.
4. Experimental Baseline Price Action Module
Offers customizable baseline geometry execution mode:
* Candle Body Trigger: Requires a confirmed candle Close cross over the 63 or 480 WMAs.
* Candle Wick Trigger: Captures intraday High/Low wick breaches across WMA lines for faster sensitivity.
Joint Visual Connection with SHM 8.0
When paired with the main SHM 8.0 Overlay Strategy, this indicator pane serves as the visual "truth engine" that explains why a trade signal is allowed or rejected on the main price chart.
+-------------------------------------------------------------------------+
| MAIN CHART (SHM 8.0 Strategy Overlay) |
| - Price crosses 63/480 WMA baseline |
| - Displays BUY/SELL strategy execution labels |
+-------------------------------------------------------------------------+
|
v (Synchronized Confirmation)
+-------------------------------------------------------------------------+
| SUB-PANE (SHM - RSI Momentum Matrix) |
| - RSI Wave enters shaded Velocity Zone (Teal = Long / Red = Short) |
| - Prints matching BUY/SELL label directly on the Locked RSI Line |
+-------------------------------------------------------------------------+
1. Synchronized Signal Labels: When a valid entry condition triggers on the main chart, an identical BUY or SELL label prints at the exact same candle inside the RSI Momentum Matrix sub-pane.
2. Shaded Entry Threshold Zones:
* Teal Zone: Visualizes the 42.0 – 48.0 Long momentum window.
* Red Zone: Visualizes the 46.0 – 52.0 Short momentum window.
Note- Make sure that both scripts have the same numbers to receive proper signal.
3. Instant Rejection Audit: If you see a WMA line cross on the main price chart without a corresponding BUY/SELL label in the RSI sub-pane, the sub-pane visually demonstrates that RSI was outside the shaded velocity zone—protecting capital from false breakouts.
Key Parameter Settings Guide
Input Group Parameter Recommended Default Description
1. Core Framework Fast WMA / Slow WMA 63 / 480 Structural trend baselines.
Structural Sensitivity 41 Short-term trend confirmation filter.
2. Macro Tide Enable Macro Tide True Forces alignment with the 480 WMA trend.
3. RSI Matrix Locked Timeframe 1440 (Daily) Locks RSI to HTF calculation.
Lookback Period 33 RSI calculation length.
Long Min / Max 42.0 / 48.0 Bullish momentum velocity window.
Short Max / Min 52.0 / 46.0 Bearish momentum velocity window.
Best Practices for Trading
* Timeframe Flexibility: Best utilized on Daily (24h) or 4H charts for crypto, index futures (SPY/NQ), and FX macro trend trading.
* Bar Close Confirmation: Always wait for the active candle to close to ensure full RSI higher-timeframe data synchronization.
مؤشر

Trend EMA (MTF) + 4H 200 EMAfWHAT THIS DOES
Plots a higher-timeframe trend EMA on any chart (default: 60-period EMA of daily closes), colored by its slope: green while rising, red while falling. A second reference line plots the 200 EMA computed on 4-hour bars regardless of your chart timeframe. Floating chips at the end of each line identify them at a glance ("Daily trend EMA" / "4H 200 EMA"), with the trend chip showing a live direction arrow.
KEY FEATURES
- Trend EMA timeframe is selectable: Hourly, 4-Hour, or Daily (length configurable, default 60)
- Slope coloring: the line turns green when rising and red when falling, so trend state is readable without any oscillator
- Hover-to-peek bar coloring: hover over or select the indicator and the price bars instantly color green/red based on whether price is above or below the trend EMA. Click empty chart space and the coloring disappears. No settings required.
- Permanent bar coloring: if you prefer always-on painting, enable it in the Style tab ("Price bar coloring (permanent)")
- Session pinning: EMAs are computed on a fixed data session (Extended 24H by default), so the 4H 200 EMA shows the SAME value whether you view it from a 15-minute, 4-hour, or 3-day chart
- Smart labels: the two chips automatically split apart vertically when the lines converge, so they never overlap
HOW IT WORKS
- The higher-timeframe EMA is requested with gaps enabled, so it prints once per HTF bar and draws as a smooth connected line on intraday charts instead of a stair-step
- Slope state is persisted across the in-between bars, driving the line color, the label color, and the direction arrow
- The data session is pinned via ticker.modify(). Extended-hours data only exists on intraday charts, so an intraday EMA inherited from chart data changes value when you switch to daily+ timeframes. Pinning the session removes that inconsistency, which is a subtle but real problem with most MTF EMA scripts.
- The peek feature works by plotting exact candle copies behind the main price bars, colored by position vs the EMA. TradingView raises a hovered or selected indicator above the main series, which reveals them; deselecting drops them behind the bars again.
HOW TO USE IT
- Trend filter: take longs while the trend EMA is green and price holds above it, shorts while red and below. The bar-peek gives an instant read on how price has interacted with the EMA historically.
- Pullback reference: on intraday charts, the daily trend EMA often acts as a dynamic pullback zone within trends.
- The 4H 200 EMA is a slower structural reference; confluence of the two lines tends to mark meaningful support/resistance zones.
SETTINGS
- Trend EMA: timeframe, length, width, rising/falling colors
- Bar coloring: above/below colors (used by both peek and permanent modes)
- 4H 200 EMA: show/hide, color, width
- Labels: show/hide, offset from last bar
- Data: session used for intraday EMAs (Extended 24H / Regular hours / Chart)
NOTES
- Designed for chart timeframes at or below the selected EMA timeframe. On higher timeframes the intraday EMAs are sampled once per chart bar (coarser but consistent thanks to session pinning).
- The peek feature relies on solid candle/bar styles. With hollow candles, disable the "Bars above/below EMA" plots in the Style tab.
- If bars appear permanently colored after adding the indicator, right-click it and choose Visual order > Send to back.
This is a technical analysis tool for educational purposes, not financial advice. مؤشر

TF: Efficiency & Absorption Index (EAI)TradingFlow: Efficiency & Absorption Index (EAI)
EAI studies the relationship between market participation and price progress. It helps answer two connected questions:
1. Is trading activity moving price efficiently in one direction?
2. Is participation high while price makes limited progress near an important area?
The first condition can support continuation. The second may indicate absorption: buying or selling is active, but opposing interest is preventing price from advancing easily.
What “Efficiency” Means
Efficiency measures close-to-close price progress relative to participation, with price movement adjusted for the instrument’s normal volatility. In practical terms, it asks how much directional progress the market produced for the amount of activity involved.
Strong positive efficiency means price is advancing upward effectively. Strong negative efficiency means price is advancing downward effectively. Low efficiency means participation is producing relatively little net movement; this alone does not imply a reversal.
How to Read the Main Plot
• Cyan columns above zero: upward price efficiency.
• Pink columns below zero: downward price efficiency.
• Taller columns: greater directional progress relative to participation.
• Orange line: a smoothed view of efficiency, useful for seeing the broader change rather than every bar-to-bar fluctuation.
The teal upper line and red lower line are adaptive boundaries based on recent readings. A column extending beyond a boundary means movement in that direction is unusually efficient compared with the recent market. It can confirm directional expansion, but it is not an automatic entry signal.
Potential Absorption
EAI also looks for bars where participation is unusually high but close-to-close progress is limited. To reduce noise, potential bullish or bearish absorption additionally requires a meaningful bar range, a prior directional approach, a test near a recent range edge, and a recovery away from that edge.
• Green: price approached a recent lower area, tested it, and recovered from the low. This indicates potential bullish absorption.
• Red: price approached a recent upper area, tested it, and pulled back from the high. This indicates potential bearish absorption.
The colored column and matching background show the same potential absorption state. Matching triangles make these locations easier to find on the chart. Because absorption can develop before price visibly turns, a triangle can sometimes serve as an early hint of a potential reversal.
This is an early warning, not reversal confirmation. Look for subsequent price movement away from the tested area before acting.
High-Participation, Limited-Progress Events
A light gray band means participation was high, but the close made limited net progress from the previous close. The bar can still have a wide intrabar range.
This is context only. It does not predict direction or imply that the next bar will move sharply. It may occur during consolidation, a reversal attempt, or a pause within a clean trend. Its meaning comes from the price response that follows.
Practical Reading Process
1. Read the columns and orange line to identify direction and whether efficiency is strengthening or fading.
2. Use the adaptive boundaries to recognize unusually efficient expansion.
3. Give potential absorption more weight near support, resistance, range edges, or failed breakouts.
4. Wait for subsequent price confirmation rather than trading a marker by itself.
The optional dashboard summarizes the current state, relative volume, close-to-close progress in ATR units, and location within the recent range.
Important
EAI uses chart OHLCV data. It cannot see the order book, aggressor-side trades, or institutional positions. The markers indicate potential absorption based on filtered conditions; they do not prove actual order-flow absorption. Results are less meaningful on symbols without reliable traded volume.
---
TradingFlow: Efficiency & Absorption Index (EAI)
EAI 研究市場參與程度與價格淨進展之間的關係,主要協助交易者回答兩個相互關聯的問題:
1. 當前的成交活動,是否正在有效推動價格向某個方向前進?
2. 市場參與度很高,但價格在重要位置是否仍然只能取得有限進展?
第一種情況可用於判斷走勢是否具備延續動力;第二種情況則可能反映吸收現象:買盤或賣盤相當活躍,但對手方力量令價格難以繼續推進。
这里的「效率」是什么?
效率衡量的是:相對於市場參與程度,價格從前一收盤價到當前收盤價走出了多少淨距離;價格變化同時會按標的本身的正常波動幅度調整。簡單來說,就是觀察市場付出了多少成交活動,最終換來了多少方向性進展。
正值較強,表示價格正在有效向上推進;負值較強,表示價格正在有效向下推進。效率偏低只代表成交活動帶來的淨進展較少,本身並不等於即將反轉。
如何阅读主要图形
• 零軸上方的青色柱: 向上價格效率。
• 零軸下方的粉紅色柱: 向下價格效率。
• 柱體越高: 相對於市場參與程度,方向性淨進展越大。
• 橙色線: 效率的平滑走勢,用來觀察整體變化,減少單根 K 線波動造成的干擾。
青綠色上邊界與紅色下邊界會根據近期讀數自動調整。柱體超越邊界,表示該方向的價格推進效率相對於近期市場異常強,可用於確認方向性擴張,但不是自動進場訊號。
潛在吸收
EAI 也會尋找市場參與度異常高,但收盤價淨進展有限的 K 線。為減少雜訊,潛在多頭或空頭吸收還需要同時具備足夠的 K 線波幅、此前的方向性靠近、對近期區間邊緣的測試,以及價格從該邊緣收回。
• 綠色: 價格先靠近並測試近期低位,之後從低位回升,表示潛在多頭吸收。
• 紅色: 價格先靠近並測試近期高位,之後從高位回落,表示潛在空頭吸收。
彩色柱與同色背景表達同一個潛在吸收狀態;同色三角形可協助在圖表中找到這些位置。由於吸收現象可能早於價格明顯轉向,三角形有時也可視為潛在反轉的早期提示。
這只是早期預警,並不代表反轉已經確認。實際操作前,應觀察價格之後是否進一步離開測試區域。
高參與、有限進展事件
淺灰色事件帶表示市場參與度高,但當前收盤價相對前一收盤價的淨進展有限;該根 K 線的盤中高低波幅仍可能很大。
這項顯示只提供背景資訊,不預測方向,也不表示下一根 K 線必然大幅波動。它可能發生在盤整、轉折嘗試,或乾淨趨勢中的短暫停頓。其意義應由之後的價格反應判斷。
實用判讀流程
1. 用柱狀圖與橙色線判斷方向,以及效率正在增強還是減弱。
2. 用自適應邊界辨認異常有效的方向性擴張。
3. 潛在吸收若出現在支撐、阻力、區間邊緣或假突破附近,通常更值得留意。
4. 等待後續價格確認,不要只憑單一標記交易。
選用的資訊面板會摘要目前狀態、相對成交量、以 ATR 計算的收盤價淨進展,以及價格在近期區間內的位置。
重要說明
EAI 使用圖表上的 OHLCV 資料,無法看到訂單簿、主動買賣方向或機構持倉。這些標記只表示經過條件過濾後的潛在吸收,並非真實訂單流吸收的直接證明。缺乏可靠實際成交量的標的,結果會較缺乏意義。
---
TradingFlow: Efficiency & Absorption Index (EAI)
EAIは、市場参加の大きさと価格の進み方との関係を分析し、次の2つの問いに答えるための指標です。
1. 現在の取引活動は、価格を一方向へ効率よく動かしているか?
2. 市場参加が活発であるにもかかわらず、重要な価格帯で値動きが伸び悩んでいないか?
前者はトレンド継続の判断材料になります。後者は、買いや売りが活発でも反対側の注文に受け止められ、価格が進みにくくなる「吸収」の可能性を示します。
ここでいう「効率」とは
効率は、市場参加の大きさに対して、終値が前の足の終値からどれだけ動いたかを測ります。値動きは銘柄本来のボラティリティに合わせて調整されるため、取引活動の大きさに対して、どれだけ明確な方向性が生まれたかを確認できます。
強いプラス値は、価格が上方向へ効率よく進んでいる状態です。強いマイナス値は、下方向へ効率よく進んでいる状態です。効率が低いことは、活発な取引の割に価格の純変化が小さいことを意味しますが、それだけで反転を示すものではありません。
メイン表示の見方
• ゼロラインより上のシアンの柱: 上方向の価格効率。
• ゼロラインより下のピンクの柱: 下方向の価格効率。
• 柱が高いほど: 市場参加に対する方向性のある価格変化が大きい状態。
• オレンジのライン: 効率を平滑化したもので、各足の細かな変動を抑えながら全体の変化を確認できます。
上側のティールラインと下側の赤いラインは、直近の値に応じて変化する適応型の境界線です。柱が境界線を超えると、その方向への価格推移が最近と比べて特に効率的であることを示します。方向性のある拡大を確認する材料にはなりますが、それ自体がエントリーシグナルではありません。
潜在的な吸収
EAIは、市場参加が通常より活発である一方、終値ベースの価格変化が限られている足も検出します。ノイズを抑えるため、潜在的な強気または弱気の吸収には、十分な値幅、直前までの方向性、直近レンジ端のテスト、そしてその水準から押し戻された動きも必要です。
• 緑: 価格が直近の安値圏へ接近して試した後、安値から持ち直した状態。強気の吸収が起きている可能性を示します。
• 赤: 価格が直近の高値圏へ接近して試した後、高値から押し戻された状態。弱気の吸収が起きている可能性を示します。
色付きの柱と同色の背景は、同じ潜在的な吸収状態を表します。同色の三角形は、チャート上でその位置を見つけやすくするための補助マーカーです。吸収は価格が明確に転換する前から進むことがあるため、三角形が反転の可能性を早期に示す場合もあります。
ただし、これは早期の注意喚起であり、反転の確定を意味しません。判断する際は、その後に価格がテストした水準から離れていく動きを確認してください。
高い市場参加・限定的な価格進展
薄いグレーの帯は、市場参加が活発だった一方、現在の終値が前の足の終値からあまり進まなかったことを示します。ただし、その足の高値と安値の値幅が小さいとは限りません。
これは相場状況を把握するための補助情報であり、方向を予測するものでも、次の足で大きく動くことを示すものでもありません。持ち合い、反転の試み、または明確なトレンド途中の一時的な停滞でも発生します。意味を判断するには、その後の値動きを確認してください。
実践的な読み方
1. 柱とオレンジのラインから方向を読み、効率が強まっているか弱まっているかを確認します。
2. 適応型の境界線を使い、通常より効率的な方向性の拡大を見つけます。
3. サポート、レジスタンス、レンジ端、またはダマシのブレイク付近に現れる潜在的な吸収を重視します。
4. マーカーだけで判断せず、その後の値動きによる確認を待ちます。
オプションのダッシュボードでは、現在の状態、相対出来高、ATR単位で表した終値間の価格変化、直近レンジ内での位置を確認できます。
重要事項
EAIはチャート上のOHLCVデータを使用します。板情報、買い手・売り手のどちらが主導した約定か、機関投資家のポジションを直接確認することはできません。マーカーは複数の条件から潜在的な吸収を示すものであり、実際の注文フローにおける吸収を証明するものではありません。信頼できる実出来高が提供されていない銘柄では、指標の有効性が低下します。
مؤشر

Breaking Ray [vganesh]Breaking Ray — Anchor a Level, Watch It Break
## Overview
Breaking Ray anchors a horizontal ray to a single candle you click on — its top, bottom, or both. The ray extends forward indefinitely, exactly like TradingView's built-in Ray drawing tool, until price actually breaks it. At that moment it freezes into a fixed line segment running from the anchor candle to the candle that broke it, so your chart keeps a permanent, uncluttered record of exactly when and where a level gave way.
It works the same way the built-in Anchored VWAP does: add the indicator, click the candle you want to anchor to, and you're done. Want to track several candles at once? Add another instance of the indicator for each one — every instance is independent.
## How It Works
- **Anchoring**: click any candle (or reposition later via the target icon in Settings) to set the ray's origin. You choose whether it originates from that candle's high, low, or both.
- **Breaking**: each bar, the script checks whether price has broken the level (wick or close, your choice). The instant it does, the ray stops extending and locks into a plain line segment — a visual record of exactly how long that level held.
- **Multi-timeframe aware**: set "Anchor Candle's Timeframe" to the timeframe you clicked on (e.g. "D" for a Daily candle), and the ray will show the correct level and starting point no matter what timeframe you switch the chart to afterward.
## Key Features
- Click-to-anchor UX — no manual price/time entry required
- Draw from the candle's Top, Bottom, or Both
- Break detection by wick touch or candle close
- Optional halo line and a price label (Left / Center / Right anchored) so the ray stays legible even on busy, lower-timeframe charts
- Broken rays can be kept as a permanent segment or discarded entirely
- Built-in alerts, including a dynamic message with the ticker, which side broke, and the exact price
- On-chart diagnostics (an optional debug label) if a ray isn't behaving as expected
## How To Use
1. Add the indicator to your chart.
2. Click the candle you want to anchor to when prompted.
3. If you plan to view the ray on a timeframe other than the one you clicked on, set "Anchor Candle's Timeframe" to match (e.g. "D", "4H").
4. Choose Top, Bottom, or Both under "Draw Ray From".
5. Adjust style, break sensitivity, and label settings to taste.
6. Repeat with a new indicator instance for each additional candle you want to track.
## Alerts
Create an alert on this indicator with the condition **"Any alert() function call"** and set the alert's Message field to `{{alert_message}}` to receive the dynamic message: `{{ticker}} Top ray broken at ` (or Bottom). A generic "Ray Broken" condition is also available for a simple yes/no trigger.
## Notes
- One indicator instance tracks one anchor candle by design — this keeps each ray independently configurable (its own color, break rule, timeframe, etc.).
- The ray's exact starting bar is timeframe-dependent: it points to the specific candle where the high/low actually printed, so the same anchor can look slightly different in position (never in price) depending on what timeframe you're viewing.
## Disclaimer
This script is provided for informational and educational purposes only. It does not constitute financial advice, and past levels holding or breaking are not indicative of future price behavior. Always do your own research and manage risk appropriately.
مؤشر

ICT MacrosThe ICT macro windows as first-class chart objects: each window bracketed by
a vertical line at its start and one at its end, the pair joined by a
captioned rectangle on a strip at the chart's edge. The caption carries the
window's name with a countdown under it -- to the open while the window is
ahead, of what is left once inside. Split out of Time-Based Vertical Lines
the way the NinjaTrader pair is: that tool keeps the plain time lines, this
one owns the windows, and the two share a chart without double-booking an
edge -- the band strip defaults to the bottom and the line captions to the
top.
The slots are the full standard macro map, in New York time. The rule is
:50 to :10 around every top of the hour -- twenty minutes straddling it --
except the final trading hour, which replaces its window with the Final
Hour (15:15 - 15:45) and Market On Close (15:45 - 16:00) specials; the
settlement portion (15:50 - 16:00) rides inside MOC as its own optional
slot. That gives one row per window from the 18:50 Asia macro around the
clock to the close, grouped by the session each falls in. The playbook
trades the six regular-hours windows plus the Final Hour and MOC, so
exactly that set starts enabled; every other session's windows are carried
but off. The 08:30 news release and the opening ranges are separate
events, not macros -- the 08:30 line lives in Time-Based Vertical Lines.
Features:
- 24 macro slots, one row each: on/off, start and end as HH:MM, label
- Empty label captions the band with the window's times; the Final Hour,
MOC and Settlement windows come pre-labeled
- Countdown on its own line under the window's name
- A window may cross midnight (23:50 - 00:10 does); it stays keyed to the
day it starts on
- Bands and captions ride a strip at the bottom (or top) edge, set clear
of the bars by an adjustable gap
- Bracket lines can switch off, leaving only the bands on the strip
- Every window drawn for the whole day, future ones included
- Time zone support and historical-days control
Notes:
- Times are read as HH:MM in the selected zone. An entry that is not a
valid time is skipped, with a note in the Pine Logs pane; an end at or
before the start means the window runs into the next day.
- The strip hangs off the visible bars, not the panel edge: a script only
knows prices, never pixels, so it makes room by having the chart's
auto-scale give up range under (or over) the candles. Pine has no way to
read the viewport's own bounds, so the strip cannot be pinned to the
panel edge the way a platform-native tool could pin it.
- A window later today sits past the last bar. TradingView draws at most
500 bars past the last one, and the chart only reveals as much of that
as the right margin allows (Chart settings > Appearance).
مؤشر

52 Week Quarterly Previous Day High Low Mid52-Week High/Low, Quarterly High/Low (13-Week) & Previous Day High / Low / Mid
**A clean, all-in-one context indicator combining intraday reference levels and long-term high/low structure — built for traders who want key levels without cluttering the chart.**
---
🔹 What It Plots
1. Previous Day High / Low / Mid
Draws live, auto-updating horizontal lines at the prior trading day's high, low, and midpoint. These lines extend in real time as the current session develops, giving you an instant read on where price stands relative to yesterday's range — a level watched closely by intraday and swing traders alike for breakout, reversal, and mean-reversion setups.
2. 52-Week High / Low
Calculated from weekly data, this plots the true 52-week high and low (1-year lookback) — a level closely followed for breakout confirmation, momentum screens, and macro trend context. Choose whether the calculation uses candle highs/lows or closing prices to match your preferred definition of "range."
3. Quarterly High / Low (13-Week)
The same logic applied to a 13-week (one quarter) lookback, useful for spotting intermediate-term range breaks and consolidation zones that longer 52-week levels can miss.
4. Smart Merged Labels
Instead of stacking overlapping "YH," "QH," "YL," "QL" tags on top of each other when the yearly and quarterly levels converge, the indicator automatically merges them into a single clean "YH/QH" or "YL/QL" label — keeping your chart readable even when the two timeframes align.
---
🔹 Why Use It
Most traders juggle several separate indicators to track daily levels and long-term range context. This script consolidates all three into one lightweight overlay:
- ✅ Spot intraday breakouts against yesterday's range
- ✅ Identify major support/resistance from Yearly High/Low (52-week) and Quarterly High/Low (13-week) extremes
- ✅ Keep the chart clean with automatic label merging and full visibility toggles
---
🔹 Customization
Every component can be shown, hidden, or recolored independently:
- Toggle previous day High/Low/Mid colors
- Toggle Yearly and Quarterly High/Low visibility
- Choose High/Low vs. Close basis for the range calculations
---
🔹 How to Use It
- Intraday traders: Watch for reactions and breakouts at the previous day's high/low/mid, especially during the first hour of the session.
- Swing traders/Position/breakout traders: Treat the 52-week and 13-week highs/lows as major structural levels; a decisive close beyond them often signals a shift in the dominant range.
---
*As with any tool, this indicator is designed to provide context, not standalone signals. Combine it with your own risk management and trade plan.* مؤشر

Precedent [ThrowMaster]===============================================================
WHAT IT IS
===============================================================
Precedent does not predict. It measures.
Every time a defined market event confirms on your chart, Precedent
records what price actually did over the following N bars. Once enough
comparable records have accumulated, it displays the empirical
distribution of those recorded outcomes: how far price travelled, how
often it reached a given distance, and how many bars that took.
The question it answers is narrow and deliberately so:
"On this symbol, on this timeframe, when this kind of event happened
at this kind of price level in this kind of market condition, what
followed afterwards, and across how many cases?"
Every number shown is measured from the visible history of the chart you
are looking at. Nothing is imported from another market, no outcome
percentages are hard-coded, and no distribution shape is assumed. If the
chart has not yet produced enough comparable cases, the indicator stays
silent and tells you how many it has.
This is a context tool. It produces no buy or sell signals, no entry
prices, and no stop levels, and it is not designed to be used as one.
Please read the section titled THE MOST IMPORTANT WARNING before using
it on a live chart.
===============================================================
HOW IT WORKS
===============================================================
1. LEVEL MAP
A running inventory of prices that carry structural meaning is
maintained bar by bar:
- Swing pivots confirmed with a symmetrical left/right lookback
(default 21 bars each side for external structure, 5 for internal).
- Equal highs and equal lows: when a new pivot lands within the merge
tolerance of an existing level, that level's touch count increases
rather than a second level being created.
- Unfilled fair value gaps: a three-bar imbalance where the current
bar's low is above the high from two bars ago (or the mirror for
the bearish case). Each additional gap overlapping the same price
adds to that level's weight, so three gaps stacked at one price
are recorded as one level carrying three factors.
- Order blocks: the extreme of the last opposite-coloured candle
immediately before a displacement bar, where displacement means a
body in the top 15 percent of the last 100 bodies AND the move
takes out the most recent internal pivot. Displacement alone is not
enough; it must be tied to a structural break.
- Previous day and previous week high and low, requested with a
one-bar offset so no unclosed higher-timeframe data is used.
Each level accumulates a WEIGHT equal to the number of independent
factors coinciding there, plus a bonus for repeated touches and for age
beyond 200 bars. Two factors closer together than the merge tolerance
(default 0.25 x ATR) are treated as one level with two factors, never as
two levels. This prevents an order block that naturally sits inside a
fair value gap from being counted twice.
A level whose weight reaches the MAJOR threshold (default 4) is
classified MAJOR; weight 1 to 3 is MINOR; anything else is NONE.
Note on interpretation: a heavily touched level is treated as more
SIGNIFICANT, not as stronger. Repeatedly tested highs and lows are
exactly the prices that attract sweeps. The indicator does not assume
which way that resolves; it measures what actually followed.
2. EVENT CLASSES
Six event types are detected. Every one of them locks its state at bar
close.
SWP Sweep Price trades beyond a mapped level and closes back
inside it, with a wick in the top quartile of the
last 100 wicks on that side.
SHF Shift A close beyond the most recent confirmed external
swing, in either direction (break of structure or
change of character).
SQZ Squeeze Bollinger Bands (20, 2.0) contract entirely inside
Keltner Channels (20, 1.5 x ATR) for at least five
consecutive bars, then expand back out.
CLX Climax Volume in the top 5 percent of the last 200 bars
combined with a bar range in the top 10 percent.
Where volume is unavailable, range plus body size is
used instead and the dashboard states which.
REJ Reject A bullish or bearish engulfing bar, or a pin bar with
a wick in the top quartile of the last 100, but only
when it occurs at a mapped level. A rejection candle
floating in empty space is not recorded at all.
DIV Divergence Price makes a lower low while cumulative flow makes a
higher low, or the mirror case, measured at confirmed
pivots. Flow is signed by body position within the
bar range and scaled by volume where volume exists.
Divergence is measured against volume-weighted flow, not against an
oscillator. An oscillator derived from price and then compared back to
price adds no independent information; volume is a separate data source.
Two events of the same class are never recorded closer together than the
full horizon. This is a deliberate statistical constraint: it costs
sample size, and it buys the guarantee that no two stored outcomes share
an overlapping future.
3. CONTEXT SCORE
Three voices contribute to an additive score from 0 to 100. Nothing
gates. No voice can block a signal; each only adds weight.
STRUCTURE 35 Whether the recent sequence of confirmed swing highs
and lows agrees with the event's direction.
FLOW 30 The percentile rank of the bar's signed flow over the
last 200 bars, cut to one fifth when its sign
disagrees with the event direction.
HTF 35 Whether the higher timeframe close sits above or below
its own 50-period EMA, in agreement with the event.
The score is then discounted by regime and renormalised back to a 0-100
scale, so scores remain comparable across regimes:
RANGE structure x 0.70 (structure breaks constantly and means
little inside a range)
TRANSITION higher tf x 0.80 (higher timeframe bias is least
reliable while it is turning)
TREND flow x 0.85 (large volume is ordinary in a trend
and therefore less informative)
One correction is applied automatically: Climax and Divergence are
themselves defined from flow, so for those two classes the flow weight
is halved and the freed weight is split evenly between structure and
higher timeframe. Without this, the flow voice would confirm an event
that flow itself created.
The score is converted into a two-level tier by comparing it to the 60th
percentile of past scores for the same event class on this chart. There
is no fixed cut-off number.
4. SIGNATURE AND BACKOFF
Each recorded event is filed under a discrete key:
event class x location class x regime x direction x score tier
Direction is never merged at any level, because upward and downward
outcomes are not symmetrical.
When a new event confirms, the engine looks for stored outcomes sharing
that key. If fewer than the minimum sample (default 20) exist, it drops
the finest component and looks again:
L3 event + location + regime + direction + tier
L2 event + location + regime + direction
L1 event + regime + direction
L0 event + direction
The first level with a sufficient sample is used, and the dashboard
always states which level was used and how many records it contained.
If even L0 is short, nothing is drawn and the dashboard shows
CALIBRATING with the current count.
Seeing L1 or L0 rather than L3 is normal, not a fault. Non-overlapping
sampling produces a limited number of independent cases per chart, and
the backoff exists precisely to handle that honestly rather than
displaying a percentage built on four observations.
5. OUTCOME STORE
For each recorded event the engine tracks, for the following H bars
(default 24):
- excursion at H/4, H/2, 3H/4 and H, expressed in R where R is the
ATR(14) value at the event bar
- maximum favourable and maximum adverse excursion
- the bar number at which the move first reached +1R, +2R and +3R,
or zero if it never did
The record is written to the store only after H bars have fully elapsed.
A projection displayed today is therefore built exclusively from events
that had already finished before it was issued. This is a structural
property of the design, not a discipline that has to be maintained.
6. WHAT IS DRAWN
- An empirical quantile fan. The outer envelope traces the 5th and
95th percentiles of the matched outcomes at each of the four
checkpoints; the inner envelope traces the 25th and 75th; the
dashed centre line traces the 50th. The shape is asymmetric and
heavy-tailed whenever the underlying data is, because the values
are measured percentiles rather than a fitted curve.
- A target line. The median maximum favourable excursion of the
matched set is converted to a price, then snapped to a mapped
structural level if one lies within half an ATR. Statistics choose
the zone; structure chooses the exact price. The label states
"level" when a snap occurred and "stat" when it did not.
- Hit rate and expected bars. Both are read at the nearest whole R
ring (+1R, +2R or +3R) to the target distance, and the ring is
named on the label. Hit rate is the share of matched records that
reached that ring within H bars. The bar count is the median
first-passage time among those records that reached it.
7. RUN TRACKER
A run begins at a confirmed structure shift and ends at the next
confirmed shift in the opposite direction. Within a run, occurrences of
each event class and direction are counted. When the run closes, one
record per class is stored: how many had occurred before the reversal.
The observation unit is therefore the run, not the event. This matters:
counting events directly would produce heavily overlapping samples,
since several events inside one run share the same future. Counting runs
does not.
The panel answers a question most tools ignore entirely: given that a
third bearish divergence has now printed in this uptrend, in what
fraction of past runs on this chart did the reversal arrive by the
third, and in what fraction did the run extend to a fourth or beyond.
8. SELF-AUDIT
Every displayed projection resolves into exactly one of four states, and
these are never merged:
HIT the target was reached first
ADV the -1R reference was reached first
AMB both were touched inside the same bar, so the order is
unknowable from bar data and the case is discarded rather
than claimed
EXP H bars elapsed with neither touched
The dashboard reports the running counts, and separately compares the
average hit rate the tool projected against the hit rate it actually
realised. If those two numbers diverge, the tool is telling you its own
estimates are miscalibrated on this chart.
Two further panels report whether the classification axes carry any
information at all: median outcome for tier A versus tier B, and median
outcome for MAJOR versus MINOR versus NONE locations. If a pair does not
separate, that axis is not contributing, and you are meant to see that.
===============================================================
WHAT MAKES IT ORIGINAL
===============================================================
- Outcome statistics are conditioned on a discrete event signature
and computed from the chart's own history, rather than assumed from
a parametric distribution or imported as fixed percentages.
- Projection targets are snapped onto mapped structural levels, so
the displayed price is a real level rather than a quantile value
floating in empty space.
- The hierarchical backoff makes sparse conditioning explicit: the
display always names the level of specificity that was achievable
and the sample size behind it.
- Sequence statistics use the completed run as the observation unit,
which removes the sample overlap that direct event counting creates.
- The indicator scores its own past projections against outcomes and
displays projected versus realised hit rate on the chart.
===============================================================
HOW TO READ THE CHART
===============================================================
HORIZONTAL LINES
The image below shows the level map alone, with the projection layer
switched off, so the two grades of level can be compared directly: gold
solid lines mark MAJOR levels, thin dotted lines mark MINOR ones.
Two families of horizontal line exist, and they are drawn so that they
can never be confused with each other.
THE LEVEL MAP owns thin dotted lines and gold:
Gold, solid, width 2 A MAJOR level: four or more independent
structural factors coincide at this price.
Washed white, DOTTED, A MINOR level: one to three factors.
width 1
THE TARGET FAMILY owns solid width-2 lines in mint, coral and slate.
No target line is ever drawn dotted or at width 1.
Mint, solid, width 2, The target of the live projection.
full opacity Extends to the right. Only one is live at
a time.
Coral, dotted, width 1 The -1R adverse reference of the live
projection. Removed the moment the
projection resolves. This is a measurement
boundary used to classify the outcome. It
is NOT a stop loss and must not be used as
one.
Once a projection resolves, its target line keeps its full width and
stays solid. Only its colour and opacity change:
Mint, faded HIT: price reached it within the horizon.
Coral, faded ADV: price reached the -1R reference
first.
Slate blue-grey, faded EXP or AMB: the horizon elapsed with
neither touched, or both were touched in
the same bar and the case was discarded.
Resolved lines are retained deliberately. A price that the statistics
selected, and that was then snapped onto a structural level, often
remains structurally relevant afterwards, and it is useful to see where
those prices were. The number retained is configurable and defaults to
six.
Read the fade as expiry of a claim, not as expiry of the price. The
faded line is a record that this price was once selected as a target and
of what happened next. It is not a live target and carries no ongoing
claim about the future.
The image below shows several resolved projections on one chart, so the
three outcome colours can be compared side by side: a faded mint line
where price reached the target, a faded coral line where it reached the
adverse reference first, and a faded slate line where the horizon
elapsed without either being touched. The markers carry the matching
three-letter outcome. Projections that did not work out are shown here
deliberately; the indicator records its own failures and so should its
description.
Level lines are redrawn on each new bar and only levels within six ATR
of current price are displayed, up to fourteen at a time.
THE FAN
Outer shaded band 5th to 95th percentile of matched
historical outcomes.
Inner shaded band 25th to 75th percentile.
Dashed centre line 50th percentile, the median path.
Teal the event pointed upward.
Coral the event pointed downward.
The fan is frozen at the moment the projection is issued and is never
recalculated. It reaches forward exactly H bars.
The next image shows a single live projection close up: the two shaded
bands, the dashed median path, the mint target line, and the label
carrying hit rate, sample size and remaining bars. Note that the bands
are not symmetrical around the median, because they are measured
percentiles rather than a fitted curve.
EVENT MARKERS
A small label prints at each recorded event, below the bar for upward
events and above for downward ones. It contains a three-letter code and
a number:
SWP sweep SHF shift SQZ squeeze
CLX climax REJ rejection DIV divergence
The number is the count of that event class and direction so far inside
the current run. "DIV 3" means this is the third divergence of that
direction since the last structure shift.
When a projection resolves, its marker gains a suffix and changes
colour:
HIT green target reached first
ADV red the -1R reference reached first
AMB amber both touched in the same bar; discarded
EXP amber the horizon elapsed with neither touched
THE TARGET LABEL
Three lines at the right end of the projection:
line 1 the target price, followed by "level" if it was snapped onto
a mapped structural level or "stat" if no level was near
line 2 hit rate and sample size, for example: hit 61% n=38
line 3 while the projection is live: bars remaining and the R ring
the hit rate refers to. Once it resolves, this line is
replaced by "RESOLVED" followed by HIT, ADV, AMB or EXP, and
the whole label takes the matching colour.
The bar count was frozen when the projection was issued and only counts
down. Nothing behind it is recalculated.
THE DASHBOARD
EVENT class, direction, and sequence number in this run
LOCATION MAJOR / MINOR / NONE and the level weight
REGIME RANGE / TRANS / TREND, the context score, tier
SIGNATURE backoff level used and sample size
WITH q50 q75 q95 terminal excursion quantiles measured ALONG the
event's own direction, in R
AGAINST q25 q05 the same distribution's tail measured AGAINST the
event's direction, in R
TARGET price and hit rate
ETA bars remaining and the R ring, or "no open
projection"
RUN EXT how far the current run has extended, in R
FLOW SOURCE "volume" or "proxy"
SEQ 1 / 2 / 3 / 4+ share of past completed runs that reversed after
that many events of this class
RUNS median median count before reversal, and number of runs
TIER A / B median outcome in R for each tier, with counts
LOC MAJ/MIN/NONE median outcome in R for each location class
LEDGER running totals of hit, adv, amb and exp
CALIBRATION average projected hit rate against realised
The dashboard is reproduced below at readable size, since every claim
made in the HOW IT WORKS section is meant to be verifiable there: the
backoff level actually used, the sample size behind it, the quantiles,
the sequence distribution, the two axis-health rows, and the running
comparison of projected against realised hit rate.
WITH and AGAINST are measured relative to the event's own direction, not
relative to the chart. For a downward event, a WITH value of +1.4R means
price fell by 1.4 ATR, and an AGAINST value of -1.8R means price rose by
1.8 ATR before the horizon closed. AGAINST is the row that tells you how
violent the route can be, and it is the row most worth reading before
deciding on any position size.
===============================================================
THE MOST IMPORTANT WARNING
===============================================================
DO NOT TREAT THE GREEN LINE AS A TARGET TO TRADE TOWARD, AND DO NOT
TREAT ANY MARKER AS AN ENTRY SIGNAL.
You will observe the following, and it is the single most dangerous
thing about this indicator:
The projection expires. The bars run out. The label reads "closed". And
then, twenty or fifty bars later, price finally reaches the green line.
It is tempting to read that as the tool having been right after all. It
was not, and here is why that reading destroys accounts:
1. The green line is snapped to a structural level. Structural levels
get revisited eventually, because that is what they are. Price
arriving there after the horizon has expired is not evidence of
anything. It is what levels do.
2. The expected bar count is a median of the cases that reached the
ring. By definition, roughly half of the successful cases took
longer than that. "The estimate elapsed and it is not there yet"
is an ordinary outcome, not a malfunction.
3. Route is not measured. The indicator records where price ended up
and how far it travelled. It does not promise that the path there
was survivable. Price can travel far against you first, and still
arrive. The AGAINST row is the only place the route appears at all,
and even there it is a summary, not a guarantee.
A faded line is a closed case. It has no ETA, no live claim and no
implication that price is still heading there. If price later reaches a
faded line, that is not a delayed hit. It is a structural level being
revisited, which is what structural levels do.
That third point is what actually costs money. A leveraged position
opened on the strength of a hit rate can be liquidated by an adverse
excursion long before the target is reached. The account is closed; the
target being reached afterwards is irrelevant to it. This is not a
remote scenario. It is the ordinary case whenever leverage is applied to
a statistic that describes destinations rather than routes.
The -1R red line does not protect you either. It is a measurement
boundary chosen so outcomes can be classified consistently. It is not a
risk parameter and was never sized to be one.
Precedent is a context tool. It tells you what has typically followed
this kind of moment on this chart, with the sample size attached. Entry
timing, position size, stop placement, leverage and the decision to
trade at all remain entirely yours and must come from a method this
indicator does not contain and does not attempt to contain.
If the only thing you take from a projection is "hit 61 percent, so buy"
you have misread it. The intended reading is closer to: "in 38
comparable cases on this chart, price reached this level within 24 bars
in 61 percent of them, taking a median of 9 bars, and the adverse tail
of that distribution ran to -1.8R."
===============================================================
LIMITATIONS AND REPAINT POLICY
===============================================================
REPAINT BEHAVIOUR, ELEMENT BY ELEMENT
- Event detection, tier assignment and score sampling are locked at
bar close. They do not change afterwards.
- Swing pivots confirm with a delay equal to the pivot length in bars
(default 21). A level cannot appear before its pivot is confirmed.
That delay is the cost of not looking ahead, and it is not avoided
anywhere in this script.
- Higher timeframe values are requested with a one-bar offset, so
only completed higher timeframe bars are used. On the chart
timeframe this means the higher timeframe bias lags by one higher
timeframe bar.
- The fan, the target line and the adverse line are computed once, at
the confirmed bar that issued them, and are never recalculated.
- The dashboard and the countdown update live within the forming bar
by design. The countdown only subtracts from a number that was
frozen at issue; no statistic behind it is recomputed.
KNOWN LIMITATIONS
- The statistics are descriptive, not predictive. They summarise what
has already happened on the chart in front of you. They are not a
forecast and are not out-of-sample.
- Sample sizes are small by construction. Requiring non-overlapping
outcomes limits the number of independent cases available, which is
why the backoff and the visible sample counts exist.
- Until enough completed outcomes exist, nothing is drawn at all. The
image below shows that state: the dashboard reports CALIBRATING and
the current count against the required minimum, and no fan, target
or hit rate appears anywhere on the chart.
- Chart history is finite. On low timeframes the available bars may
cover only a matter of weeks, and possibly only one market regime.
Treat a large sample drawn from a single regime with caution.
- Outcomes are measured at bar resolution. When a bar touches both
the target and the adverse reference, the order is unknowable and
the case is marked ambiguous and discarded rather than assumed.
- Statistics apply only to events this indicator itself defined. If
you identify a setup it did not mark, no displayed percentage
describes it. Borrowing a number from a different occasion is a
misuse.
- Where a symbol provides no usable volume, flow falls back to a
body-position proxy on the same percentile scale. The dashboard
states which is in use. Mixing the two would corrupt the store, so
the fallback applies to the whole session or not at all.
- Changing the higher timeframe from Auto to Manual changes what the
signature key means. The stored outcomes are therefore cleared and
rebuilt from zero when you do it. This is intentional.
- Nothing here is tuned. There is no optimiser and no fitted weight.
Thresholds are percentiles over disclosed rolling windows. If a
parameter is changed, the level map and the statistics change with
it, and the sample must accumulate again.
===============================================================
DISCLAIMER
===============================================================
This script is published for educational and analytical purposes. It is
not financial advice, not a recommendation to buy or sell any
instrument, and not a trading system. It produces no entry signals, no
stop levels and no position sizing.
Historical measurement does not indicate future results. Markets change
regime, and a distribution measured on past bars may not describe the
next ones. Trading carries risk of loss, and leveraged trading carries
risk of total loss. Any decision taken while this indicator is on the
chart remains entirely the responsibility of the person taking it.
مؤشر

Thermometer OscillatorThermometer Oscillator
This one comes from David Bowden's Gann trading material — a quick way to check whether a trend still has gas in the tank or is about to stall. I built it as a simple momentum readout, nothing fancy.
Each bar gets scored on three things, added up into one number from -5 to +5:
1. Today's close vs. yesterday's close — +2 if higher, -2 if lower, 0 if it didn't move.
2. Today's close vs. today's open — same idea, +2/-2/0.
3. Today's range vs. yesterday's close — +1 if the whole bar sat above yesterday's close, -1 if it sat entirely below, 0 if yesterday's close landed inside the bar.
Add the three up and you get a number between -5 and +5. It plots like an RSI, with lines at +5, +3, 0, -3 and -5 so you can see where things stand at a glance. There's also a moving average on top (EMA by default, 9-period, but you can switch to SMA/WMA/RMA and change the length) to smooth out the noise.
Don't trade off this thing alone. It's an early-warning tool, not a signal. The way it's meant to be used: watch for it disagreeing with price. If a market's been sitting at +5 for a few days and then drops to +1 while price is still grinding out higher highs, that's momentum leaking out before the chart shows it.
Bowden's original write-up covers the daily version — previous day vs. current day. He does the same thing for the weekly trend, but you don't need a second calculation for that, just flip the chart to a weekly timeframe and read it the same way.
Educational tool only, not trading advice. Do your own homework before putting money behind it. مؤشر

TF: Torque Flow Oscillator (TFO)TradingFlow: Torque Flow Oscillator (TFO)
TFO shows whether recent candles are producing persistent upward or downward pressure. It combines candle bodies, upper and lower wick behavior, relative volume, and fading memory into one directional oscillator.
Its main value is simple: instead of judging one candle in isolation, TFO shows whether similar pressure has continued across several bars and whether that pressure is unusually strong compared with its own recent history.
Quick Chart Guide
• Teal columns above zero: Net upward pressure.
• Red columns below zero: Net downward pressure.
• Orange line: Smoothed TFO signal.
• Upper extreme line: Threshold for unusually strong positive pressure.
• Lower extreme line: Threshold for unusually strong negative pressure.
• Light background: TFO has moved beyond a directional extreme line.
How TFO Is Built
Each candle contributes three pieces of information:
• Body direction: a bullish body adds positive pressure; a bearish body adds negative pressure.
• Wick behavior: a lower wick means price traded lower and then recovered, so the model adds a positive contribution. An upper wick means price traded higher and then pulled back, so the model adds a negative contribution.
• Relative volume: active candles receive more weight, while extreme volume is compressed so one bar cannot dominate the oscillator for too long.
Price geometry is normalized by the instrument's prior ATR, so readings are less dependent on price level or timeframe. Recent pressure is then accumulated with a gradually fading memory.
How to Read the Columns
• TFO holding above zero means recent candle pressure is net positive.
• TFO holding below zero means recent candle pressure is net negative.
• Moving farther from zero means directional pressure is becoming larger in magnitude.
• Moving back toward zero means pressure is fading or becoming more balanced.
Column shade compares TFO with the previous bar. Dark teal means a rising positive reading; light teal means a falling positive reading. Dark red means a more negative reading; light red means a less negative reading.
The columns describe pressure within the observed candles. They do not guarantee the next price direction.
Signal Line
The orange line is a smoother baseline for TFO:
• TFO moving above the signal means pressure has shifted upward relative to its smoothed baseline.
• TFO moving below the signal means pressure has shifted downward relative to its smoothed baseline.
Read signal-line changes together with the zero axis. A crossover is a change in pressure state, not an automatic trade signal.
Directional Extreme Lines
The upper and lower lines are based on the recent percentile of absolute TFO readings. By default, they represent pressure magnitudes reached by only the strongest part of recent observations.
• Above the upper line means unusually strong positive pressure.
• Below the lower line means unusually strong negative pressure.
An extreme can indicate continuation, acceleration, panic, or exhaustion. It does not automatically mean overbought, oversold, or reversal.
Practical Use
1. Use the zero axis to identify the current pressure direction.
2. Use the signal line to observe short-term changes in that pressure.
3. Use the extreme lines to recognize when pressure is unusually large.
4. Confirm all readings with price structure, support and resistance, and your own risk rules.
For realtime bars, TFO changes as the candle and volume develop. Use closed bars when confirmation matters.
Important
TFO is an OHLCV-based candle-pressure model. It is not order flow, volume delta, or proof of institutional activity. It measures the current candle from open to close, so overnight gaps are not directly included in body direction. On symbols without volume data, TFO falls back to price geometry only. Standard candles and reliable traded volume provide the clearest interpretation.
---
TradingFlow: Torque Flow Oscillator (TFO)
TFO 用來觀察近期 K 線是否持續產生向上或向下壓力。它把 K 線實體、上影線與下影線的形態、相對成交量,以及會逐漸消退的歷史影響,整合成一個方向性震盪指標。
它的主要價值很直接:不只判斷單獨一根 K 線,而是顯示相似方向的壓力是否持續了數根 K 線,以及目前壓力相對於近期是否異常強烈。
快速讀圖
• 零軸上方的青綠色柱: 整體壓力偏多。
• 零軸下方的紅色柱: 整體壓力偏空。
• 橙色線: TFO 的平滑訊號線。
• 上方極值線: 判斷正向壓力是否異常強烈的門檻。
• 下方極值線: 判斷負向壓力是否異常強烈的門檻。
• 淡色背景: TFO 已超越其中一條方向極值線。
TFO 如何形成
每根 K 線提供三部分資料:
• 實體方向: 陽線增加正向壓力,陰線增加負向壓力。
• 影線形態: 下影線表示價格曾經跌至較低位置,其後有所回升,因此模型計入正值;上影線表示價格曾經升至較高位置,其後有所回落,因此模型計入負值。
• 相對成交量: 成交較活躍的 K 線獲得較高權重;極端成交量會被壓縮,避免單根 K 線長時間主導指標。
K 線幾何會使用該標的此前的 ATR 作標準化,降低股價水平與時間週期對讀數的影響。其後,近期壓力會透過逐漸衰減的記憶累積起來。
如何閱讀柱狀圖
• TFO 持續位於零軸上方,表示近期 K 線的淨壓力偏多。
• TFO 持續位於零軸下方,表示近期 K 線的淨壓力偏空。
• 柱狀圖離零軸愈遠,代表方向壓力幅度愈大。
• 柱狀圖返回零軸,代表壓力正在減弱,或買賣力量變得較平衡。
柱色會把 TFO 與前一根 K 線比較:深青綠表示正值上升,淺青綠表示正值下降;深紅表示讀數變得更負,淺紅表示負值正在回升。
柱狀圖描述的是 K 線所反映的壓力,不保證價格下一步的方向。
訊號線
橙色線是 TFO 的平滑比較基準:
• TFO 移至訊號線上方,表示壓力相對於平滑基準向上轉移。
• TFO 移至訊號線下方,表示壓力相對於平滑基準向下轉移。
訊號線應與零軸一起閱讀。交叉代表壓力狀態正在轉變,不是自動買賣訊號。
方向極值線
上下兩條線根據近期 TFO 絕對值的百分位數計算。預設情況下,它們代表近期只有最強一部分讀數才會到達的壓力幅度。
• 超越上線,表示正向壓力異常強烈。
• 跌破下線,表示負向壓力異常強烈。
極值可能代表延續、加速、恐慌或衰竭,不等於超買、超賣或必然反轉。
實際使用方法
1. 使用零軸判斷目前的壓力方向。
2. 使用訊號線觀察壓力的短期變化。
3. 使用極值線判斷壓力是否異常強烈。
4. 配合價格結構、支撐阻力及自己的風險規則作最終判斷。
實時 K 線尚未收盤時,TFO 會隨價格與成交量變化。需要確認時,應以已收盤 K 線為準。
重要說明
TFO 是基於 OHLCV 的 K 線壓力模型,不是訂單流、Volume Delta 或機構活動證明。它以當前 K 線的開盤至收盤計算實體方向,因此不會直接把隔夜跳空計入實體方向。若標的沒有成交量資料,TFO 會只使用價格幾何。使用標準 K 線及具可靠實際成交量的標的,解讀會最清晰。
---
TradingFlow: Torque Flow Oscillator (TFO)
TFOは、直近のローソク足に上方向または下方向への圧力が継続して表れているかを可視化する方向性オシレーターです。ローソク足の実体、上ヒゲ・下ヒゲの形状、相対出来高、そして時間とともに減衰する過去の影響を一つの指標にまとめています。
一つのローソク足だけを個別に評価するのではなく、同じ方向の圧力が複数の足にわたって続いているか、また現在の圧力が直近の推移と比べてどの程度強いかを確認できる点が、TFOの主な特徴です。
チャートの見方
• ゼロラインより上の青緑色の柱: 上方向への圧力が優勢。
• ゼロラインより下の赤色の柱: 下方向への圧力が優勢。
• オレンジ色のライン: TFOを平滑化したシグナルライン。
• 上側の極値ライン: 上方向の圧力が異常に強いかを判断する基準。
• 下側の極値ライン: 下方向の圧力が異常に強いかを判断する基準。
• 薄い背景色: TFOがいずれかの方向の極値ラインを超えた状態。
TFOの仕組み
各ローソク足から、次の三つの要素を評価します。
• 実体の方向: 陽線の実体はプラス方向、陰線の実体はマイナス方向に加算されます。
• ヒゲの形状: 下ヒゲは、いったん安値を付けた後に価格が戻した動きを示すため、モデルではプラス方向に加算されます。上ヒゲは、いったん高値を付けた後に価格が押し戻された動きを示すため、マイナス方向に加算されます。
• 相対出来高: 出来高が通常より多いローソク足ほど重みが大きくなります。一方、極端な出来高は圧縮されるため、一つの足が長期間にわたって指標を支配しにくい設計です。
ローソク足の値幅は、その銘柄の直前までのATRで正規化されます。これにより、価格水準や時間軸の違いによる影響を抑えています。その後、直近の方向性圧力を、過去の影響が徐々に小さくなる形で蓄積します。
柱状表示の読み方
• TFOがゼロラインより上で推移している場合、直近のローソク足に表れた圧力は全体として上向きです。
• TFOがゼロラインより下で推移している場合、直近のローソク足に表れた圧力は全体として下向きです。
• ゼロラインから離れるほど、方向性圧力の大きさが増しています。
• ゼロラインへ戻る動きは、圧力の弱まり、または買いと売りの力が均衡に近づいていることを示します。
柱の色の濃淡は、現在のTFOを一つ前の足と比較したものです。濃い青緑色はプラス値の上昇、薄い青緑色はプラス値の低下、濃い赤色はマイナス幅の拡大、薄い赤色はマイナス値がゼロへ戻る動きを示します。
柱状表示はローソク足から推定した圧力を表すものであり、次の価格方向を保証するものではありません。
シグナルライン
オレンジ色のラインは、TFOを平滑化した比較基準です。
• TFOがシグナルラインを上回ると、圧力が平滑化された基準に対して上方向へ変化したことを示します。
• TFOがシグナルラインを下回ると、圧力が平滑化された基準に対して下方向へ変化したことを示します。
シグナルラインはゼロラインと併せて確認してください。交差は圧力状態の変化を示しますが、それ自体が自動的な売買シグナルになるわけではありません。
方向性の極値ライン
上下の極値ラインは、直近のTFOの絶対値をパーセンタイルで評価して算出します。初期設定では、直近の観測値の中でも特に強い圧力だけが到達する水準を示します。
• TFOが上側のラインを超えると、上方向の圧力が通常より著しく強い状態です。
• TFOが下側のラインを下回ると、下方向の圧力が通常より著しく強い状態です。
極端な圧力は、トレンドの継続、加速、パニック的な値動き、または勢いの限界を示す可能性があります。極値への到達だけで、買われ過ぎ、売られ過ぎ、あるいは反転を意味するものではありません。
実践的な使い方
1. ゼロラインで現在の圧力方向を確認します。
2. シグナルラインで圧力の短期的な変化を確認します。
3. 極値ラインで圧力が通常より大きいかを判断します。
4. 最終的な判断には、価格構造、サポート・レジスタンス、ご自身のリスク管理ルールを組み合わせてください。
リアルタイムのローソク足では、価格と出来高の変化に伴ってTFOも変動します。確認を重視する場合は、確定したローソク足の値を使用してください。
重要事項
TFOはOHLCVデータに基づくローソク足圧力モデルです。オーダーフローや出来高デルタではなく、機関投資家の活動を直接示すものでもありません。実体の方向は当該ローソク足の始値から終値までで計算するため、前の足の終値からのギャップは直接反映されません。出来高データがない銘柄では、ローソク足の価格形状のみを使用します。通常のローソク足と信頼できる出来高データを持つ銘柄で、最も明確に解釈できます。
مؤشر

MYND Distribution/Capitulation Exit Engine v1.0MYND Distribution/Capitulation Exit Engine
A dedicated exit tool built on one core idea: the way an uptrend tops out and the way a downtrend bottoms out are not mirror images of each other, so this indicator scores them with two genuinely different engines instead of one exit score flipped in sign.
WHAT IT DOES
This tool watches for two separate exit conditions. Distribution (long exit) is a slow, multi-bar process - the kind of quiet, high-volume selling that shows up while price still looks fine on the surface. Capitulation (short exit) is a fast, single-bar process - a violent, high-volume flush that can resolve in a bar or two. Each gets its own 0-100 score, its own Warning and Exit thresholds, and its own markers and alerts.
HOW IT WORKS
The Distribution score blends three classic distribution signatures: Distribution Day counting (a down day on rising volume, the technique long used by institutional trend-followers to spot quiet institutional selling), down-day volume dominance over a shorter window, and a gradual RSI roll-over from an elevated reading. A "still near recent highs" check keeps the score meaningful while price looks healthy, and dampens it once price has already broken down - by then you likely don't need this tool to tell you something changed.
The Capitulation score blends three climax signatures: a volume z-score spike relative to its own recent history, a rejection-candle score that continuously blends range expansion and close position off the low (no hard cutoff, so the score moves smoothly rather than jumping), and an RSI extreme-and-uptick check that only rewards being oversold once RSI has actually started turning back up - not just for being oversold and still falling. All three are scored live, every bar, with no multi-bar confirmation delay - because by the time a slow confirmation window closes on a capitulation move, the opportunity to act on it is often already gone.
KEY FEATURES
Four distinct signals - Long Exit Warning, Long Exit Signal, Short Exit Warning, Short Exit Signal - each independently plotted and alertable. A live dashboard table showing both scores, their zones, the raw Distribution Day count, the down-volume ratio, and whether price is still near its recent high. Full color, table position, and text-size customization. Eight alerts total, including four combo bundles (all signals, long-side only, short-side only, actionable-only) so you can set up exactly the notification footprint you want.
HOW TO USE IT
Pair this with any entry method - it is not an entry tool. Once in a position, watch the relevant score: a Warning is an early heads-up to tighten stops or begin scaling out, an Exit signal is the higher-conviction, actionable read. Treat the Distribution and Capitulation scores independently; they are not designed to be compared against each other, only against their own thresholds.
SETTINGS WORTH TUNING FIRST
Long/Short Exit Warning and Signal Thresholds - the fastest way to make signals earlier/more frequent or later/higher-conviction. Distribution Day Lookback and Critical Distribution Day Count - calibrates how much selling pressure counts as meaningful distribution for your symbol and timeframe. Minimum Bar Range (x ATR) and Minimum Close Position - the reference levels the capitulation rejection-candle score scales against; raise either to require a stronger candle to reach a high score.
ALERTS
All eight alerts use TradingView's standard alertcondition() system - no special setup required. Add Alert, choose this indicator, and pick the named condition from the dropdown.
This tool does not know your actual position or entry price - it scores exit conditions on the underlying symbol only, and a signal is only actionable if you hold a matching position. This tool is provided for informational and educational purposes and does not constitute financial advice. Trading involves risk; past performance and historical patterns do not guarantee future results. مؤشر

Wavelet Transform Trend [QuantAlgo]🟢 Overview
The Wavelet Transform Trend is a trend-following indicator built on multi-level undecimated Haar wavelet decomposition rather than moving averages or fixed volatility bands. It separates the price series into approximation components that carry structural trend and detail components that carry short-term noise, discards or shrinks the noise, then reconstructs a denoised wavelet path from what remains. That path is wrapped in an ATR confirmation band that price must close beyond before the trend state flips, helping traders separate genuine directional structure from local oscillation across every timeframe and market.
🟢 How It Works
The core engine is a dilated à trous cascade. Each stage widens the Haar filter by a factor of two and splits the series into a coarser approximation and the detail band at that scale, with no downsampling, so the decomposition stays shift invariant and every bar receives a coefficient at every level:
float a1 = (a0 + a0 ) * 0.5
float d1 = a0 - a1
float a2 = wavelet_levels >= 2 ? (a1 + a1 ) * 0.5 : a1
float d2 = a1 - a2
Wavelet Period sets how much history the trend component draws on, and Wavelet Levels determines how that span is divided across scales. The dilation schedule is derived from both, so the deepest approximation always spans the requested period. Reconstruction is exact by construction, meaning the deepest approximation plus every detail band returns the original source, so removing or shrinking detail is the only thing that changes the output. With Wavelet Approximation Only enabled the details are discarded outright. With it disabled, each band is soft thresholded against its own estimated noise magnitude, so the same setting behaves consistently on any instrument.
The resulting path is smooth but continuous, so direction comes from wrapping it in an ATR band and requiring a close through it. Each band only trails in the favorable direction and freezes otherwise:
lower_band := lower_raw > prev_lower or prev_close < prev_lower ? lower_raw : prev_lower
upper_band := upper_raw < prev_upper or prev_close > prev_upper ? upper_raw : prev_upper
The result is a binary state that holds through pullbacks inside the band and flips only on a confirmed close beyond it. The entire engine runs on confirmed bar data, so the wavelet path, the bands, the trailing level, the trend state, and the alerts all hold their last closed-bar values and the indicator does not repaint.
🟢 Signal Interpretation
▶ Bullish Trend (Green): When price closes above the upper confirmation band, the indicator enters bullish mode with green coloring applied across the trend line, glow, radial layering, wave trail, and optional bar and background coloring. The trailing level switches to the lower band and ratchets upward with the wavelet path, holding through pullbacks that fail to close beneath it.
▶ Bearish Trend (Red): When price closes below the lower confirmation band, the indicator enters bearish mode with red coloring across all visual elements. The trailing level switches to the upper band and only tracks lower from that point, requiring a close above it before the state can flip back.
🟢 Features
▶ Preconfigured Presets: Three parameter sets cover different trading approaches. "Default" targets swing trading on 1-hour and daily charts. "Fast Response" shortens the span, reduces decomposition depth, and narrows the band for intraday charts where the indicator needs to adapt to shorter-duration moves. "Smooth Trend" extends the span, deepens the decomposition, and widens the band for position trading on daily and weekly timeframes, where the cost of a false flip is higher than the cost of a delayed one. Selecting a preset overrides the individual wavelet and ATR inputs.
▶ Built-in Alerts: Three alert conditions cover all directional states. "Bullish Wavelet Trend" fires on the bar where the trend direction flips from bearish to bullish. "Bearish Wavelet Trend" fires on the bar where it flips from bullish to bearish. "Any Wavelet Trend Flip" combines both into a single condition for traders who want a unified notification regardless of direction.
▶ Visual Customisation: Two display modes cover different reading styles. Line plots the confirmed trailing level with glow and optional radial layering, Wave instead builds a smoke-trail from copies of the wavelet path with configurable layers, span, and brightness. Six colour presets (Classic, Aqua, Cosmic, Cyber, Neon, and Custom) apply coordinated bullish and bearish schemes across the trend line, glow, radial layering, wave shades, and optional bar and background colouring. Bar colouring tints price candles with the active trend colour at a configurable transparency level, and background colouring extends the directional tint across the full chart pane.
مؤشر

VWAP Trend Momentum [Artillery]VWAP Trend Momentum is a session-VWAP pullback strategy: it waits for price to establish a trend on one side of the session VWAP, lets price pull back into the VWAP, and enters when the pullback resolves back in the trend direction. This publication consolidates three earlier scripts - "VWAP Trend Momentum", "VWAP Trend Momentum v2" and the market-specific "MNQ VWAP Trend" - into one canonical open-source strategy. The oldest version incorporated a third-party open-source trailing-stop component; that code has been removed entirely, so everything in this script is original and written with Pine built-ins only.
WHAT IT DOES
1) Trend side - the session-anchored VWAP (reset daily, volume-weighted) splits the day. A trend qualifies only when price is on one side of VWAP, a 34-period EMA has a meaningful slope in the same direction (slope is measured against ATR so "meaningful" scales with volatility), and optionally price is also beyond the EMA50.
2) Pullback - the entry setup requires price to have traded within a configurable distance of VWAP inside the last few bars: the strategy buys strength only after a genuine test of the mean, not at extension.
3) Trigger - after the VWAP test, a close back on the trend side that also takes out the prior bar's high (for longs; mirror for shorts) fires the entry.
4) Exits - fixed ATR-based stop and target (defaults 1.5 ATR stop, 4.5 ATR target = 3:1), an optional breakeven move after a configurable ATR gain, and a forced flatten at session end.
5) Guard rails - a trades-per-day cap, one position at a time, and a session window (all times New York).
OPTIONAL CONFIRMATION FILTERS
Two stricter entry filters from the retired MNQ variant are included, off by default: a rejection-candle requirement (the trigger bar must show a wick of at least N% of its range toward VWAP with a real body) and an ADX floor (skip signals in flat tape). Turn them on if you want fewer, more selective entries.
WHY ONE SCRIPT INSTEAD OF THREE
The three earlier publications were variations of the same idea - session VWAP plus trend filter plus pullback entry - separated only by tuning and by one market-specific configuration. That is versioning, not new logic, so they now live in one script where the differences are inputs. The trades-per-day cap in the previous version was documented but not actually enforced in code; that is fixed here.
BACKTEST PROPERTIES (documented so you can judge the report)
The report uses realistic properties for one micro futures contract: 50,000 initial capital, fixed 1 contract, commission of 4.00 per contract per side, 2 ticks of slippage, 10% margin, orders on confirmed bars only. Risk per trade is the ATR stop - a small fraction of capital on a micro contract. Defaults are deliberately neutral rather than optimized: full New York cash session (9:45-15:30 ET), both directions enabled, up to 3 trades per day. They were run on MNQ 5-minute bars; other symbols and timeframes need their own settings. Backtest results are historical, vary with the tested window, and do not predict future performance.
WHAT YOU SEE ON THE CHART
- The session VWAP (gold), the trend EMA (blue) and optional EMA50 (purple)
- BUY/SELL labels at entries plus the strategy's own trade markers
- A subtle session shading and a compact dashboard with VWAP bias, trend state, position, configured R:R and session status
BEHAVIOUR NOTES
Everything is computed on closed bars: no intrabar order generation, no higher-timeframe requests, no lookahead. The session VWAP accumulates during the day and does not repaint once its bar closes. Strategies in Pine v6 alert through order-fill events - create an alert on the strategy and select order fills.
This is an educational and analytical tool for studying VWAP-anchored trend behaviour. It is not financial advice. استراتيجية

TRADION Adaptive Momentum MatrixA normalized multi-factor momentum framework combining RSI structure, ROC velocity, MACD impulse and stochastic pressure into a unified -100 to +100 momentum regime model.
────────────────────────────
OVERVIEW
────────────────────────────
TRADION Adaptive Momentum Matrix (AMM) is a composite momentum oscillator designed to evaluate not only the direction of momentum, but also its intensity, acceleration and regime.
Rather than displaying several conventional oscillators independently, AMM transforms four different momentum dimensions into normalized components and combines them into a single bounded Momentum Score ranging from -100 to +100.
The engine integrates:
• RSI Momentum Structure
• Rate of Change (ROC) Velocity
• ATR-Normalized MACD Impulse
• Stochastic Pressure
• Weighted Composite Momentum Scoring
• Multi-Level Momentum Regimes
• Momentum Signal Line
• Compression Detection
• Confirmed-Bar Momentum Transitions
• Six Dedicated Alert Conditions
The objective is to provide a unified interpretation of momentum conditions while preserving the information contributed by different momentum methodologies.
────────────────────────────
COMPOSITE MOMENTUM ARCHITECTURE
────────────────────────────
The core of TRADION AMM is a weighted composite model.
Each momentum component measures a different characteristic of price behavior and is transformed into a normalized range before entering the final calculation.
The four default components are:
RSI Momentum — 30%
ROC Velocity — 25%
MACD Impulse — 25%
Stochastic Pressure — 20%
The component weights are user-adjustable.
The engine automatically normalizes the total weighting, allowing users to modify the relative importance of individual components without requiring the weights to manually sum to 100.
────────────────────────────
1. RSI MOMENTUM STRUCTURE
────────────────────────────
RSI is transformed around its 50 equilibrium level.
Values above 50 contribute positively to the composite momentum model, while values below 50 contribute negatively.
The distance from the 50 level represents the relative intensity of the RSI component.
This allows RSI to function as a normalized directional momentum input rather than simply as an overbought/oversold condition.
────────────────────────────
2. ROC VELOCITY
────────────────────────────
Rate of Change measures the velocity of price movement over the selected lookback period.
Positive ROC contributes to bullish momentum.
Negative ROC contributes to bearish momentum.
Because raw ROC magnitude can vary considerably between instruments and market regimes, the component is normalized using a configurable ROC scale before entering the composite calculation.
────────────────────────────
3. ATR-NORMALIZED MACD IMPULSE
────────────────────────────
The MACD component focuses on impulse rather than the absolute MACD level.
The engine calculates the difference between the MACD line and its signal line and then normalizes this histogram relative to ATR.
This is an important part of the architecture.
A raw MACD histogram value cannot be directly compared across instruments with different price scales and volatility characteristics.
ATR normalization expresses MACD impulse relative to the instrument's current volatility environment before it contributes to the composite score.
────────────────────────────
4. STOCHASTIC PRESSURE
────────────────────────────
The Stochastic component evaluates the position of price within its recent high-low range.
The result is smoothed and transformed around the neutral 50 level.
Values above the midpoint contribute positive pressure, while values below the midpoint contribute negative pressure.
This component adds a shorter-term measure of directional price pressure to the broader momentum framework.
────────────────────────────
THE -100 TO +100 MOMENTUM SCORE
────────────────────────────
After normalization and weighting, the four components are combined into the Adaptive Momentum Score.
The final oscillator is bounded between:
-100 = Maximum bearish momentum classification
0 = Momentum equilibrium
+100 = Maximum bullish momentum classification
The score is not intended to predict a specific future return.
Instead, it measures the degree of directional agreement between the underlying momentum components at the current point in time.
────────────────────────────
MOMENTUM REGIME MODEL
────────────────────────────
Instead of treating momentum as simply positive or negative, TRADION AMM separates the oscillator into multiple regimes.
Default bullish regimes:
+15 to +40
BULLISH
+40 to +70
STRONG BULLISH
+70 to +100
EXTREME BULLISH
Default bearish regimes:
-15 to -40
BEARISH
-40 to -70
STRONG BEARISH
-70 to -100
EXTREME BEARISH
The area between -15 and +15 represents the neutral momentum region.
All major regime thresholds are configurable.
────────────────────────────
ADAPTIVE HISTOGRAM
────────────────────────────
The histogram provides the primary visual representation of the composite Momentum Score.
Its color changes according to the active momentum regime.
Bullish momentum progresses through increasingly stronger green / turquoise classifications as the score rises.
Bearish momentum progresses through increasingly stronger red classifications as the score falls.
The histogram therefore communicates two variables simultaneously:
• Momentum direction
• Momentum intensity
This makes transitions between neutral, directional, strong and extreme momentum regimes immediately visible.
────────────────────────────
MOMENTUM SIGNAL LINE
────────────────────────────
A configurable EMA of the Momentum Score is plotted as a secondary signal line.
This provides a smoothed reference for interpreting changes in the composite oscillator.
The relationship between the Momentum Score and its signal line can help identify:
• Momentum acceleration
• Momentum deceleration
• Changes in short-term impulse
• Potential regime transitions
The signal line can be enabled or disabled from the settings.
────────────────────────────
MOMENTUM ACCELERATION
────────────────────────────
The engine also calculates the bar-to-bar change in the composite Momentum Score.
Positive momentum that continues to increase represents bullish momentum acceleration.
Negative momentum that continues to decrease represents bearish momentum acceleration.
This internal measurement allows the framework to distinguish momentum level from changes in momentum intensity.
────────────────────────────
COMPRESSION ENGINE
────────────────────────────
Markets do not remain in directional momentum regimes continuously.
TRADION AMM therefore includes a Momentum Compression model.
The engine evaluates the standard deviation of the composite Momentum Score over a configurable lookback period.
Compression is identified when:
• Momentum variability falls below the selected threshold
• The composite score remains inside the neutral momentum region
These conditions identify periods where directional momentum has contracted.
Compression does NOT predict the direction of a future breakout.
It simply identifies a low-dispersion momentum environment that may deserve additional attention.
────────────────────────────
CONFIRMED MOMENTUM TRANSITIONS
────────────────────────────
TRADION AMM includes six momentum transition classifications:
BULLISH SHIFT
STRONG BULLISH
EXTREME BULLISH
BEARISH SHIFT
STRONG BEARISH
EXTREME BEARISH
These events are generated when the composite Momentum Score crosses the corresponding regime threshold.
When Confirm Signals At Bar Close is enabled, a transition is accepted only after the current chart bar has been confirmed.
This helps prevent temporary intrabar threshold crossings from being treated as completed momentum transitions.
────────────────────────────
VISUAL REGIME MAP
────────────────────────────
The oscillator panel is divided into visually distinct momentum zones.
This provides a structured map of the current momentum environment:
EXTREME BULLISH
↑
STRONG BULLISH
↑
BULLISH
↑
NEUTRAL / COMPRESSION
↓
BEARISH
↓
STRONG BEARISH
↓
EXTREME BEARISH
The visual design is intended to make changes in momentum regime readable without requiring constant interpretation of individual indicator values.
────────────────────────────
USER CONTROLS
────────────────────────────
Momentum Engine:
• Source
• RSI Period
• ROC Period
• MACD Fast Length
• MACD Slow Length
• MACD Signal Length
• Stochastic Period
• Stochastic Smoothing
Component Weights:
• RSI Weight
• ROC Weight
• MACD Weight
• Stochastic Weight
Normalization:
• ROC Normalization Scale
• MACD ATR Normalization Period
• MACD Normalization Sensitivity
Momentum Regimes:
• Bullish Threshold
• Strong Threshold
• Extreme Threshold
Signal Engine:
• Momentum Signal Length
• Show Momentum Shift Signals
• Confirm Signals At Bar Close
Compression:
• Compression Lookback
• Compression Threshold
• Highlight Compression
Visual Settings:
• Show Momentum Histogram
• Show Signal Line
• Show Regime Zones
────────────────────────────
ALERT SYSTEM
────────────────────────────
Six dedicated TradingView alert conditions are included:
• TRADION BULLISH SHIFT
• TRADION STRONG BULLISH
• TRADION EXTREME BULLISH
• TRADION BEARISH SHIFT
• TRADION STRONG BEARISH
• TRADION EXTREME BEARISH
Each momentum classification can therefore be monitored independently.
────────────────────────────
PRACTICAL INTERPRETATION
────────────────────────────
TRADION Adaptive Momentum Matrix can be used as:
• A composite momentum oscillator
• A momentum regime classifier
• A momentum-strength confirmation layer
• A momentum acceleration/deceleration reference
• A compression detection framework
• A confirmation tool alongside independent trend analysis
• An alert-based momentum monitoring system
For example, a positive Momentum Score does not automatically imply that momentum is strong.
The regime model distinguishes between ordinary bullish momentum, strong bullish momentum and extreme bullish momentum.
The same principle applies to bearish conditions.
This distinction is central to the design of the indicator.
────────────────────────────
DESIGN PHILOSOPHY
────────────────────────────
Momentum is multidimensional.
RSI measures momentum differently from ROC.
ROC measures velocity differently from MACD impulse.
Stochastic positioning provides different information from all three.
TRADION Adaptive Momentum Matrix does not attempt to replace these concepts with a single conventional oscillator.
Instead, it asks a broader question:
How strongly do multiple independent momentum measurements agree on the current directional state?
The individual components are normalized, weighted and aggregated into a common -100 to +100 framework.
The resulting Momentum Score is then classified into structured regimes, allowing direction and intensity to be interpreted within the same analytical model.
────────────────────────────
IMPORTANT NOTES
────────────────────────────
TRADION Adaptive Momentum Matrix is an analytical oscillator, not a trading strategy or prediction system.
BULLISH, STRONG BULLISH, EXTREME BULLISH, BEARISH, STRONG BEARISH and EXTREME BEARISH classifications describe conditions calculated by the indicator.
They do not guarantee future price direction, profitability or trade outcomes.
EXTREME momentum should not automatically be interpreted as a reversal condition.
Strong momentum can remain elevated or depressed for extended periods during directional markets.
Similarly, Momentum Compression does not predict the direction or timing of a future breakout.
Confirmed-bar processing can reduce temporary intrabar signals, but it does not eliminate market risk, signal lag or false transitions.
Users should evaluate the indicator within their own analytical framework and apply appropriate risk management.
For research and educational purposes. مؤشر
