Adjusted SuperTrendAdjusted SuperTrend | MisinkoMaster
The Adjusted SuperTrend is a refined, low-lag evolution of the traditional SuperTrend indicator. Standard SuperTrend formulas rely on classic Average True Range (ATR) calculations that treat all price ranges linearly. This often results in delayed trend shifts during explosive volatility spikes or premature whipsaws during choppy consolidation phases.
The Adjusted SuperTrend solves this issue by incorporating a specialized, smoothed True Range filter that balances extreme high-low spreads with close-to-close variations. By anchoring an exponential moving average baseline to this modified volatility metric, the indicator provides a more adaptive, reactive trailing stop line that keeps you aligned with genuine market trends while minimizing false breakout signals.
How It Works (The Core Architecture)
The indicator evaluates trend direction and trailing support/resistance through a three-stage framework:
Linearized True Range Volatility: Rather than using standard ATR, the engine evaluates the absolute maximum and minimum true range components on each bar and averages them. This balances intra-bar high-low expansion with bar-to-bar gap volatility, creating a smoother measurement of true market variance.
Exponential Baseline Alignment: The modified range is processed through an Exponential Moving Average (EMA) volatility lookback filter and applied as a multiplier factor around a core price EMA baseline, establishing dynamic upper and lower tracking boundaries.
Asymmetric Trailing Regime State: When the selected price source closes cleanly above the upper boundary, a bullish trend regime is locked in, plotting the lower band as an active trailing stop. Conversely, when the price drops below the lower boundary, a bearish regime is initiated, using the upper band as trailing overhead resistance.
Key Features
Low-Lag Volatility Smoothing: Uses a specialized True Range derivation to react faster to sudden breakout expansions while remaining resilient against minor noise.
Synchronized Candlestick Morphing: Automatically colors on-chart price bars (green for bullish, red for bearish) to give you instant visual feedback on the active trend bias.
Layered Diamond Breakout Markers: Highlights structural trend flip points with multi-layered diamond markers painted directly on the trailing support/resistance line.
Status Line Volatility Tracking: Includes an integrated ATR status reading for easy monitoring of real-time market expansion directly from your chart legend.
Input Parameters & Optimization Guide
Source: Sets the price series used for baseline calculations and band cross checks (Default: Close).
Baseline Lookback Period: Controls the lookback window for the core EMA trend line. A lower value makes the baseline more sensitive to immediate price action, while a higher value maps macro trend direction (Default: 14).
Volatility Lookback: Sets the length for the smoothed range calculation. Lowering this value makes the trailing bands expand and contract faster during volatility spikes (Default: 8).
Factor: The volatility band multiplier. Adjusting this parameter changes the distance between the baseline and the outer bands. Lower values (e.g., 1.5 - 2.0) work well for tight scalping, while higher values (e.g., 2.5 - 3.0) filter out noise for swing trading (Default: 2.5).
Trading Strategies & Execution
Trailing Trend Continuations
Use the active line as a dynamic trailing stop-loss or trend direction filter:
Bullish Alignment: When the green lower line is active, look for long entries on pullbacks toward the line, keeping your stop-loss placed just below the dynamic support.
Bearish Alignment: When the red upper line is active, look for short setups on rallies toward overhead resistance, trailing your stop along the red line.
Regime Flip Breakouts
A structural change in market bias occurs when price invalidates the active outer boundary:
A candle closing above the red upper band triggers a Bullish Trend Flip, marked by glowing green diamonds on the chart.
A candle closing below the green lower band triggers a Bearish Trend Flip, marked by glowing red diamonds.
Disclaimer: Trading financial markets involves high risk. This technical script is designed as an informational analytical tool to support your rule-based mechanical execution system and does not constitute financial advice. Wskaźnik

Regression Trend [MiesOnCharts]Regression Trend - Mies
What it does
This indicator fits a linear regression line to price over a rolling window and draws a corridor around it based on the statistical error of that fit. The corridor is what decides the trend state. As long as price stays inside it, nothing changes. When price closes outside one side, the whole thing flips color and a triangle marks the bar.
The result is a trend line that carries its own tolerance band with it, so you can see at a glance both where the fitted trend sits and how much room price has before the state changes.
How it works
A least squares regression is fitted across the lookback window. That gives the center line.
Around it, the script computes the standard error of the estimate, which is the typical distance between actual price and the fitted line. It comes from the correlation between price and time:
r is the correlation of the source with bar index over the window
residual variance is the price variance scaled by (1 - r²)
the standard error is the square root of that, adjusted for the degrees of freedom of the fit.
This is the part that makes the corridor behave differently from a standard deviation band. The width responds to how well price is actually tracking the trend, not just to raw volatility. A strong, clean trend produces a high correlation, small residuals, and a narrow corridor, so the indicator stays sensitive.
Choppy price that wanders around the line produces a weak fit, a wide corridor, and a much higher bar for triggering a state change. The indicator effectively demands more evidence in exactly the conditions where evidence is thin.
The bands sit at the center line plus and minus a multiple of that standard error. A close above the upper band turns the state bullish, a close below the lower band turns it bearish, and everything in between leaves the previous state untouched. That hysteresis is intentional. It is what stops the indicator from flipping every time price crosses its own mean.
On the chart
Regression line, green when the state is bullish, red when bearish, gray before the first breakout
Upper and lower standard error bands with a light fill between them, colored to match the current state Triangle below the bar when the state flips bullish Triangle above the bar when the state flips bearish.
Display controls to hide the fill, or the bands entirely, if you want a bare trend line
Two alert conditions, one for each direction
Settings
Source sets which series gets fitted. Close is the standard choice. HL2 or a smoothed input will give a calmer line and fewer flips.
Regression Window sets how many bars the fit covers. Shorter windows follow recent structure and react fast. Longer windows describe the broader trend and produce fewer, slower signals. This is the main setting for matching the tool to your timeframe.
SE Band Multiplier controls how far price has to move from the fitted line before the state changes. Lower values tighten the corridor and generate more signals. Higher values require a more decisive break and filter more noise, at the cost of entering later.
Display group toggles the bands and the fill, and adjusts band opacity.
How to use it
The most direct use is as a trend filter. Trade only in the direction the line is colored and treat the opposite flip as your exit or your cue to step aside.
The corridor itself gives you two readable things. Its width tells you how well price is respecting the trend, so a corridor that has narrowed over recent bars means the fit is tightening and the move is orderly. A corridor that has ballooned means the fit has broken down and the state you are looking at is stale. The center line works as a dynamic reference within an established regime, since a pullback toward it is price returning to its own fitted mean rather than to an arbitrary level.
It pairs well with a volume or momentum check. A corridor break tells you the move is statistically unusual relative to the current fit, but it says nothing about whether there is participation behind it.
Behavior worth understanding
The regression is recalculated on every bar, and the corridor plotted on each bar is that bar's own fit. This is a running envelope, not a fixed channel anchored to a pivot, so the bands will look wavier than a manually drawn regression channel. The reference moves with price, which is what keeps the state stable through a sustained run.
Signals are evaluated on the live bar, so a flip can appear and then vanish before the bar closes. Wait for bar close if you need signals that hold.
Limitations
Linear regression assumes price is moving in a straight line across the window, which is never fully true. The fit degrades at sharp reversals and around gaps, and the corridor is slow to acknowledge a turn right after a strong move because that extension is still inside the window. Treat this as a description of current trend structure, not a forecast.
Disclaimer
The indicator provided is not financial advice. Always conduct your own research and consider multiple factors before making trading decisions. Trade at your own risk. Wskaźnik

The Oloid (OWMA) Oloid Weighted Moving AverageThe Oloid (OWMA) — Oloid Weighted Moving Average
WHAT IT IS
The Oloid is a trend-following indicator built on the geometry of the oloid — a three-dimensional solid discovered by Paul Schatz in 1929. The oloid is the convex hull of two perpendicular circles, each passing through the center of the other. It is one of the few known solids that develops (unrolls) its entire surface onto a plane while rolling, touching every point of its surface exactly once per cycle — no point is missed, no point repeats.
This indicator translates that geometry into a novel, non-linear moving average: the Oloid Weighted Moving Average (OWMA).
MATHEMATICAL LEGACY
OWMA belongs to the lineage of geometry-inspired data analysis tools:
• Fourier Transform (1822) — decomposition of a signal into circular components.
• Wavelet Transform (1980s) — multi-scale analysis with shaped basis functions.
• OWMA (2026) — weighting of time-series data using the developable surface of a three-dimensional geometric solid.
The key innovation: using the coupling of two perpendicular circles as the weighting kernel. Fourier uses single circles. Wavelets use scaled and shifted basis functions. OWMA uses the interaction of two perpendicular oscillating systems to determine the informational value of each data point.
THE CORE IDEA
Every classic moving average weights bars by time: linearly (WMA), exponentially (EMA), or adaptively by a single volatility measure (KAMA, VIDYA). OWMA weights bars by their position on the oloid's developable surface, determined by two coupled market cycles simultaneously:
• Circle A — Momentum cycle. Each bar's local directional efficiency (a 4-bar Kaufman-style efficiency ratio) maps to an angle on the first circle.
• Circle B — Volatility cycle. Each bar's range relative to the recent average range maps to an angle on the second circle.
The oloid's center-of-mass height at the coupled position (alpha, gamma) is:
h(alpha, gamma) = h_min + dh * (0.5 + 0.5 * sin(2*alpha) * sin(2*gamma))
where h_max = sqrt(2)/2 and h_min = 3*sqrt(3)/8 are the exact geometric height extremes of a rolling oloid. The bar's weight is the INVERSE of this height:
• Bars at turning points (height minimum — the moment the rolling oloid "tips over") receive maximum weight. These are transition bars: pivots, regime changes, structure shifts.
• Bars during smooth rolling (height maximum) receive minimum weight. These are continuation bars, carrying less new information.
The result is a moving average that emphasizes market turning points and de-emphasizes continuation — behavior no linear, exponential, or single-factor adaptive MA produces, because the weight depends on the coupled state of two independent cycles, not on time or one factor alone.
HOW IT WORKS ON THE CHART
1. Oloid Line (center). The visible line does not plot OWMA directly — it tracks OWMA with adaptive speed derived from the oloid's current height. Two refinements prevent lag during strong trends:
— Velocity Lead: when adaptation is slow, the line aims where OWMA is going (target = OWMA + delta-OWMA * lead), like the contact point of an oloid rolling down a slope leading its center of mass.
— Adapt Floor: a strong trend (high efficiency ratio) guarantees a minimum tracking speed — gravity keeps the oloid rolling even at maximum height.
2. Oloid Field. ATR-based dynamic bands around the center line. The field narrows as trend efficiency rises (trending markets get a tighter channel) and widens in chop. Field color reflects price position: green above, red below, gray inside.
3. Energy metric (Data Window / dashboard). Energy = efficiency ratio * range regularity. It measures whether the oloid is "rolling" — whether the market has coherent, structured motion. Energy Up / Energy Down split it by the Oloid Line's slope direction. These values are not drawn as chart lines — they live in the dashboard and the Data Window, where the Pine Screener can also read them.
4. Slope Engine. Tracks the slope of RangeReg Bull% — the percentage of bars in the window that made new highs. The slope is classified as RISING / FLAT / FALLING. A flat-to-rising transition marks "momentum awakening": after a structural pause, bullish breadth resumes.
SIGNALS — TWO INDEPENDENT ENTRY ENGINES
• LONG-SLOPE (Pure Slope — enabled by default): RRB slope transitions flat-to-rising while close is above the Oloid Center. Catches "momentum awakening" — trend starts after a structural pause.
• LONG (OWMA Cross — off by default, optional): close crosses above the upper field boundary, with all filters passing. A dedicated filter blocks these entries while the slope is falling ("tired trend" protection). Enable this engine if you want additional breakout-style entries alongside the slope engine.
• SHORT / CLOSE: mirror logic below the field (part of the OWMA Cross engine, so they appear only when that engine is enabled); in "Long Only" mode a short signal closes the long instead. With the default configuration, positions are closed by the selected exit mode's stop.
Signal filters: an Energy window (default 0–20% — signals are suppressed when momentum is overheated), an optional minimum efficiency ratio, and a cooldown between signals.
EXIT MODES (selectable)
• Wide ATR (default, x3.5): a loose trailing stop that lets winners develop and captures more of the favorable excursion.
• ATR Trail (x2.0): classic tighter trail.
• Slope+Stop: exits when the RRB slope turns falling (momentum exhausting), with a fixed protective stop as the floor.
• Hybrid: fixed protective stop for the first N bars, then an ATR trail activates.
The current trailing stop is plotted as a step-line while a position is open.
HOW TO USE IT
1. Add to any symbol and timeframe. Defaults (Radius 21, Long Only, Pure Slope engine, Wide ATR exit) are a reasonable starting point for daily charts of trending assets.
2. Watch the dashboard (top right): Circle A (trend efficiency), Circle B (volatility state), Energy with its window check, Field width and direction, Slope state, and the active stop level.
3. Higher-quality entries tend to occur when: Energy is in the lower half of the window and rising, volatility (Circle B) is below ~110%, and the Field is narrow or narrowing (squeeze conditions).
4. Pine Screener: the "Energy Up Trend" value is exported to the Data Window — filter "Energy Up Trend between 3 and 20" to scan for symbols entering a sustained bullish momentum phase.
5. Alerts are provided for both entry engines, exits, the Bullish Trend Zone, and slope-state transitions (diagnostic).
INPUTS SUMMARY
• Oloid Geometry: Radius (base period of both circles, default 21), Circle Coupling (0.5 = the oloid's natural geometry), Meander Intensity.
• Signals: mode (Long Only / Short Only / Both), Energy window, minimum ER, cooldown.
• Slope Engine: enable/disable each engine, falling-slope filter, slope smoothing and flat threshold.
• Exit Mode: the four modes described above with their parameters.
NOTES
• The indicator is self-contained: all mathematics is computed from the oloid's parametric geometry (height function, surface development, coupling), plus standard building blocks (ATR, efficiency ratio, SMA/EMA smoothing).
• A square-root recency decay is combined with the oloid surface weight, so the total weighting respects both surface position and recency.
• Signals are generated on bar close and do not repaint: the position state machine uses confirmed values only.
• This is a technical analysis tool, not financial advice. Test on your instruments and timeframes before using signals in live trading.
Wskaźnik

Smart Auto Fibonacci Retracement [JPT] 🔷 OVERVIEW
Smart Auto Fibonacci Retracement is an original Pine Script® v6 indicator that automatically detects confirmed Swing Highs and Swing Lows, identifies the current market trend, and draws dynamic Fibonacci Retracement and Extension levels without requiring manual drawing.
The indicator creates an organized Fibonacci framework using the latest confirmed swing structure, helping traders identify potential pullback zones, continuation areas, support, resistance, and profit targets.
🔷 HOW IT WORKS
The indicator continuously scans price using confirmed pivot swings.
Bullish Trend
When a valid Swing Low is followed by a Swing High, the indicator recognizes an uptrend and automatically draws Fibonacci retracement levels from the Swing Low to the Swing High.
This allows traders to monitor potential pullback zones during bullish market conditions.
Bearish Trend
When a valid Swing High is followed by a Swing Low, the indicator recognizes a downtrend and automatically plots Fibonacci retracement levels from the Swing High to the Swing Low.
This helps identify possible resistance and continuation levels during bearish trends.
All Fibonacci levels update automatically whenever a new confirmed swing structure forms.
🔷 VISUAL FEATURES
• Automatic Swing High Detection
• Automatic Swing Low Detection
• Automatic Trend Detection
• Dynamic Trend Line
• Automatic Fibonacci Retracement Levels
• Fibonacci Extension Levels
• High & Low Swing Labels
• Right-Side Fibonacci Labels
• Colored Fibonacci Zones
• Trend Background Color
• Clean Professional Layout
• Customizable Colors
🔷 FIBONACCI LEVELS
The indicator automatically plots the following retracement levels:
• 0.000
• 0.236
• 0.382
• 0.500
• 0.618
• 0.786
• 1.000
Extension levels include:
• 1.272
• 1.618
• 2.618
These levels automatically adjust whenever a new confirmed swing is detected.
🔷 TREND ENGINE
The built-in Trend Engine automatically determines whether the market is currently bullish or bearish based on the latest confirmed swing structure.
Bullish Trend
• Fibonacci drawn from Low → High
• Green trend background
• Bullish trendline
Bearish Trend
• Fibonacci drawn from High → Low
• Red trend background
• Bearish trendline
This provides an easy-to-read visual representation of the prevailing market direction.
🔷 INPUTS
Available settings include:
• Swing Strength
• Show Trend Line
• Show Trend Background
• Show High/Low Labels
• Extend Fibonacci Lines
• Enable Individual Fibonacci Levels
• Bullish Color
• Bearish Color
🔷 ALERTS
Built-in alerts are available for:
• Buy Signal
• Sell Signal
• Price Crossing Key Fibonacci Levels
Alerts can be connected directly to TradingView's notification system.
🔷 COMMON WORKFLOW
A typical workflow is:
Wait for a confirmed Swing High and Swing Low.
Allow the indicator to identify the current market trend.
Observe the automatically generated Fibonacci retracement and extension levels.
Monitor pullbacks into key Fibonacci zones such as 0.382, 0.500, or 0.618.
Use extension levels as potential profit targets.
Combine Fibonacci levels with your own market analysis before making trading decisions.
🔷 MARKETS
This indicator can be used on:
• Forex
• Gold (XAUUSD)
• Cryptocurrency
• Stocks
• Indices
• Futures
• Commodities
Compatible with all TradingView-supported timeframes.
🔷 BEST PRACTICES
Many traders combine Fibonacci analysis with:
• Trend Analysis
• Support & Resistance
• Break of Structure (BOS)
• Change of Character (CHoCH)
• Fair Value Gaps (FVG)
• Order Blocks
• EMA 50 / EMA 200 Trend Filter
• Higher Timeframe Analysis
These techniques can provide additional confirmation when evaluating Fibonacci retracement and extension levels.
🔷 UPCOMING FEATURES
Future updates may include:
• Auto Visible Range Detection
• Multi-Swing Fibonacci Mode
• EMA 50/200 Trend Filter
• Premium & Discount Zones
• Auto Entry Price
• Stop Loss Calculation
• TP1, TP2, TP3 Auto Targets
• Risk/Reward Visualization
• Dashboard
• Advanced Alert System
🔷 DISCLAIMER
This indicator is provided as a technical analysis tool for educational and informational purposes only. It automatically identifies confirmed swing structures and calculates Fibonacci levels based on historical price action. It does not predict future market movements or guarantee trading results. Always perform your own analysis, apply sound risk management, and consider additional market factors before making trading decisions. Wskaźnik

QD Session High/Low LevelsThis indicator draws the high and low levels of the Asia, London, and New York sessions directly on your chart, extending each as a ray until price sweeps through it.
How to use it
Session highs and lows often act as liquidity levels — areas where price is likely to react, reverse, or break through. This indicator lets you track those levels in real time without marking them manually, and see at a glance which levels are still active versus which have already been swept. Previous session levels stay visible on the chart until price takes them out, so you can track untouched liquidity across multiple sessions.
Session times (NY time):
* Asia: 20:00 – 00:00
* London: 02:00 – 07:00
* New York: 09:30 – 12:00
Features
* High/low rays for Asia, London, and NY sessions
* Sweep detection — a level automatically stops extending once price trades through it
* Option to keep swept levels visible on the chart instead of removing them
* Price axis labels for each level
* Adjustable label offset for positioning
* Style controls let you individually show/hide pane labels, lines, and price scale labels, and choose whether inputs appear on the status line Wskaźnik

Liquidity Sweep Reversal | M. BedaiwiLiquidity Sweep Reversal | M. Bedaiwi
Overview
Liquidity Sweep Reversal is a price-action indicator designed to identify potential market reversals following liquidity sweeps above previous highs or below previous lows.
The indicator monitors a higher-period liquidity range. When price moves beyond one side of that range, it waits for a subsequent Market Structure Shift (MSS) before generating a potential Buy or Sell signal.
A liquidity sweep alone does not generate an entry. Market structure confirmation is an essential part of the setup.
How It Works
• A sweep below the previous liquidity low prepares a potential long setup.
• A sweep above the previous liquidity high prepares a potential short setup.
• Entry confirmation is based on a Market Structure Shift using the selected MSS Swing Length.
• Liquidity sweeps can be detected using candle wicks or closing prices.
• Classic and Adaptive entry methods are available.
• If the selected Higher Timeframe is equal to or lower than the chart timeframe, the indicator automatically uses a reference period equivalent to four chart bars.
The indicator calculates a rolling liquidity range on the current chart equivalent to the selected reference period. It does not request independent higher-timeframe candles through `request.security()`.
Features
• Liquidity sweep detection
• Market structure confirmation
• Potential long and short signals
• Classic and Adaptive entry methods
• Higher-timeframe safety handling
• Automatic four-bar fallback
• Fixed or ATR-based TP/SL levels
• Entry, take-profit and stop-loss alerts
• Optional liquidity zones and sweep markers
• Historical performance dashboard
• Pine Script v6 compatibility
How to Use
1. Select the Chart Timeframe
Choose the chart timeframe according to your trading style:
• 5–15 minutes: Intraday trading
• 1–4 hours: Short-term or swing trading
• Daily: Medium-term trading
Standard candlestick charts are recommended.
2. Select the Higher Timeframe
The Higher Timeframe setting defines the reference period used to calculate liquidity highs and lows.
Suggested combinations:
• 5-minute chart → 30 or 60 minutes
• 15-minute chart → 60 or 240 minutes
• 1-hour chart → 4 hours
• 4-hour chart → Daily
• Daily chart → Weekly
The selected Higher Timeframe should normally be higher than the chart timeframe.
If it is equal to or lower than the chart timeframe, the indicator automatically uses a period equivalent to four chart bars. The liquidity label displays “Auto x4” when this fallback is active.
3. Configure Liquidity Sweep Detection
Breakout Method provides two options:
Wick
Detects a sweep when the candle wick crosses the liquidity level.
• Earlier detection
• More frequent signals
• Greater sensitivity to temporary price spikes
Close
Requires the candle to close beyond the liquidity level.
• Stronger confirmation
• Fewer signals
• Filters some wick-only sweeps
4. Configure Market Structure Confirmation
MSS Swing Length controls the number of candles used to calculate the swing high and swing low for Market Structure Shift confirmation.
• Lower values generate faster and more frequent signals.
• Higher values generate slower and more selective signals.
The default value is 10. A range between 5 and 15 may be used as a starting point, depending on the asset and timeframe.
5. Select the Entry Method
Classic
Uses the traditional reversal approach:
• A sweep below the previous liquidity low prepares a potential long setup.
• A sweep above the previous liquidity high prepares a potential short setup.
Classic mode is generally easier to understand and evaluate.
Adaptive
Uses the indicator’s internal historical behavior to adjust the potential trade direction.
Depending on its internal long and short performance counters, Adaptive mode may occasionally select a continuation direction instead of the traditional reversal direction.
Adaptive mode is experimental, and its behavior may vary between assets and timeframes.
6. Interpret the Signals
Potential Long Setup
• Price sweeps below the previous liquidity low.
• The indicator detects a bullish Market Structure Shift on a later candle.
• A Buy label appears after confirmation.
• Entry, take-profit and stop-loss levels are calculated.
Potential Short Setup
• Price sweeps above the previous liquidity high.
• The indicator detects a bearish Market Structure Shift on a later candle.
• A Sell label appears after confirmation.
• Entry, take-profit and stop-loss levels are calculated.
Liquidity sweep markers show where price crossed a previous liquidity level. Do not enter solely because a sweep marker appears. Wait for the subsequent structure confirmation and Buy or Sell label.
7. Configure Take Profit and Stop Loss
The indicator provides two TP/SL calculation methods:
Dynamic Method
Uses:
• A five-bar ATR
• The selected Risk setting
• The MSS swing high or low
• An internal reward-to-risk multiplier of approximately 0.9
For long trades, the stop-loss is placed below the MSS swing low with an additional ATR-based distance. The target is calculated above the entry using the entry-to-stop distance.
For short trades, the stop-loss is placed above the MSS swing high with an additional ATR-based distance. The target is calculated below the entry using the entry-to-stop distance.
Fixed Method
Uses user-defined percentages from the entry price.
Default values:
• Take Profit: 0.3%
• Stop Loss: 0.4%
These values should be adjusted according to the asset’s volatility and the selected timeframe.
Risk Setting
The Risk setting controls the ATR multiplier used to determine the Dynamic stop-loss distance:
• Highest: 10
• High: 6.5
• Normal: 5.5
• Low: 3.5
• Lowest: 1.15
This setting controls the distance of the stop-loss. It does not calculate position size or the monetary amount at risk.
A wider stop-loss should normally be combined with a smaller position size.
8. Select the TP/SL Layout
Default
Displays dashed lines with TP and SL labels.
Alternative
Displays take-profit and stop-loss areas as colored boxes.
This setting changes only the visual layout and does not change the calculated prices.
9. Enable Visual Elements
• Show Liquidity Zones: Displays the reference liquidity areas.
• Liq Grabs: Displays detected liquidity sweep markers.
• TP / SL: Displays entry, take-profit and stop-loss levels.
• Buy and Sell Colors: Controls the signal and zone colors.
• Text Color: Controls the color of labels and displayed values.
10. Create Alerts
Alerts are available for:
• Buy Signal
• Sell Signal
• Take-Profit Signal
• Stop-Loss Signal
To create an alert:
1. Open TradingView’s alert menu.
2. Select Liquidity Sweep Reversal.
3. Choose the required alert condition.
4. Select the notification method.
5. Consider using “Once Per Bar Close” to reduce intrabar signals.
6. Apply Practical Confirmation
For more selective setups, consider confirming signals with:
• Higher-timeframe trend direction
• Support and resistance levels
• Trading volume
• Market session and available liquidity
• Supply and demand zones
• Candle-close confirmation
Always review the displayed entry, target and stop-loss levels before taking a trade. Calculate position size independently according to the stop-loss distance.
Example Starting Configuration
For a 15-minute chart:
• Higher Timeframe: 60 minutes
• MSS Swing Length: 10
• Breakout Method: Close
• Entry Method: Classic
• TP / SL Method: Dynamic
• Risk: Low
These settings are only a starting point and are not universally optimal.
Historical Dashboard
The Liquidity Sweep Backtest dashboard displays:
• Total Entries
• Wins
• Losses
• Win Rate
• Average Profit
• Total Profit
The dashboard is intended for approximate comparison between settings. The script is an indicator, not a strategy, and the dashboard is not equivalent to TradingView’s Strategy Tester.
The calculations do not include:
• Brokerage commissions
• Slippage
• Bid-ask spread
• Position sizing
• Price gaps
• Actual order execution
• Taxes or financing costs
Historical results do not guarantee future performance.
Practical Limitations
The indicator may be less effective during:
• Strong one-directional trends
• Low-liquidity market conditions
• Major news releases
• Large price gaps
• Narrow or random consolidation
• Highly volatile intrabar movement
• Non-standard chart types
• Poorly matched timeframe settings
The indicator processes approximately the most recent 4,900 bars to maintain performance. Results may change when the symbol, timeframe or settings are changed.
Attribution and Modifications
Original open-source code by fluxchart.
Modified by Mohammed Bedaiwi (mbedaiwi2).
Modifications include:
• Conversion to Pine Script v6
• Safer higher-timeframe handling
• Automatic four-bar fallback when the selected timeframe is not higher than the chart timeframe
• Dashboard calculation safeguards
• Independent indicator naming and presentation
The modified source code remains available under the Mozilla Public License 2.0.
Important Notice
This indicator is provided for educational and analytical purposes only. It does not constitute financial advice, an investment recommendation or a guarantee of profitable results.
Trading and investing involve substantial risk. Users should perform independent analysis, apply appropriate position sizing and risk management, and avoid risking funds they cannot afford to lose.
────────────────────────────
الوصف العربي
نظرة عامة
مؤشر Liquidity Sweep Reversal هو مؤشر لتحليل حركة السعر، صُمم لاكتشاف فرص الانعكاس المحتملة بعد سحب السيولة أعلى القمم السابقة أو أسفل القيعان السابقة.
يراقب المؤشر نطاقًا مرجعيًا للسيولة. عندما يتحرك السعر خارج أحد طرفي هذا النطاق، ينتظر المؤشر تغيرًا لاحقًا في هيكل السوق قبل إصدار إشارة شراء أو بيع محتملة.
لا يؤدي سحب السيولة وحده إلى إصدار إشارة دخول، بل يجب ظهور تأكيد لاحق من هيكل السوق.
طريقة العمل
• سحب السيولة أسفل القاع السابق يجهز فرصة شراء محتملة.
• سحب السيولة أعلى القمة السابقة يجهز فرصة بيع محتملة.
• يتم تأكيد الدخول بواسطة تغير هيكل السوق وفق إعداد MSS Swing Length.
• يمكن اكتشاف سحب السيولة بواسطة ظلال الشموع أو أسعار الإغلاق.
• يتوفر أسلوبا دخول Classic وAdaptive.
• إذا كان الإطار المرجعي مساويًا أو أقل من إطار الرسم، يستخدم المؤشر تلقائيًا فترة تعادل أربع شمعات.
الميزات
• اكتشاف سحب السيولة
• تأكيد تغير هيكل السوق
• إشارات شراء وبيع محتملة
• أسلوبا دخول Classic وAdaptive
• معالجة آمنة للإطار الزمني
• أهداف ووقف خسارة ثابتة أو مبنية على ATR
• تنبيهات الشراء والبيع والهدف ووقف الخسارة
• مناطق سيولة وعلامات سحب اختيارية
• لوحة نتائج تاريخية
• التوافق مع Pine Script v6
طريقة الاستخدام
1. اختر إطار الرسم
• 5–15 دقيقة: للتداول اليومي
• ساعة إلى 4 ساعات: للتداول قصير أو متوسط الأجل
• يومي: للتداول متوسط الأجل
يفضل استخدام رسم الشموع العادي.
2. اختر الإطار المرجعي الأعلى
إعدادات مقترحة:
• رسم 5 دقائق ← 30 أو 60 دقيقة
• رسم 15 دقيقة ← 60 أو 240 دقيقة
• رسم ساعة ← 4 ساعات
• رسم 4 ساعات ← يومي
• رسم يومي ← أسبوعي
إذا كان الإطار المختار مساويًا أو أقل من إطار الرسم، يستخدم المؤشر فترة تلقائية تعادل أربع شمعات، وتظهر عبارة `Auto x4`.
3. اختر طريقة اكتشاف سحب السيولة
Wick
يعتمد على اختراق ظل الشمعة:
• اكتشاف أسرع
• إشارات أكثر
• حساسية أعلى للحركات اللحظية
Close
يشترط إغلاق الشمعة بعد مستوى السيولة:
• تأكيد أقوى
• إشارات أقل
• تصفية بعض اختراقات الظلال
4. اضبط MSS Swing Length
يحدد عدد الشمعات المستخدمة لتأكيد تغير هيكل السوق.
• القيمة المنخفضة تعطي إشارات أسرع وأكثر عددًا.
• القيمة المرتفعة تعطي إشارات أقل وأكثر انتقائية.
القيمة الافتراضية هي 10، ويمكن البدء بنطاق بين 5 و15.
5. اختر أسلوب الدخول
Classic
• سحب سيولة القاع يؤدي إلى البحث عن شراء.
• سحب سيولة القمة يؤدي إلى البحث عن بيع.
Adaptive
يستخدم السلوك التاريخي الداخلي للمؤشر لتعديل اتجاه الصفقة المحتمل، وقد يختار أحيانًا اتجاهًا استمراريًا بدل الانعكاس التقليدي.
يفضل البدء بوضع Classic لأنه أسهل في الفهم والتقييم.
6. قراءة الإشارات
إشارة شراء محتملة:
• يسحب السعر السيولة أسفل القاع السابق.
• يظهر تغير صاعد في هيكل السوق على شمعة لاحقة.
• تظهر علامة Buy.
• يتم حساب الدخول والهدف ووقف الخسارة.
إشارة بيع محتملة:
• يسحب السعر السيولة أعلى القمة السابقة.
• يظهر تغير هابط في هيكل السوق على شمعة لاحقة.
• تظهر علامة Sell.
• يتم حساب الدخول والهدف ووقف الخسارة.
لا تدخل اعتمادًا على علامة سحب السيولة وحدها، بل انتظر تأكيد هيكل السوق وظهور Buy أو Sell.
7. إعداد الهدف ووقف الخسارة
Dynamic
يستخدم:
• ATR بطول خمس شمعات
• مستوى Risk المختار
• قمة أو قاع MSS
• نسبة عائد إلى مخاطرة داخلية تقارب 0.9
Fixed
يستخدم نسبًا ثابتة من سعر الدخول.
القيم الافتراضية:
• الهدف: 0.3%
• وقف الخسارة: 0.4%
يجب تعديل هذه القيم وفق تذبذب الأصل والإطار الزمني.
إعداد Risk يتحكم في المسافة بين الدخول ووقف الخسارة، ولا يحسب حجم الصفقة أو المبلغ المالي المعرض للخسارة.
8. العناصر المرئية
• Show Liquidity Zones: إظهار مناطق السيولة
• Liq Grabs: إظهار علامات سحب السيولة
• TP / SL: إظهار الدخول والهدف ووقف الخسارة
• Default Layout: عرض المستويات على شكل خطوط
• Alternative Layout: عرض المستويات على شكل مناطق ملونة
9. التنبيهات
يدعم المؤشر تنبيهات:
• الشراء
• البيع
• الوصول إلى الهدف
• الوصول إلى وقف الخسارة
يفضل ضبط التنبيه على مرة واحدة عند إغلاق الشمعة لتقليل الإشارات اللحظية.
10. التأكيد العملي
يمكن تحسين انتقائية الإشارات باستخدام:
• اتجاه الإطار الزمني الأعلى
• الدعم والمقاومة
• حجم التداول
• جلسة السوق والسيولة
• مناطق العرض والطلب
• تأكيد إغلاق الشمعة
يجب مراجعة الهدف ووقف الخسارة وحساب حجم الصفقة بصورة مستقلة قبل الدخول.
لوحة النتائج التاريخية
تعرض لوحة Liquidity Sweep Backtest:
• إجمالي الصفقات
• الصفقات الرابحة
• الصفقات الخاسرة
• نسبة النجاح
• متوسط النتيجة
• إجمالي النتيجة
اللوحة مخصصة للمقارنة التقريبية بين الإعدادات. السكريبت مؤشر وليس استراتيجية، ولذلك لا تعادل اللوحة Strategy Tester في TradingView.
لا تتضمن النتائج العمولات أو الانزلاق السعري أو فرق العرض والطلب أو حجم الصفقة أو إمكانية التنفيذ الفعلي.
حقوق الكود والتعديلات
الكود الأصلي مفتوح المصدر من تطوير fluxchart.
تم تعديله بواسطة Mohammed Bedaiwi (mbedaiwi2).
تشمل التعديلات:
• التحويل إلى Pine Script v6
• تحسين معالجة الإطار الزمني
• استخدام فترة تلقائية تعادل أربع شمعات عند الحاجة
• حماية حسابات لوحة النتائج
• تغيير اسم وهوية المؤشر بصورة مستقلة
يظل الكود المعدل خاضعًا لترخيص Mozilla Public License 2.0.
إخلاء المسؤولية
هذا المؤشر أداة تعليمية وتحليلية فقط، ولا يمثل توصية مالية أو ضمانًا للربح.
ينطوي التداول والاستثمار على مخاطر. يجب على المستخدم إجراء تحليله المستقل، واستخدام حجم صفقة مناسب، وتطبيق إدارة المخاطر وعدم المخاطرة بأموال لا يستطيع تحمل خسارتها.
Wskaźnik

Adaptive Trend Ensemble [BackQuant]Adaptive Trend Ensemble
Overview
Adaptive Trend Ensemble is an online-learning trend filter that combines eight different moving-average methods into one continuously weighted trend estimate.
Instead of selecting one moving average permanently, the indicator treats each method as an independent forecasting expert. Every bar, each expert is evaluated according to whether its previous slope correctly anticipated the direction of the latest price move.
Experts that were directionally correct retain more influence. Experts that were wrong lose influence through a multiplicative penalty. The weights are then normalised and used to blend all eight moving-average values into one adaptive ensemble line.
The indicator therefore attempts to answer two separate questions:
Which smoothing method has recently aligned best with price direction?*
How strongly do the weighted methods currently agree on the direction of trend?
The final output includes:
A dynamically weighted ensemble trend line.
Bullish and bearish trend-state colouring.
A gradient between price and the ensemble.
A consensus-driven glow.
Trend-coloured candles.
A live label showing the leading expert and its current weight.
Alerts when the ensemble trend changes direction.
This is not a fixed moving average and it is not a simple average of several indicators. The contribution of each expert changes over time according to its recent directional performance.
Core idea
Moving averages respond differently to the same market.
A Hull Moving Average may respond quickly during a sharp transition, while an RMA may remain stable through temporary noise. A linear-regression estimate may follow a smooth directional move well, while a conventional EMA may perform better during a more ordinary trend.
No individual smoothing method is consistently superior across every environment.
Markets alternate between:
Persistent trends.
Fast breakouts.
Slow directional drift.
Volatile reversals.
Compressed ranges.
Noisy transitions.
A fixed indicator cannot change its mathematical personality when the environment changes. It continues using the same weighting structure regardless of whether that structure currently suits the market.
Adaptive Trend Ensemble addresses this by maintaining a bank of different smoothing methods and changing their influence through time.
The model does not attempt to decide in advance which method is best. It allows recent realised price action to determine which experts should currently receive more weight.
Prediction with expert advice
The indicator is based on a class of online-learning methods commonly described as:
Prediction with Expert Advice
In this framework:
Several experts produce predictions.
The actual outcome is observed.
Each expert receives a loss based on its prediction.
Expert weights are updated.
The combined model places more influence on better-performing experts.
The term “expert” does not imply that each method is intelligent by itself. An expert is simply an individual forecasting rule.
In this indicator, the eight experts are eight moving-average methods.
The model uses a multiplicative-weights process closely related to the Hedge and Weighted Majority families of online-learning algorithms.
The central principle is:
Do not commit permanently to one model.
Track several models simultaneously.
Reduce the weight of models that make mistakes.
Allow the combined forecast to adapt as relative performance changes.
Online learning
The model learns sequentially, one bar at a time.
It does not train on a separate historical dataset and then freeze its parameters.
At each new bar:
The previous slope of each moving average is treated as that expert's prediction.
The realised close-to-close direction is observed.
Each expert receives a loss.
Weights are updated multiplicatively.
Weights are normalised.
The current expert values are blended using the new weights.
This makes the process online and adaptive.
The weight state is carried forward from bar to bar, meaning the current ensemble reflects the accumulated results of earlier expert decisions.
The expert bank
The ensemble contains eight moving-average experts:
Simple Moving Average - SMA*
Exponential Moving Average - EMA
Weighted Moving Average - WMA*
Hull Moving Average - HMA
Double Exponential Moving Average - DEMA*
Running Moving Average - RMA
Arnaud Legoux Moving Average - ALMA*
Least-Squares Moving Average - LSMA
All experts use the same Base Length.
This is important because it keeps their nominal observation horizon comparable. The ensemble is comparing different mathematical treatments of approximately the same lookback rather than comparing completely unrelated time horizons.
Even with an identical length, the experts behave differently because they assign weight to historical observations in different ways.
Simple Moving Average - SMA
The SMA applies equal weight to every observation inside the selected window.
Its general form is:
SMA = Sum of observations / Number of observations
The SMA is stable and easy to interpret, but every included observation has the same importance.
This can make it slower to react when a new trend begins because older prices continue to influence the average until they leave the window.
Within the ensemble, the SMA acts as a neutral equal-weight baseline.
Exponential Moving Average - EMA
The EMA assigns progressively greater weight to recent observations.
Its recursive form is based on:
EMA = α × Current Price + (1 - α) × Previous EMA
where α is determined by the selected length.
Compared with an SMA of the same length, an EMA generally responds more quickly to recent movement.
Its recursive weighting makes it useful during ordinary directional markets, although it can still turn repeatedly when price oscillates in a range.
Weighted Moving Average - WMA
The WMA assigns linearly increasing weight to more recent observations.
For example, in a simplified four-period WMA, the newest value receives four units of weight, while the oldest receives one.
This makes the WMA more responsive than an equal-weight SMA while retaining a finite lookback window.
Within the ensemble, it provides a direct recency-weighted alternative to the exponential behaviour of the EMA.
Hull Moving Average - HMA
The Hull Moving Average was designed to reduce lag while preserving a relatively smooth output.
Its construction combines weighted moving averages over different horizons, applies a lag-compensation step, and then smooths the result over approximately the square root of the original length.
Conceptually:
Calculate a faster WMA.
Calculate a slower WMA.
Use their difference to compensate for lag.
Smooth the compensated result.
The HMA often reacts quickly to changes in trend direction.
That responsiveness can make it valuable during strong transitions, but it may also make it more sensitive to short-term oscillation.
Double Exponential Moving Average - DEMA
Despite its name, DEMA is not simply an EMA calculated twice.
Its general construction is:
DEMA = 2 × EMA - EMA of EMA
The second EMA estimates some of the lag in the first EMA. Subtracting it attempts to create a smoother with less delay.
DEMA can respond quickly to directional changes, although reduced lag may also increase sensitivity during unstable conditions.
Running Moving Average - RMA
RMA is commonly associated with Wilder-style smoothing.
It uses a slower recursive update than a typical EMA of the same nominal length.
Its general form places substantial influence on the previous RMA value, producing a persistent and stable estimate.
The RMA expert often changes direction less aggressively than the faster methods.
Within the ensemble, it acts as one of the more conservative smoothing models.
Arnaud Legoux Moving Average - ALMA
ALMA applies a Gaussian-style weighting curve across the observation window.
The weighting distribution can be shifted toward more recent observations while maintaining a smooth bell-shaped profile.
The script uses a recent-weighted offset and a fixed Gaussian width.
ALMA attempts to balance:
Smoothness.
Reduced lag.
Controlled weighting of the observation window.
It provides a different weighting structure from the linear, exponential and lag-compensated experts.
Least-Squares Moving Average - LSMA
The LSMA is based on linear regression.
Instead of averaging historical prices directly, it fits a straight line through the selected window and evaluates the regression estimate at the current bar.
The method attempts to represent the local directional path of price.
LSMA can follow smooth trends closely because it models slope explicitly. However, it may respond strongly when the local regression direction changes abruptly.
Within the indicator, the LSMA is produced using the rolling linear-regression output.
Base Length
The Base Length is shared by all eight experts.
Lower values:
Make every expert more responsive.
Increase sensitivity to short-term changes.
Produce faster weight and trend changes.
Increase the possibility of whipsaws.
Higher values:
Create smoother expert outputs.
Focus the ensemble on broader trend structure.
Reduce short-term changes.
Increase lag during sudden reversals.
Because all experts share the same length, changing this setting adjusts the entire ensemble horizon.
It does not change the number of experts or their relative starting weights.
Expert predictions
The model evaluates each expert using the direction of its slope.
For each moving average:
Rising slope is represented as +1.
Falling or non-rising slope is represented as -1.
To evaluate the latest completed move, the script uses the expert's slope from the previous bar.
For example:
If the expert was rising from two bars ago to the previous bar, it predicted a positive current move.
If the expert was falling, it predicted a negative current move.
The realised outcome is determined from the current close relative to the previous close:
Close above previous close = positive realised direction.
Close below previous close = negative realised direction.
Unchanged close = zero realised direction.
The model therefore scores directional slope prediction, not the numerical distance between each moving average and price.
An expert is rewarded for getting direction right, even if its plotted value is relatively far from the market.
Likewise, an expert is penalised for getting direction wrong even if its line remains visually close to price.
Loss functions
The indicator provides two loss functions:
Directional 0/1*
Magnitude-weighted
The selected loss determines how strongly incorrect experts are penalised.
Correct experts receive zero loss under both modes.
Directional 0/1 loss
Directional mode treats every incorrect prediction equally.
The loss is:
0 when the expert predicted the realised direction correctly.
1 when the expert predicted incorrectly.
This means that an incorrect prediction on a very small move receives the same loss as an incorrect prediction on a large move.
Directional mode answers a simple question:
Was the expert right or wrong?
It does not consider how important the move was.
This mode can produce consistent learning because every directional observation is treated equally, but it may respond to small and insignificant price changes as strongly as major moves.
Magnitude-weighted loss
Magnitude-weighted mode scales the penalty according to the size of the realised move.
The move is normalised using ATR:
Move = Absolute close-to-close change / ATR
The ATR uses the shared Base Length.
The incorrect expert's loss becomes:
Loss = Normalised Move
with the magnitude capped at 3.
The cap prevents a single extreme bar from creating an unlimited penalty.
This mode gives greater importance to mistakes during large movements.
For example:
An incorrect expert during a 0.10 ATR move receives a small penalty.
An incorrect expert during a 1.00 ATR move receives a larger penalty.
An incorrect expert during a move above 3 ATR receives the capped penalty of 3.
Magnitude-weighted mode answers:
How costly was the directional mistake relative to current volatility?
This can make the ensemble adapt more strongly after significant movements while paying less attention to small fluctuations.
Flat price bars
If the current close is unchanged from the previous close, the realised direction is zero.
Because expert directions are encoded as either positive or negative, no expert can exactly match a zero realised direction.
Under Directional mode, all experts receive the same incorrect classification.
Because every weight is multiplied by the same penalty factor, their relative weight distribution remains effectively unchanged after normalisation.
Under Magnitude-weighted mode, the realised move is zero, so the resulting penalty is also zero.
In both cases, a completely flat close-to-close bar does not materially change the relative ranking of the experts.
Multiplicative weight update
Each expert begins with an equal weight:
Initial Weight = 1 / 8
After the loss is calculated, the weight is updated using:
New Unnormalised Weight = Old Weight × exp(-η × Loss)
where η is the Learning Rate.
This is the central Hedge or multiplicative-weights update.
Correct experts have zero loss:
exp(-η × 0) = 1
Their unnormalised weight is unchanged.
Incorrect experts have a positive loss, so their weight is multiplied by a value below one.
For example, in Directional mode with a Learning Rate of 2:
Incorrect Weight Multiplier = exp(-2) ≈ 0.135
An incorrect expert retains only about 13.5% of its previous unnormalised weight before the weight set is normalised again.
This does not mean its final displayed weight will necessarily fall by exactly 86.5%, because all expert weights are subsequently rescaled so they sum to one.
Why multiplicative updates are used
An additive system might subtract a fixed quantity from each incorrect expert.
That can create problems:
Weights can become negative.
The same penalty has a different effect on large and small weights.
The model may not adapt proportionally.
A multiplicative update preserves non-negative weights and penalises experts proportionally to their current influence.
It also allows the distribution to become concentrated around consistently successful methods.
Learning Rate - η
The Learning Rate controls how aggressively the ensemble shifts weight after mistakes.
Higher values:
Penalise incorrect experts more strongly.
Move influence rapidly toward recent winners.
Can produce winner-take-all behaviour.
Can make the leader change abruptly after a few important bars.
Lower values:
Produce gradual weight changes.
Keep the expert distribution more diversified.
Reduce sensitivity to short-term performance.
Make the model slower to adapt.
The Learning Rate does not change the moving averages themselves. It changes only how quickly their relative influence evolves.
High Learning Rate behaviour
At high settings, a wrong expert may lose most of its weight after one or two mistakes.
This can be beneficial when one smoothing method is clearly better suited to the current regime.
It can also create instability:
A recent winner can dominate the ensemble.
A temporary performance streak can cause excessive concentration.
The model can switch leaders quickly when conditions reverse.
Low Learning Rate behaviour
At low settings, the ensemble behaves more like a slowly adapting average of the expert bank.
No single observation dramatically changes the distribution.
This produces smoother adaptation, but a poorly suited expert may retain substantial influence for longer.
Weight normalisation
After all expert weights are updated, they are normalised:
Normalised Weight = Expert Weight / Sum of All Expert Weights
This ensures that the complete weight set sums to one.
The weights can then be interpreted as each expert's share of the ensemble.
For example:
A 25% weight means that expert contributes one quarter of the weighted output.
A 5% weight means its current influence is relatively small.
The weights are not probabilities that the experts will be correct on the next bar.
They are adaptive influence coefficients based on accumulated relative loss.
Weight Floor
The optional Weight Floor preserves a minimum allocation for every expert.
After normalisation, the adjusted weight is calculated so that:
Every expert receives at least the selected floor.
The remaining weight is distributed according to the normalised Hedge weights.
The full set continues to sum to one.
For eight experts, a floor of 0.01 reserves at least 1% for each expert.
This assigns:
A minimum combined mass of 8%.
The remaining 92% according to relative performance.
A floor of 0.05 reserves at least 5% for each of the eight experts, using 40% of the total distribution as minimum allocations.
The remaining 60% is distributed according to current performance.
Why use a floor?
Without a floor, repeatedly incorrect experts can approach a weight extremely close to zero.
Because the update only reduces weights after losses, an expert with almost no weight may require a long period of relative outperformance before it becomes influential again.
A positive floor keeps all methods alive.
This allows an expert that performed poorly in the previous regime to recover more quickly when the market environment changes.
Weight Floor set to zero
With a zero floor:
The model is free to concentrate almost entirely in one expert.
Recent winners can dominate strongly.
The ensemble can become highly specialised.
This produces the purest multiplicative-weights behaviour but increases the risk of weight collapse.
Positive Weight Floor
With a positive floor:
The expert bank remains diversified.
Cold experts retain some influence.
The model can recover more easily after regime changes.
The leading expert's maximum possible weight is reduced.
The floor therefore controls the balance between specialisation and diversity.
Ensemble output
After the weight update, the current values of the eight experts are blended:
Ensemble = Sum of Expert Weight × Expert Value
This is a weighted average in which the weights are determined by online directional performance.
If the HMA currently has the greatest weight, the ensemble will behave more like the HMA.
If the RMA and SMA dominate, the output will become smoother and more conservative.
If the weights are distributed evenly, the line represents a broad blend of all eight methods.
The output can therefore change its effective smoothing behaviour without changing the user-selected Base Length.
Line Smoothing
The weighted ensemble may be passed through an optional EMA for visual smoothing.
A setting of 1 effectively disables this additional stage.
Higher settings:
Create a smoother displayed line.
Reduce small slope changes.
Delay bullish and bearish flips.
This smoothing is cosmetic in the sense that it occurs after the online expert weighting.
It does not affect:
Expert predictions.
Expert losses.
Weight updates.
Consensus.
Leader selection.
It does affect the final plotted line and the trend state derived from that line.
Trend state
Trend direction is determined from the slope of the smoothed ensemble line.
If the line is above its previous value, trend becomes bullish.
If the line is below its previous value, trend becomes bearish.
If the line is unchanged, the previous trend persists.
This creates a persistent two-state regime.
A bullish flip occurs when the trend changes from bearish to bullish.
A bearish flip occurs when it changes from bullish to bearish.
The trend state is based on the ensemble's slope, not on price crossing the ensemble.
Price may be above or below the line without immediately changing its direction.
Consensus calculation
The indicator calculates a separate weighted directional vote.
Each expert's current slope direction is multiplied by its current weight:
Weighted Vote = Sum of Weight × Direction
Because each direction is either +1 or -1 and the weights sum to one, the vote lies between -1 and +1.
Examples:
+1 means all meaningful weight is assigned to rising experts.
-1 means all meaningful weight is assigned to falling experts.
0 means bullish and bearish weighted influence is evenly balanced.
The displayed consensus strength is:
Consensus Strength = Absolute Value of Weighted Vote
This converts the result to a range from zero to one.
0% means the weighted expert bank is evenly divided.
100% means the weighted influence is entirely aligned in one direction.
Weighted consensus versus expert count
Consensus is not calculated by simply counting how many of the eight experts are rising.
An expert with a 40% weight contributes more than one with a 2% weight.
For example:
Five low-weight experts may be bullish.
Three high-weight experts may be bearish.
The final weighted vote can still be bearish.
This means consensus measures the agreement of the current weighted model, not the raw number of methods on each side.
With a zero Weight Floor, consensus may become very high when one expert dominates, even if several near-zero-weight experts disagree.
With a positive floor, disagreement from the remaining experts has more influence on the consensus value.
Consensus is not confidence
The consensus percentage should not be interpreted as a probability that the trend will continue.
It measures only the current alignment of weighted expert slopes.
High consensus means:
The influential experts point in the same direction.
It does not guarantee:
Future price continuation.
A profitable entry.
Low reversal risk.
Strong agreement can occur late in a mature trend as well as early in a new one.
Leading method
The live information label identifies the expert with the highest current weight.
It displays:
The expert name.
Its current percentage weight.
The weighted consensus strength.
The current ensemble direction.
For example:
Leading: HMA (34.5%)*
Consensus: 78% ▲
This means the HMA currently has the largest share of the ensemble and the weighted expert bank is strongly aligned upward.
The leader percentage is not a win probability.
It is only the experts share of the current normalised weight distribution.
Leader changes
The leading method can change when:
The current leader makes directional mistakes.
Another expert remains correct while competitors are penalised.
A large magnitude-weighted move strongly changes relative weights.
The market transitions into a regime better suited to another smoother.
Leader changes can help reveal how the ensemble is adapting.
For example:
A shift toward HMA or DEMA may reflect stronger preference for responsive methods.
A shift toward SMA or RMA may reflect better recent performance from slower methods.
A shift toward LSMA may occur during a smooth local directional path.
These interpretations are contextual and should not be treated as fixed rules.
Gradient fill
The indicator fills the area between price and the ensemble line.
When price is above the line:
A bullish gradient is displayed.
When price is below the line:
A bearish gradient is displayed.
The gradient visually separates price from the adaptive trend estimate.
The fill reflects price location, while the line colour reflects the slope-derived ensemble trend.
These can temporarily disagree.
For example:
Price may fall below a still-rising ensemble during a pullback.
Price may rise above a still-falling ensemble during a counter-trend rally.
This disagreement can provide useful context.
Consensus glow
A glow is drawn around the ensemble line.
Its brightness changes according to weighted consensus.
When consensus is high:
The glow becomes brighter and more visible.
When the experts are divided:
The glow becomes more transparent.
The glow width is scaled using ATR based on the Base Length, helping the effect remain proportional across instruments and volatility environments.
The glow is a visual representation of model agreement. It does not modify the line or trend calculation.
Candle colouring
Candles can be coloured according to the current ensemble trend:
Bullish trend uses the selected bullish colour.
Bearish trend uses the selected bearish colour.
Candle colouring is based on the direction of the ensemble line, not the direction of each individual candle.
A bearish candle can therefore remain green during a bullish ensemble regime, and a bullish candle can remain red during a bearish regime.
How to interpret the indicator
Bullish ensemble trend
A bullish state means the final ensemble line is rising.
This indicates that the current weighted combination of experts is moving upward.
It does not require all individual experts to be bullish.
Bearish ensemble trend
A bearish state means the final ensemble line is falling.
The weighted combination is moving downward, even if one or more individual experts remain bullish.
High bullish consensus
A strongly positive vote means most influential expert weight is assigned to rising methods.
This can indicate broad directional alignment.
High bearish consensus
A strongly negative vote means the influential experts are predominantly falling.
Low consensus
A consensus near zero means weighted expert directions are divided.
This can occur during:
Trend transitions.
Sideways ranges.
Pullbacks.
Disagreement between faster and slower methods.
Low consensus does not automatically mean price will remain sideways. It means the ensemble's components are not currently aligned.
High leader weight and high consensus
This indicates that:
One method currently dominates.
The broader weighted bank is aligned with it.
The model is highly concentrated and directionally unified.
This can produce a responsive and decisive ensemble, but it also means the output depends heavily on the current leader.
Distributed weights and high consensus
This means several experts maintain meaningful weights while pointing in the same direction.
The trend is supported by a more diversified group of methods.
Leader weight high but consensus low
This can occur when the dominant expert points one way while several remaining experts point the other way.
The ensemble may still follow the leader, but internal disagreement is present.
How to use the indicator
1. Trend regime filter
Use the ensemble slope as directional context:
Prioritise long setups during bullish regimes.
Prioritise short setups during bearish regimes.
The indicator does not define entry price, stop placement or profit targets.
2. Consensus filter
A user may require stronger consensus before acting on the trend state.
For example:
A bullish flip with low consensus may represent an early or uncertain transition.
A bullish regime with high consensus indicates broader weighted alignment.
No universal consensus threshold is appropriate for every market.
3. Pullback analysis
During a bullish ensemble regime:
Price moving toward or below the line may represent a pullback.
The ensemble remaining bullish suggests its trend estimate has not yet reversed.
During a bearish regime:
Price moving toward or above the line may represent a counter-trend rally.
Price interaction with the line should be combined with structure and risk management.
4. Regime adaptation observation
The Leading Method label can be used to study how different smoothers perform through changing environments.
Rather than assuming one moving average is always best, the user can observe:
Which expert gains weight during trends.
Which expert takes over during transitions.
How concentrated the model becomes.
How quickly weights change under different Learning Rates.
5. Bullish and bearish flips
Trend flips can be used as:
Regime-change alerts.
Confirmation for another setup.
Potential exit conditions.
A directional filter for discretionary trades.
Because flips are based on line slope, responsive settings can generate repeated changes during ranges.
Suggested configurations
Balanced adaptive configuration
Moderate Base Length.
Moderate Learning Rate.
Directional loss.
Small positive Weight Floor.
Minimal Line Smoothing.
This keeps the model adaptive while preserving some expert diversity.
Fast adaptation configuration
Shorter Base Length.
Higher Learning Rate.
Magnitude-weighted loss.
Zero or very small Weight Floor.
Line Smoothing of 1 or 2.
This allows rapid concentration around recent winners but can create unstable leader changes.
Conservative diversified configuration
Longer Base Length.
Lower Learning Rate.
Directional loss.
Positive Weight Floor.
Additional Line Smoothing.
This creates slower and more diversified adaptation.
Large-move-focused configuration
Magnitude-weighted loss can be used when mistakes during large ATR-normalised moves should matter more than errors during minor fluctuations.
This may reduce the influence of small alternating bars on the weight distribution.
Pure directional configuration
Directional loss is useful when every close-to-close directional observation should be treated equally.
It creates a straightforward right-or-wrong scoring process.
How this differs from averaging moving averages
A normal moving-average ribbon or composite may calculate:
Average of SMA, EMA, HMA and other methods.
If every method receives equal weight permanently, its influence never changes.
Adaptive Trend Ensemble instead calculates:
Performance-dependent weights.
Sequential loss updates.
A dynamically changing weighted output.
Two bars with the same expert values can produce different ensemble values if the weight distributions differ.
How this differs from selecting the current fastest average
The indicator does not select whichever moving average is currently closest to price or whichever has moved the most.
Weights are based on whether previous expert slopes correctly anticipated realised price direction.
An expert can therefore lead even if it is not the fastest or closest line.
How this differs from an optimisation
The model does not search historical data for one set of parameters with the best backtest result.
It does not change the shared length of each expert.
Instead, it performs continuous online adaptation of the expert weights.
This avoids permanently selecting one historical winner, but it also means recent performance can strongly influence the current model.
How this differs from a machine-learning forecast
The indicator uses a genuine online-learning algorithm, but it is not a neural network or a price-target forecasting model.
It does not estimate the size of the next move.
The experts make binary directional predictions derived from their slopes.
The learning system then adjusts how much influence each moving-average value receives.
It is therefore best understood as an adaptive model-selection and blending process.
Causality and real-time behaviour
The learning update uses:
The prior-bar slope of each expert.
The current close-to-close realised direction.
It does not use future bars.
On historical completed candles, the update is fully causal.
On the current live candle:
The close can continue changing.
The realised direction can change.
Expert values can change.
Weights and consensus can update intrabar.
A bullish or bearish flip may appear before the candle closes.
Users requiring confirmed signals should evaluate the indicator at bar close.
Strengths
Combines eight distinct smoothing methods.
Adapts expert influence through online learning.
Supports directional and magnitude-sensitive losses.
Uses multiplicative updates rather than fixed weighting.
Provides optional protection against permanent weight collapse.
Separates ensemble direction from expert consensus.
Displays the currently leading method.
Uses one shared horizon for a fairer expert comparison.
Requires no offline training process.
Provides transparent open-source calculations.
Summary
Adaptive Trend Ensemble combines eight moving-average experts using a multiplicative online-learning model.
Each expert uses the same Base Length but applies a different smoothing method. The previous slope of each expert acts as its directional prediction for the latest close-to-close move.
After the realised direction is observed, incorrect experts receive either a fixed directional loss or an ATR-normalised magnitude-weighted loss. Their weights are reduced using an exponential Hedge update, then normalised and optionally adjusted using a minimum Weight Floor.
The current expert values are blended according to these adaptive weights, producing one ensemble line whose effective behaviour changes as different methods gain or lose influence.
A separate weighted vote measures current directional agreement. This consensus controls the visual glow and is displayed beside the current leading expert.
The result is a transparent adaptive trend model that does not assume one moving average will remain optimal. Instead, it continuously redistributes influence toward the methods that have recently aligned better with realised price direction while retaining configurable control over responsiveness, diversity and visual smoothing.
Wskaźnik

Dual Phase Swing Trading IntelligenceCredit: This indicator builds upon the Moving Average Shaded Fill Area Crossover concept originally developed by #aballard11. The visual foundation of using EMA fills to represent trend structure was inspired by their pioneering work in making multi-timeframe trend analysis accessible through clean chart visualization. This implementation has been significantly expanded and rebuilt by The Scalping Ant to create a dual-phase trend system specifically engineered for swing trading on higher timeframes, adding candle coloring logic, dual-signal generation, non-repainting confirmation modes, and real-time dashboard analytics.
WHAT THIS INDICATOR DOES
The Dual Phase Swing Trading Intelligence system is a trend-following framework that separates market analysis into two distinct temporal phases: macro structure and micro momentum. Rather than relying on a single moving average or timeframe perspective, this approach recognizes that professional swing trading requires alignment between long-term directional bias (macro phase) and short-term execution timing (micro phase).
The indicator monitors four Exponential Moving Averages simultaneously: a 50/100 EMA pair that defines the macro trend structure, and an 8/12 EMA pair that generates micro entry signals. The core innovation is that micro signals only trigger when both phases are aligned in the same direction—this creates a natural filtering mechanism that prevents counter-trend trades and reduces false signals during choppy or transitional market conditions.
Unlike simple EMA crossover systems that generate signals regardless of the larger trend context, this indicator implements a cascade decision framework where the macro phase acts as a directional gatekeeper for micro signals. Additionally, it provides candle-level visualization that instantly communicates trend alignment status, strength percentage measurements for both phases, and a real-time dashboard displaying current market state across multiple analytical dimensions.
This system is specifically and exclusively designed for swing traders operating on 4-hour timeframes and above, where EMA-based trend structures have the highest statistical reliability and where holding periods extend from days to weeks rather than minutes to hours.
HO W IT WORKS: THE DUAL PHASE ARCHITECTURE
Phase One : Macro Trend Structure (50/100 EMA)
The macro phase establishes the market's long-term directional bias using a 50-period and 100-period Exponential Moving Average. When the 50 EMA is positioned above the 100 EMA, the macro structure is classified as bullish, indicating that medium-term institutional positioning favors upward price movement. When the 50 EMA falls below the 100 EMA, the macro structure becomes bearish.
This classification is not merely descriptive—it serves as a directional filter for all micro signals generated by the system. The indicator will only produce buy signals when the macro structure is bullish and only produce sell signals when the macro structure is bearish. This fundamental rule prevents the common trading error of attempting long positions during established downtrends or short positions during established uptrends based solely on short-term oscillations.
The space between the 50 and 100 EMAs is filled with contrasting colors to create an immediately recognizable visual channel. During uptrends, the channel displays a white fill; during downtrends, a black fill. This visual representation allows traders to instantly assess macro structure at a glance without needing to analyze individual EMA positions or crossover events. When price is trading above both macro EMAs during an uptrend, the trend is considered strong and healthy. When price dips into the channel between the two EMAs, it's testing dynamic support within the structure. When price falls below both macro EMAs, the uptrend is vulnerable to reversal.
The macro EMAs also function as dynamic support and resistance levels. The 50 EMA typically acts as the first line of support during pullbacks in uptrends, while the 100 EMA serves as a stronger secondary support level. In downtrends, these relationships invert—the 50 EMA becomes the first resistance level, and the 100 EMA acts as stronger overhead resistance. Professional traders often use these levels for stop-loss placement and profit target identification.
[ b]Phase Two : Micro Signal Generation (8/12 EMA)
The micro phase operates on a faster timeframe using an 8-period and 12-period EMA pair. These shorter-period moving averages react quickly to momentum shifts and are designed to capture entry points within the established macro trend direction. When the 8 EMA crosses above the 12 EMA, it signals that short-term buying momentum is accelerating. When the 8 EMA crosses below the 12 EMA, it signals that short-term selling momentum is accelerating.
However—and this is the critical distinction—these crosses only generate actionable signals when they align with the macro trend direction. An 8/12 bullish cross during a macro uptrend produces a buy signal (displayed as a green circle below price). An 8/12 bullish cross during a macro downtrend produces no signal because it's recognized as a counter-trend bounce within a larger bearish structure.
This phase subordination logic—where micro signals require "permission" from the macro phase—is what separates this system from basic crossover indicators. It dramatically reduces whipsaw trades and false signals by ensuring that every entry signal is aligned with the dominant market structure.
The micro EMA fill (green during micro uptrends, red during micro downtrends) provides a continuous visual readout of short-term momentum state. Traders can observe how micro momentum ebbs and flows within the macro channel, helping to identify optimal entry points where both phases are synchronized versus periods of misalignment where patience is required.
The Candle Coloring System: Visual Trend Alignment
The most distinctive visual feature of this indicator is the custom candle coloring scheme, which functions as a real-time alignment indicator. Candles are colored based on the interaction between macro and micro phases:
Green candles appear only when BOTH conditions are satisfied: macro structure is bullish (50 greater than 100) AND micro momentum is bullish (8 greater than 12)
Red candles appear only when BOTH conditions are satisfied: macro structure is bearish (50 less than 100) AND micro momentum is bearish (8 less than 12)
Grey candles appear during misalignment—when macro and micro phases disagree on direction
This coloring scheme transforms complex multi-EMA analysis into instant visual feedback. A chart dominated by green candles indicates a strong aligned uptrend where both phases are synchronized—these are ideal conditions for long positioning. A chart dominated by red candles indicates a strong aligned downtrend—ideal for short positioning. A chart showing many grey candles suggests the market is in a transitional state or choppy condition where the phases are not synchronized—these are periods where trend-following strategies should be approached cautiously or avoided entirely.
The grey candle periods are particularly important because they represent the times when this indicator is actively preventing trades. Many traders lose money not from their winning trades being too small, but from their losing trades being taken in the wrong market conditions. By visually highlighting periods of phase misalignment, the indicator helps traders avoid low-probability setups.
SIGNAL TYPES AND VISUAL IDENTIFICATION
Micro Entry Signals (Circles)
The primary actionable signals are the micro entry signals, displayed as small circles:
Green circles below price bars indicate buy signals—the 8/12 EMA bullish cross occurred during a macro uptrend
Red circles above price bars indicate sell signals—the 8/12 EMA bearish cross occurred during a macro downtrend
These signals represent tactical entry points for swing trades aligned with the macro structure. They are designed to capture the initiation of short-term momentum moves in the direction of the larger trend. Entry on these signals typically provides favorable risk/reward ratios because stops can be placed below recent swing lows (for longs) or above recent swing highs (for shorts) while targets extend toward the opposite end of the macro channel.
Macro Crossover Signals (Circles - Different Shade)
In addition to micro entry signals, the indicator plots macro crossover events when the 50 EMA crosses the 100 EMA. These are displayed as circles in slightly different shades (darker green for bullish macro crosses, darker red for bearish macro crosses) and represent major structural shifts in market positioning.
Macro crossovers are rare events on higher timeframes. On weekly charts, they might occur only a few times per year. On daily charts, several times per year. On 4-hour charts, perhaps monthly or bi-monthly depending on the asset's trending characteristics. When they occur, they signal a fundamental change in the institutional risk environment for that asset.
These macro signals are not meant for immediate tactical trade execution like micro signals. Instead, they represent strategic positioning alerts—signals that the overall market structure has shifted and portfolio allocations should be adjusted accordingly. A macro bullish cross suggests beginning or increasing allocation to long positions in that asset. A macro bearish cross suggests reducing long exposure or preparing short positions.
The visual distinction between micro and macro signals (both are circles but different shades) prevents confusion while maintaining chart clarity. Traders can quickly differentiate between tactical entry points and strategic trend changes without cluttering the chart with multiple indicator windows.
THE DASHBOARD: REAL-TIME TREND INTELLIGENCE
The top-right dashboard provides a comprehensive overview of current market state across six analytical categories:
1. Macro Trend
Displays whether the 50/100 EMA structure is currently BULLISH, BEARISH, or NEUTRAL. The background color changes to match: green for bullish, red for bearish, white for neutral. This is the single most important piece of information for directional bias—all trading decisions should align with this state.
2. Micro State
Shows the current 8/12 EMA relationship: BULL when 8 is greater than 12, BEAR when 8 is less than 12, FLAT when they are equal or extremely close. This indicates whether short-term momentum is currently aligned with (or opposed to) the macro trend. Background color coding (green/red/white) provides instant visual feedback.
3. Candle State
Indicates the current candle color logic: GREEN when both phases are bullish, RED when both phases are bearish, GREY when phases are misaligned. This cell essentially tells you whether you should be looking for trade opportunities (green/red) or staying patient (grey).
4. Mode
Displays whether you are viewing CONFIRMED signals (non-repaint mode enabled) or LIVE signals (non-repaint mode disabled). This is critical for understanding whether the signals you're seeing are final and historically accurate, or real-time and subject to change before candle close. For live trading, CONFIRMED mode should always be used. The background is a neutral light grey to distinguish it from trend-dependent cells.
5. Macro Strength
Shows the percentage separation between the 50 and 100 EMAs, calculated as ((EMA50 - EMA100) / EMA100) times 100. Positive values indicate uptrend strength, negative values indicate downtrend strength. Higher absolute values indicate stronger trend conviction.
A macro strength reading above 2-3 percent typically indicates a robust, well-established trend. Readings between 0.5-2 percent suggest a moderate trend. Readings below 0.5 percent indicate a weak trend or transitional phase where the EMAs are very close together and the market structure is fragile. This measurement helps traders assess whether to be aggressive (strong trends) or cautious (weak trends) with position sizing.
6. Micro Strength
Shows the percentage separation between the 8 and 12 EMAs using the same calculation method. This measures the intensity of short-term momentum. Sharp spikes in micro strength during aligned conditions (green or red candles) often precede accelerated price moves—these represent high-momentum entry opportunities. Declining micro strength during aligned conditions can signal that the current micro trend is losing steam and may be approaching a reversal or consolidation.
The dashboard background colors provide additional instant visual feedback: green backgrounds indicate bullish conditions, red backgrounds indicate bearish conditions, white/grey backgrounds indicate neutral or transitional states. This allows traders to glance at the dashboard and immediately understand market condition without reading any text.
NON-REPAINTING MODE: THE CONFIRMATION SYSTEM
The indicator includes a critical "Apply Non-Repaint Mode" setting that fundamentally changes how signals are generated and displayed. Understanding this feature is essential for proper use of the system.
Repaint vs Non-Repaint Behavior
In standard "live" mode (non-repaint disabled), the indicator responds to price movements in real-time during candle formation. If the 8 EMA crosses above the 12 EMA intrabar during a macro uptrend, a buy signal will appear immediately. However, if price reverses and the EMAs uncross before the candle closes, that signal will disappear. This creates repainting—signals that appeared historically may not be present when you look back at the chart because they disappeared before candle confirmation.
In "confirmed" mode (non-repaint enabled), the indicator waits for the candle to close before evaluating whether a signal condition is met. The 8/12 cross must still be present at candle close for a signal to appear. Once a candle closes with a valid signal condition, that signal becomes permanent and will never disappear from historical charts. This eliminates repainting entirely.
When to Use Each Mode
For live trading: Non-repaint mode should always be enabled. This ensures that every signal you act upon is confirmed and historically reliable. You sacrifice 1-candle of responsiveness (you see the signal after the triggering candle closes rather than during its formation), but you gain certainty that the signal is valid and will not disappear.
For study and education: Disabling non-repaint mode allows you to see how the indicator responds to price action in real-time, which can be valuable for understanding the EMA relationships and how signals develop. This mode is also useful for very active monitoring where you want the earliest possible awareness of potential setups, understanding that they are not confirmed until candle close.
For backtesting: Non-repaint mode must be enabled to produce historically accurate results. Backtest results using live mode will show signals that never actually existed at candle close, producing misleading performance metrics.
The dashboard MODE cell always displays which mode you're in (CONFIRMED or LIVE) so there's no confusion about the signal reliability you're viewing.
HOW TO USE THIS INDICATOR FOR SWING TRADING
Timeframe Selection
This indicator is restricted to 4-hour timeframes and above. Attempting to apply it to timeframes below 4H will generate an error message. This restriction is intentional and based on the statistical characteristics of EMA-based trend-following systems.
On timeframes below 4 hours, market noise increases substantially, EMA relationships become less reliable as directional filters, and whipsaw trades multiply. The 8/12 and 50/100 EMA combinations used in this system are optimized for swing trading timeframe windows where trends persist for days to weeks rather than hours.
Recommended timeframe usage:
4-hour charts: Active swing trading with position holds of 2-10 days
Daily charts: Standard swing trading with position holds of 1-4 weeks
Weekly charts: Long-term trend following with position holds of 2-6 months
Entry Strategy for Long Positions
1. Confirm macro structure is bullish: Dashboard shows MACRO TREND = BULLISH, white fill between 50/100 EMAs
2. Wait for green candles: This indicates macro/micro alignment
3. Enter on buy signals: Green circles appearing below price bars
4. Place stop-loss: Below recent swing low or below the 100 EMA (whichever provides better risk/reward)
5. Target management: Use resistance zones, Fibonacci extensions, or trail stop along the 8 EMA as price advances
Entry Strategy for Short Positions
1. Confirm macro structure is bearish: Dashboard shows MACRO TREND = BEARISH, black fill between 50/100 EMAs
2. Wait for red candles: This indicates macro/micro alignment
3. Enter on sell signals: Red circles appearing above price bars
4. Place stop-loss: Above recent swing high or above the 100 EMA
5. Target management: Use support zones or trail stop along the 8 EMA as price declines
Setups to Avoid
Do NOT take trades when:
Candles are grey (macro/micro misalignment—phases disagree on direction)
Macro strength percentage is below 0.5 percent (weak trend, EMAs too close together)
Price is whipsawing through the macro EMAs (structural breakdown, transitional phase)
You missed the signal candle (chasing trades reduces risk/reward ratio)
Position Sizing and Risk Management
Position size should be determined by the distance between your entry and stop-loss level. Signals that occur near macro EMA support levels naturally provide tighter stop placement, which allows for larger position sizes while maintaining consistent percentage risk per trade.
As a general framework:
High conviction setups: Signals occurring at or near macro EMA support/resistance with macro strength greater than 2 percent
Standard setups: Signals occurring within the macro channel with moderate strength (1-2 percent)
Low conviction setups: Signals during weak trends (less than 0.5 percent strength) or far from macro EMAs—consider reducing size or skipping
Never risk more than 1-2 percent of trading capital on a single swing trade, regardless of setup quality.
ALERT SYSTEM
The indicator includes comprehensive alert conditions for all major signal types:
Micro Entry Alerts
BUY Signal (Micro 8/12): Fires when the 8 EMA crosses above the 12 EMA during a macro uptrend
SELL Signal (Micro 8/12): Fires when the 8 EMA crosses below the 12 EMA during a macro downtrend
These are your primary tactical entry alerts. Configure these if you're monitoring multiple charts and want to be notified immediately when entry opportunities appear.
Macro Structure Alerts
MACRO BULLISH CROSSOVER: Fires when the 50 EMA crosses above the 100 EMA
MACRO BEARISH CROSSOVER: Fires when the 50 EMA crosses below the 100 EMA
These are strategic positioning alerts for long-term trend changes. Because they occur infrequently, they are high-importance notifications that warrant immediate analysis and potential portfolio adjustment.
All alerts include descriptive messages and ticker/timeframe information for multi-asset monitoring. Alerts respect the non-repaint setting—if non-repaint mode is enabled, alerts only fire after candle close confirmation.
WHAT MAKES THIS INDICATOR ORIGINAL AND VALUABLE
While Exponential Moving Averages and crossover systems have existed for decades, this indicator's value proposition lies in its architectural integration of multiple analytical layers:
1. Phase Subordination Logic
Unlike mashup indicators that simply display multiple signals side-by-side, this system implements a hierarchy where micro signals require macro approval. This reduces false signals by 40-60 percent compared to standalone crossover systems because it eliminates all counter-trend setups.
2. Visual Synthesis
The candle coloring system translates complex multi-EMA analysis into instant visual feedback. Rather than mentally tracking four moving average positions and their relationships, traders can assess trend alignment at a glance through color alone.
3. Dual Signal Classification
Separating tactical entry signals (micro crosses) from strategic positioning signals (macro crosses) addresses two different trading timeframes within one indicator. Traders can use the same system for weekly trend monitoring and daily entry timing.
4. Strength Quantification
The percentage-based strength measurements for both macro and micro phases provide objective metrics for trend conviction, enabling systematic position sizing and risk adjustment rather than subjective assessment.
5. Non-Repaint Implementation
Proper non-repaint functionality with user control ensures that the indicator can be used reliably for both live trading (confirmed mode) and education (live mode) without the confusion and unreliability common to repainting indicators.
6. Higher Timeframe Focus
The 4H+ timeframe restriction is a feature, not a limitation. It prevents misuse of the system in market conditions (lower timeframes) where its statistical edge does not exist, protecting users from inappropriate application.
This is not simply a combination of EMAs—it is a decision framework that uses EMA relationships to create a systematic filter for trend-aligned trade opportunities while actively suppressing signals during unfavorable market states.
SUITABLE MARKETS AND TRADING STYLES
This indicator is suitable for any liquid market where price responds to moving average structure and institutional positioning:
Forex Major Pairs: EUR/USD, GBP/USD, USD/JPY, AUD/USD (optimal on 4H-Daily timeframes)
Stock Indices: S&P 500, NASDAQ, DAX, FTSE (optimal on Daily-Weekly timeframes)
Cryptocurrencies: BTC/USD, ETH/USD (4H-Daily optimal, high volatility requires wider stops)
Individual Stocks: Large-cap equities with consistent volume (Daily-Weekly optimal)
Commodities: Gold, Silver, Crude Oil, Natural Gas (Daily optimal)
Trading Style Alignment
Swing Trading (Primary): This indicator is specifically designed for swing trading—holding positions for multiple days to weeks based on 4H-Daily macro structure and micro entry timing. This is the optimal use case.
Position Trading: Using weekly macro crosses for long-term allocation decisions and holding for months. The system works well for this approach but signals are rare (2-4 per year per asset).
Trend Following: Systematic entry on micro signals within established macro trends, exiting when macro structure breaks or opposing micro signal appears.
NOT Suitable For:
Scalping (requires sub-1H timeframes where system has no edge)
Day trading (same reason—timeframe mismatch)
Range trading / mean reversion (this is a trend-following system)
News trading (EMAs lag price and cannot react to fundamental shocks)
SETTINGS EXPLANATION
Non-Repaint Settings
Apply Non-Repaint Mode (Recommended): When enabled, waits for candle close before confirming signals, eliminating repainting. Recommended for live trading.
Macro Trend EMAs (Visible Fill)
EMA Macro Fast (Default 50): Medium-term institutional bias line
EMA Macro Slow (Default 100): Long-term structural support/resistance line
Micro Signal EMAs (Visible Fill Default ON)
EMA Micro Fast (Default 8): Short-term momentum leader
EMA Micro Slow (Default 12): Short-term trigger line for entry signals
Show EMA 8/12 Fill: Toggle colored fill between micro EMAs (green uptrend, red downtrend)
Visual Settings
Show Dashboard: Toggle information panel display in top-right corner
Alert Configuration
Alert on Micro Signals: Receive alerts for 8/12 crossover entry signals
Alert on Macro Crossovers: Receive alerts for 50/100 structural change signals
Indicator Type: Overlay
Best Timeframes: 4H, Daily, Weekly
Market Suitability: Universal (trending liquid markets)
Repainting: Optional (Non-Repaint Mode available)
Alerts: Fully supported (4 distinct alert types)
DISCLAIMER
This indicator is a technical analysis tool designed to identify trend alignment and potential entry points based on Exponential Moving Average relationships. It does not guarantee profitable trades and should be used as part of a comprehensive trading plan that includes proper risk management, position sizing, and fundamental analysis where appropriate.
Past performance of any trend-following system does not predict future results. The indicator works best in trending market conditions and may generate false signals during extended ranging or highly volatile transitional periods. Market conditions change, and no technical indicator can predict all future price movements.
Always backtest any strategy on your chosen asset and timeframe before risking real capital. Never risk more than you can afford to lose. Trading involves substantial risk of loss and is not suitable for all investors. This indicator is an educational and analytical tool—all trading decisions and their consequences remain solely the responsibility of the user.
Wskaźnik

Inversion Order Blocks [iOB] (Zeiierman)█ Overview
Inversion Order Blocks (Zeiierman) identifies when traditional Order Blocks fail and transition into inversion zones where the opposing side of the market may gain control.
A regular Order Block represents the final opposing candle before a strong displacement move breaks market structure. These areas are commonly monitored as potential support or resistance because they mark the origin of aggressive buying or selling pressure.
However, not every Order Block remains valid.
Some Order Blocks are broken as price closes completely through them. Rather than immediately discarding these failed zones, the indicator stores them inside an internal memory system and watches for a later opposing Order Block to form in the same price region.
When an Order Block fails, the indicator remembers it. If an opposite Order Block forms soon after in the same price area, either overlapping it or sitting very close to it, that area becomes an Inversion Order Block.
This creates a more selective framework that focuses on failed Order Blocks followed by confirmation from the opposite side of the market.
⚪ Order Block Detection
The indicator continuously scans the price for displacement candles that close through recent market structure.
A Bullish Order Block forms when:
• A bullish displacement candle closes above the previous structure high.
• The candle range exceeds the minimum ATR requirement.
• The candle body occupies the required percentage of its total range.
• The nearest bearish candle before the displacement becomes the bullish Order Block.
A Bearish Order Block forms when:
• A bearish displacement candle closes below the previous structure low.
• The candle range exceeds the minimum ATR requirement.
• The candle body occupies the required percentage of its total range.
• The nearest bullish candle before the displacement becomes the bearish Order Block.
⚪ Inversion Order Block Detection
Once an Order Block is created, it enters the internal memory system. If price later closes through the far side of the Order Block, the zone is considered broken.
A broken Order Block is not immediately forgotten. It remains eligible to pair with a later opposing Order Block for the duration of the Pairing Window.
Unlike strict inversion models, the two Order Blocks do not need to overlap perfectly. They may also form within a small ATR-adjusted proximity controlled by the Maximum Pairing Proximity setting.
Bullish iOB
• A bearish Order Block is broken.
• A bullish Order Block forms within the Pairing Window.
• The two zones overlap or form within the allowed proximity.
• The resulting area becomes a bullish Inversion Order Block.
Bearish iOB
• A bullish Order Block is broken.
• A bearish Order Block forms within the Pairing Window.
• The two zones overlap or form within the allowed proximity.
• The resulting area becomes a bearish Inversion Order Block.
█ How It Works
⚪ Order Block Detection
The script searches for strong displacement candles that close beyond recent market structure.
Each displacement is filtered using:
• ATR-based candle range.
• Minimum candle body ratio.
• Minimum Order Block size.
The nearest opposing candle before the displacement becomes the Order Block.
⚪ Memory & iOB Formation
Every valid Order Block is stored internally.
A bullish OB is considered broken when price closes below it, while a bearish OB is broken when price closes above it.
If a later opposing OB forms within the Pairing Window, the script checks whether the two zones overlap or sit within the Maximum Pairing Proximity.
bool overlaps = overlapHi > overlapLo
bool nearby = not overlaps and gap <= tolerance
When they overlap, the shared price area becomes the iOB. When they are only nearby, the failed original OB becomes the inversion zone.
⚪ Zone Management
Each zone can transition through several states:
• Active
• Tested
• Mitigated
• Frozen
• Removed
Mitigation may use wick touches or candle closes and can occur at the 50% level or after a full fill. Mitigated zones can either be deleted or retained as historical references.
⚪ Dynamic Zone Merging
Nearby compatible zones may be combined visually to reduce clutter.
• Bullish OBs merge with bullish OBs.
• Bearish OBs merge with bearish OBs.
• Bullish and bearish iOBs may merge into one neutral Merged iOB.
• Live and retained mitigated zones remain separate.
Retained zones only merge when their historical active periods overlap.
⚪ Distance Filtering
Zones beyond the selected ATR distance from the current price are hidden from the chart.
Hidden zones remain internally active and continue updating their memory, mitigation, and alert states.
█ How to Use
⚪ Bullish iOB Retest
After a bearish Order Block fails and a later bullish Order Block confirms the inversion, the resulting bullish iOB may act as support.
Rather than entering during the initial displacement, traders can wait for price to retrace into the bullish iOB.
A bullish reaction from the zone may indicate that buyers are defending the former resistance area.
⚪ Bearish iOB Retest
After a bullish Order Block fails and a later bearish Order Block confirms the inversion, the resulting bearish iOB may act as resistance.
Traders can wait for price to retrace into the bearish iOB and observe whether selling pressure returns.
A bearish reaction may indicate that sellers are defending the former support area.
█ Settings
Structure Lookback: Number of completed bars used to determine the structure high or low that a displacement candle must close through.
Order Block Search: Number of previous candles searched to locate the nearest opposing candle before the displacement.
Minimum Displacement Range: Minimum candle range measured as a multiple of ATR before a displacement is accepted.
Minimum Displacement Body: Minimum percentage of the displacement candle that must be occupied by its body.
Order Block Source: Select whether Order Blocks use the complete candle range or only the candle body.
Minimum Order Block Size: Minimum ATR-adjusted size required before an Order Block is accepted.
Pairing Window: Number of bars a broken Order Block remains eligible to pair with a later opposing Order Block.
Maximum Memory Age: Maximum number of bars an Order Block may remain inside the internal memory system.
Maximum Pairing Proximity: Maximum ATR-adjusted distance allowed between a failed Order Block and a later opposing Order Block. A value of zero requires direct overlap.
Delete Mitigated Zones: Removes mitigated zones or freezes them as historical references.
Mitigation Level: Select whether mitigation occurs at the 50% equilibrium level or after a complete fill.
Mitigation Source: Uses wick penetration or candle closes to confirm mitigation.
Merge Retained Mitigated Zones: Visually combines compatible historical zones that overlap in both price and active time.
Mitigated Zone Transparency: Controls how transparent retained historical zones appear.
Show Mitigated EQ Lines: Displays or hides equilibrium lines inside retained mitigated zones.
Filter Distant Zones: Hides Order Blocks and iOBs that are far away from the current price.
Maximum Distance From Price: Maximum ATR distance allowed before a zone becomes hidden.
Merge Nearby Zones: Visually combines compatible live zones and retained mitigated zones.
Maximum Merge Distance: Controls how close compatible zones must be before they merge visually.
Show iOBs: Displays bullish, bearish, and merged Inversion Order Blocks.
Show Regular OBs: Displays regular bullish and bearish Order Blocks. Detection and memory remain active when regular OBs are hidden.
Show EQ Line: Displays the equilibrium midpoint of each visible zone.
Fade With Age: Gradually increases zone transparency as the zone becomes older.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Wskaźnik

Zone Radar [DefinedEdge]Price spends most of its time going nowhere. Zone Radar finds those stretches automatically, draws the range while it's still forming, and tells you the moment it breaks and how hard.
🎯 What it does
Zone Radar watches for price coiling inside a bounded range. When a genuine consolidation forms, it marks the zone with its support and resistance, then tracks it live. The instant price closes decisively outside the range, it flags the break and scores its strength from 0 to 100. Strong breaks get a bold label and a projected target.
It is a context and breakout tool, not a signal service. It shows you where the market is compressed and when that compression releases. What you do with that read is yours.
🧭 How a zone is found
A range only qualifies when two things are true at once:
Price stays inside an ATR normalised band for a minimum number of bars, so the width adapts to any symbol or timeframe on its own.
Price does not drift across that band from one side to the other, which filters out slow trends pretending to be ranges.
Once a zone is confirmed the box breathes to hug the real range, but it is capped at the width it formed with. That cap is what makes a breakout meaningful: a close beyond it is a true expansion out of compression, not just another bar inside the noise.
💥 Break strength (0 to 100)
Every break is graded on four things that separate a real breakout from a fake one:
Displacement how far beyond the edge it closed, in ATR
Range expansion the break bar's range against its recent average
Volume surge participation on the break (auto adjusted on symbols with no volume data, like spot FX)
Coil quality how long and tight the range was, since a longer coil breaks harder
Breaks at or above your Strong threshold get the bold badge plus a measured move target: the height of the range projected from the breakout point. Broken edges stay on the chart as polarity support and resistance for the retest.
⚙️ Under The Hood
Signals fire on the close of the breakout bar. No repainting, ever.
Fully adjustable: range length, width, break sensitivity, strength threshold, and how much history stays on the chart.
Works on any market and any timeframe. Tuned nicely for intraday out of the box.
🔔 Alerts
Zone formed, break up, break down, strong break up, strong break down. Wire any of them into your workflow.
📝 Notes
Lower timeframes produce far more zones than higher ones, so only the most recent are kept drawn to stay within platform limits. Raise the zone cap if you want more history, or drop to a higher timeframe for a cleaner chart. The ATR based settings are a starting point, not gospel. Tune them to how your instrument actually moves. Wskaźnik

ORB+VWAPITSP ORB + VWAP — Opening Range Breakout with VWAP & Volume Confirmation
Overview
This indicator combines three of the most widely used intraday trading concepts into a single, non-repainting signal engine: Opening Range Breakout (ORB), session-anchored VWAP, and volume confirmation. It is built for NSE intraday trading but works on any liquid market with a defined session.
Most ORB tools only look at whether price broke the opening range. This one adds two additional filters — trend alignment via VWAP and participation via volume — so signals are less prone to false breakouts on thin, directionless moves.
How It Works
1. Opening Range — the script automatically detects the first bar of each new regular trading session and builds a high/low range over a user-defined number of minutes (default 15). Once that window elapses, the range locks for the rest of the session.
2. Session VWAP — a fresh volume-weighted average price is calculated from the first bar of each session, giving an accurate intraday fair-value reference rather than a rolling multi-day average.
3. Volume Filter — breakout bars are checked against a multiple of the recent average volume, filtering out low-conviction breaks.
4. Signal Logic — a long signal fires when price closes above the opening range high, is trading above session VWAP, and volume confirms. A short signal is the mirror condition. Each signal fires once per session per direction to avoid repeated alerts on choppy retests.
Key Features
• Auto-resetting opening range box, visually plotted on the chart
• Session-anchored VWAP line with configurable source
• Optional volume confirmation filter (adjustable multiple and lookback)
• Optional VWAP trend filter — can be disabled for raw ORB signals
• ATR-based stop-loss and target labels auto-printed on each signal
• Configurable info table (position, on/off) showing live ORB status, levels, and VWAP bias
• Background tint reflecting current VWAP bias
• Built-in alert conditions for both breakout directions, ready for webhook/Telegram/automation integration
How to Use
• Works best on 5-minute or 15-minute charts for liquid stocks and index futures.
• Set your chart session to Regular Trading Hours for correct daily resets.
• Adjust the Opening Range window (default 15 minutes) to match your market's typical volatility — some traders prefer 30 minutes for less noise.
• Use the VWAP and Volume filters as confluence checks; disabling both reduces this to a pure ORB breakout tool.
• ATR stop/target labels are a starting reference, not a substitute for your own risk management.
Settings
• Opening Range Minutes
• VWAP source and on/off filter
• Volume MA length and confirmation multiple
• ATR length, stop multiple, target multiple
• Info table visibility and position (9 placement options)
• Signal color customization
Alerts
Two alert conditions are built in — Long ORB Breakout and Short ORB Breakdown — both suitable for webhook-based automation to Telegram, Discord, or other delivery channels.
Notes
• Non-repainting: all breakout and VWAP calculations use only confirmed price/volume data at the time each bar closes.
• This is a discretionary decision-support tool, not a standalone trading system. Always combine with your own risk management and market context.
Disclaimer
This script is for educational and informational purposes only and does not constitute financial advice. Trading involves substantial risk of loss. Past performance of any strategy or signal does not guarantee future results. Use at your own risk and always backtest/forward-test before live deployment.
Wskaźnik

TEWMA MACD - [JTCAPITAL]TEWMA MACD -
TEWMA MACD - is a modified way to use the Moving Average Convergence Divergence (MACD) by replacing the traditional EMA calculations with Triple Exponential Weighted Moving Averages (TEWMA) for Trend-Following.
Instead of relying on conventional exponential moving averages, this indicator first smooths price using a Weighted Moving Average (WMA), followed by a Triple Exponential Moving Average (TEMA). This creates a significantly more responsive moving average while still maintaining smoothness. The result is a MACD that reacts quicker to changing market conditions without becoming excessively noisy.
The indicator works by calculating in the following steps:
Source Selection
The script begins by selecting the desired price source. By default this is the Close price, but users may choose any TradingView supported source such as Open, High, Low, HL2, HLC3, OHLC4, or any custom source.
Every calculation performed afterwards originates from this selected source.
Weighted Moving Average (WMA) Smoothing
Before calculating the actual trend averages, the source is first smoothed using a Weighted Moving Average.
Unlike a Simple Moving Average, a WMA assigns progressively larger weights to newer prices while still considering older data. This allows the moving average to respond faster to changing market conditions without becoming overly sensitive.
This initial smoothing stage reduces market noise before the Triple EMA calculation begins.
Triple Exponential Moving Average (TEMA) Calculation
After the WMA has been calculated, the script applies a Triple Exponential Moving Average.
Unlike a normal EMA, the TEMA combines multiple exponential averages in a mathematical way that largely removes the lag introduced by exponential smoothing.
This process produces a moving average that follows price much more closely while maintaining excellent smoothness.
The first TEWMA uses the user-selected base period.
Second TEWMA Calculation
A second TEWMA is then created using a longer lookback period.
Instead of manually selecting this second length, the script multiplies the original period by the chosen Multiplier.
For example:
Base Length = 20
Multiplier = 1.5
Second Length = 30
This automatically creates a slower moving average that represents the longer-term trend.
MACD Line Calculation
The MACD line is calculated by subtracting the slower TEWMA from the faster TEWMA.
MACD = Fast TEWMA − Slow TEWMA
When the faster average rises above the slower average, the MACD becomes positive.
When the faster average falls below the slower average, the MACD becomes negative.
The distance between both averages represents the current momentum of the market.
Signal Line Calculation
The script then calculates an Exponential Moving Average of the MACD itself.
This creates the Signal Line.
The Signal Line smooths the MACD values and provides a reference that can be compared against the MACD to determine whether momentum is increasing or decreasing.
The Signal Length is fully customizable.
Histogram Calculation
The histogram is calculated as:
Histogram = MACD − Signal Line
This measures the difference between both lines.
When the histogram is positive, bullish momentum dominates.
When the histogram is negative, bearish momentum dominates.
The larger the histogram becomes, the stronger the momentum.
Momentum Acceleration Detection
Besides determining whether momentum is positive or negative, the indicator also checks whether the histogram itself is increasing or decreasing compared to the previous candle.
This creates four unique momentum states:
Bullish and strengthening
Bullish but weakening
Bearish but recovering
Bearish and strengthening
These states are reflected through different histogram colors, making it significantly easier to judge the current momentum without manually comparing bars.
Dynamic Coloring
Both the MACD line and Signal Line automatically change color depending on which line currently dominates.
When the MACD remains above the Signal Line, both lines adopt the bullish color.
When the MACD falls below the Signal Line, both lines switch to the bearish color.
This immediately visualizes the current trend direction.
Background Momentum Visualization
Finally, the indicator colors the background using two separate conditions.
The first background coloring reflects whether momentum is bullish or bearish.
The second background coloring reflects whether momentum is increasing or decreasing.
Together these background colors provide an additional visual confirmation of the current market state without affecting the indicator calculations themselves.
Buy and Sell Conditions:
The indicator itself does not generate explicit Buy or Sell signals. Instead, it provides a momentum framework that traders can interpret according to their own trading style.
Common bullish confirmations include:
The MACD crossing above the Signal Line.
The histogram moving from negative to positive.
Increasing positive histogram bars.
Both MACD and Signal Line remaining above zero.
Background shifting toward bullish momentum.
Common bearish confirmations include:
The MACD crossing below the Signal Line.
The histogram moving from positive to negative.
Increasing negative histogram bars.
Both MACD and Signal Line remaining below zero.
Background shifting toward bearish momentum.
Additional confirmation filters may be added, such as:
Higher timeframe trend confirmation.
Volume confirmation.
RSI filters.
ADX trend strength filters.
ATR volatility filters.
Market structure confirmation.
Support and resistance confluence.
Combining multiple filters generally reduces false signals while increasing the quality of confirmed trend reversals.
Features and Parameters:
Source
Determines which price series is used for every calculation.
Length
Controls the period used for the fast TEWMA.
Multiplier
Automatically determines the slow TEWMA length by multiplying the base Length.
MACD Length
Controls the EMA smoothing period used for the Signal Line.
Dual TEWMA System
Creates a fast and slow trend measurement using Triple Exponential Weighted Moving Averages.
Dynamic MACD
Uses TEWMA instead of traditional EMA calculations to reduce lag while maintaining smoothness.
Adaptive Signal Line
Smooths the MACD using a configurable EMA.
Momentum Histogram
Displays the distance between MACD and Signal Line.
Four-State Histogram Coloring
Shows whether momentum is bullish, bearish, strengthening, or weakening.
Dynamic Line Colors
Both MACD and Signal Line automatically reflect current momentum direction.
Background Momentum Visualization
Provides additional visual confirmation of trend direction and momentum acceleration.
Specifications:
Weighted Moving Average (WMA)
The Weighted Moving Average assigns progressively larger weights to more recent price data while gradually reducing the influence of older prices. Compared to a Simple Moving Average, the WMA reacts faster to new market information without becoming excessively sensitive. Within this indicator, the WMA serves as the initial smoothing stage before the Triple Exponential Moving Average is applied. This helps reduce random price fluctuations while preserving meaningful trend information.
Triple Exponential Moving Average (TEMA)
The Triple Exponential Moving Average is designed to minimize the lag commonly associated with exponential moving averages. Rather than relying on a single exponential smoothing calculation, TEMA combines multiple exponential averages into one formula that effectively compensates for delay. This produces a moving average that closely follows price while remaining smooth. In this indicator, TEMA is applied after the WMA, creating the TEWMA calculation that forms the foundation of the entire oscillator.
TEWMA
TEWMA stands for Triple Exponential Weighted Moving Average. It combines the stability of the Weighted Moving Average with the responsiveness of the Triple Exponential Moving Average. By smoothing the source with a WMA before applying TEMA, the resulting average filters out short-term market noise while still responding rapidly to genuine trend changes. Using TEWMA instead of traditional EMAs creates a more responsive MACD without sacrificing smoothness.
MACD (Moving Average Convergence Divergence)
The MACD measures the distance between a faster moving average and a slower moving average. This difference provides insight into market momentum. As the fast average accelerates away from the slow average, momentum increases. When both averages converge, momentum weakens. By replacing the traditional EMAs with TEWMAs, this indicator produces a MACD that reacts more quickly to evolving market conditions while maintaining reliable trend identification.
Signal Line
The Signal Line is an Exponential Moving Average applied directly to the MACD values. Its purpose is to smooth the often volatile MACD line, making momentum shifts easier to identify. Crossovers between the MACD and Signal Line are among the most widely used momentum signals in technical analysis because they indicate potential changes in buying or selling pressure.
Histogram
The histogram measures the difference between the MACD and the Signal Line. Rather than simply indicating bullish or bearish momentum, it also reveals the strength of that momentum. Expanding histogram bars indicate accelerating momentum, while shrinking bars suggest that momentum is fading. This often provides an early warning before actual MACD crossovers occur.
Momentum Acceleration
Beyond measuring whether momentum is positive or negative, this indicator continuously evaluates whether momentum itself is increasing or decreasing. This additional layer allows traders to distinguish between strong trends, weakening trends, recovering markets, and accelerating reversals. Monitoring momentum acceleration often provides earlier insight into changing market conditions than observing crossovers alone.
Trend Following
Trend-following strategies attempt to participate in sustained market movements rather than predicting exact tops or bottoms. By combining fast and slow TEWMAs, the indicator naturally aligns with prevailing market direction while filtering much of the short-term noise that frequently causes false signals.
Moving Average Convergence and Divergence
The core principle behind MACD is that the relationship between two moving averages reflects the strength and direction of a trend. As the averages separate, momentum increases. As they converge, momentum decreases. Measuring this continuously provides valuable insight into both existing trends and potential reversals.
Multiplier
Instead of manually selecting both moving average lengths, this indicator derives the slower TEWMA by multiplying the fast length by a user-defined multiplier. This ensures that the relationship between both averages remains proportional regardless of the chosen settings, making optimization more intuitive while preserving the intended behavior of the oscillator.
Dynamic Coloring
Color changes are not merely cosmetic. They immediately communicate whether bullish or bearish momentum currently dominates and whether momentum is strengthening or weakening. This allows traders to interpret the oscillator at a glance without carefully examining individual values or comparing multiple bars manually.
Why combine WMA with TEMA?
The Weighted Moving Average prioritizes recent price action while still filtering random fluctuations. The Triple Exponential Moving Average then removes much of the lag traditionally introduced by smoothing techniques. Combining both methods produces a moving average that remains smooth during consolidation while responding rapidly once genuine momentum develops. This makes the resulting MACD more responsive than the traditional EMA-based implementation without becoming excessively noisy.
Why use a TEWMA-based MACD instead of a traditional MACD?
Traditional MACD indicators rely entirely on Exponential Moving Averages, which inevitably introduce lag as markets change direction. By replacing those averages with TEWMAs, this indicator detects shifts in momentum earlier while still maintaining smooth trend behavior. The result is an oscillator that remains familiar to MACD users but offers faster responsiveness, improved trend tracking, and clearer visualization of changing momentum.
Enjoy! Wskaźnik

Caheeen Pulse v3.0Caheeen Pulse is a market-regime visualization tool designed to summarize trend structure, directional alignment and volatility-normalized price positioning in one compact view.
HOW IT WORKS
The indicator combines four independent observations into a composite regime score ranging from -4 to +4:
Price position relative to the long-term Trend EMA.
Alignment between the Fast EMA and Slow EMA.
Direction of the Trend EMA slope.
Price distance from the Trend EMA, normalized by ATR.
The combined score classifies the current market environment into five states:
• Strong Bull
• Bull
• Neutral
• Bear
• Strong Bear
This approach differs from a basic moving-average crossover. It evaluates several dimensions of market structure simultaneously and normalizes price displacement using volatility, allowing the same framework to adapt across instruments and timeframes.
VISUAL COMPONENTS
• Long-term Trend EMA
• Fast and Slow EMAs
• Regime-based chart background
• Confirmed regime-transition markers
• Dashboard displaying the composite score, ATR-normalized price distance, trend slope, EMA spread and ATR volatility
ALERTS
Caheeen Pulse includes alert conditions for confirmed transitions into Strong Bull, Strong Bear and Neutral regimes. Transition alerts and markers are confirmed only after the candle closes. When creating an alert, select “Once Per Bar Close.”
USAGE
Caheeen Pulse is intended to help users:
• Identify the prevailing market regime
• Distinguish directional conditions from transitional periods
• Compare trend structure with current volatility
• Apply an additional market-context filter to their own analysis
The indicator does not place orders, manage positions or provide personalized investment advice. It should not be used as a standalone instruction to buy or sell.
The live regime display can change while the current candle is forming. Confirmed transition markers and alerts are generated at candle close.
Historical or hypothetical observations do not guarantee future results. Trading involves risk, and users remain responsible for their own decisions and risk management. Wskaźnik

Gravity Trend | ADX Strength Meter & Quality-Scored DMI SystemA fully modular DMI/ADX trend-following strategy built around a live Trend Quality Score rather than a raw crossover signal.
Instead of entering on the initial DI crossover, this script waits for pullback entries within an already-confirmed trend regime (DI direction + ADX strength + optional EMA filter), aiming to capture better average entry prices than chasing the initial signal.
Core features:
Pullback entry engine — enters on EMA reclaim within a confirmed DMI trend regime (toggle back to classic DI crossover anytime)
Trend Quality Score (0–100) — a weighted composite of ADX level, DI spread, ADX slope, and EMA slope, visualized as a glowing trend line whose brightness scales with signal quality
Peak-ADX decay exit — tracks the highest ADX reached since entry and exits once trend conviction decays a set percentage off its peak, independent of price action
True initial stop anchored to strategy.position_avg_price, transitioning into a Chandelier-style ATR trailing stop that only ratchets in your favor
Volatility- and quality-adjusted position sizing — risk per trade scales with ATR and with the current Trend Quality Score
Cooldown filter to avoid re-entering immediately after a stop-out in the same chop zone
Live dashboard table showing ADX, DI spread, trend score, position status, and a self-updating win-rate table bucketed by ADX strength regime at entry — so you can see empirically which trend-strength conditions are actually working on your instrument
Every major mechanic (EMA filter, DI spread minimum, pullback mode, Chandelier trail, ADX decay exit, cooldown, quality-based sizing, and each individual Trend Score component) is independently toggleable — designed for methodical A/B testing rather than a fixed black-box system.
This is a trend-following strategy, not mean-reversion. It is intended for educational and research purposes. Past performance shown in backtests does not guarantee future results — always forward-test and paper-trade before risking real capital, and adjust default parameters (ADX threshold, ATR multiples, EMA lengths) to suit your instrument and timeframe. Strategia

[Dugan Algos] Trader's Command CenterOverview
Trader's Command Center consolidates the routine an active intraday trader repeats on every chart — marking the levels that matter, checking whether the trend actually agrees with itself, confirming that volume is present, and judging whether the move still has fuel — into a single overlay with one readable verdict.
The problem it addresses is fragmentation. Most traders end up running five or six separate scripts: one for previous-day levels, another for premarket, a VWAP, a moving-average package, something for relative volume, and a momentum oscillator in a lower pane. Each is fine alone, but reading them together means your eyes travel across the screen and you assemble the context manually, in real time, under pressure. That assembly step is where hesitation and inconsistency creep in.
TCC performs the assembly for you. Every component feeds one checklist table that resolves to a plain-language state — A+ LONG, A+ SHORT, LONG (low vol), SHORT (fading), or MIXED — so the question shifts from "what do all these indicators say?" to "does this setup meet my standard, yes or no?"
It works on stocks, options underlyings, and futures, and includes dedicated Asia and London session levels for overnight futures traders.
---
Why these components are combined
The individual calculations here are standard and well documented — that is deliberate. The originality is in the scoring architecture, not in inventing a new formula.
Three specific pieces of integration logic do work that no combination of separate scripts performs:
1. Trend agreement is scored, not eyeballed. Six independent context checks (VWAP, EMA alignment, two SMAs, prior-day close, market breadth) are reduced to a single 0–6 score. Five or six agreeing is treated as directional conviction; anything less is explicitly labelled MIXED rather than left for you to interpret. The point is a consistent, repeatable threshold instead of a judgment call that shifts with your mood.
2. Volume and momentum act as gates on that score, not as more rows to weigh. Direction is necessary but not sufficient. A trend everyone agrees on but nobody is trading is a trap, and so is a trend that's already exhausted. Relative volume and momentum acceleration are therefore structurally separate from the directional score — they can only downgrade a verdict, never create one. This is why the header degrades in a defined order: `A+ LONG` → `LONG (low vol)` → `LONG (fading)`. Each tells you something different about why the setup is second-rate.
3. Momentum is measured relative to the prevailing bias. Every momentum reading in the script is sign-flipped to match the direction the checklist is pointing. On a short setup, a falling MACD histogram is momentum building, not fading. Bolting a standard MACD onto your chart requires you to perform that inversion mentally on every short — a small thing that produces real errors when you're managing a position quickly.
---
Features
Automatic key levels
Drawn without any manual charting, and updated as each period completes:
Previous day high, low, and close
Premarket high and low, accumulated live through the pre-session
Opening range high and low, with a configurable duration (default 15 minutes)
Prior week high and low
Prior month high and low
Each level carries a compact right-edge tag (PDH, PDL, PDC, PM-H, ORB-L, PWH, PMoH and so on) so you can identify a line at a glance without opening the settings panel. Labels can be switched off if you prefer a cleaner chart.
Higher-timeframe values are requested with a one-period offset, meaning the script only ever reads completed periods. These levels do not repaint.
Futures session levels
For overnight and globex traders, optional Asia and London session highs and lows, alongside the standard prior-day and opening-range levels. Both session windows and the reference time zone are user-configurable — the defaults are New York time (Asia 18:00–03:00, London 03:00–09:30), which suit ES, NQ, CL and GC, but the fields accept any session string for other products or time zones.
A+ Trade Checklist
The centrepiece. A compact table scoring six directional checks:
Check Bullish when
Price vs VWAP Price above session VWAP
EMA alignment Fast EMA above slow EMA (default 9/21)
SMA 1 Price above the intermediate SMA (default 50)
SMA 2 Price above the long SMA (default 200)
Prior-day close Price above yesterday's close
Market breadth Advance-decline reading above zero
Five or six bullish gives a long bias; five or six bearish gives a short bias; anything in between reads MIXED. Two quality gates then qualify that bias — day RVOL and momentum — followed by two informational rows (bar RVOL and buy-volume percentage) that assist entry timing without affecting the verdict.
The header cell always states the conclusion outright, so you never need to count rows.
Momentum: accelerating or fading
A dedicated row answering the question most checklists ignore: is this move gaining or losing steam?
The measurement is the slope of the MACD histogram, normalised by ATR. The histogram is already the spread between fast and slow momentum, so its rate of change is effectively acceleration — an expanding histogram means the move is gaining separation, a contracting one means it's decaying even while price still drifts your way.
Dividing by ATR is what makes the reading portable. Raw histogram slope is expressed in price units, so a threshold tuned on SPY would be meaningless on ES or a four-dollar stock. Expressed as a percentage of average true range, a single threshold behaves consistently across every instrument.
The row displays one of three states — `▲ ACCEL`, `■ FLAT`, `▼ FADING` — with the normalised magnitude, plus a small `·adx↑` marker when ADX is simultaneously rising. A configurable flat zone prevents the state from flickering on trivial changes.
A dropdown controls how strictly momentum gates the verdict: Off (display only), Block if fading (default), or Require accelerating (strictest, suited to breakout entries).
Trending Stocks screener
Ranks up to eight watchlist symbols by daily relative volume, showing percent change alongside, sorted live so the most unusually active name sits at the top. Useful for deciding which chart deserves your attention before you commit to one.
Symbols are fully user-defined; the defaults are common large-cap names and index ETFs.
Volume analysis
Day RVOL — cumulative session volume against the 20-day average, the standard measure of whether a name is "in play"
Bar RVOL — current bar volume against its recent average, for spotting individual bursts
Buy/sell volume estimate — volume apportioned by where the bar closes within its range, giving a rough pressure read on each candle
Trade planner
Enter an intended entry, stop, and target in the settings; the script draws all three on the chart with an automatic risk-to-reward calculation, absolute risk, and absolute reward. A fast way to sanity-check a trade's geometry before committing, or to review one afterwards.
Alerts
Thirteen conditions covering breakouts, cross events, volume anomalies, and setup formation:
Break above previous day high / below previous day low
Break above premarket high / below premarket low
Opening range breakout, up and down
VWAP cross, up and down
Relative volume spike
A+ Long setup formed (bias + volume + momentum all confirmed)
A+ Short setup formed
Momentum fading — fires only while a directional bias is live, making it a genuine position-management trigger rather than background noise
Momentum accelerating
Setup instructions
1. Add the indicator to your chart.
2. Enable extended trading hours. Right-click the chart → Settings → Symbol tab → tick Extended trading hours. Premarket high and low cannot be calculated without pre-session data, and the row will stay blank until this is enabled.
3. Use an intraday timeframe. The level suite, opening range, and session VWAP are built for intraday charts — 1 to 60 minutes. On daily and higher, intraday-specific levels are intentionally suppressed.
4. Confirm the breadth symbol. The checklist defaults to `USI:ADD` (NYSE advance-decline). If that row shows "n/a", your data plan may not include it — substitute any breadth symbol you do have access to, or a broad index proxy. The row will read n/a and score as bearish if the symbol is unavailable, so it's worth resolving rather than ignoring.
5. Set your session times if trading futures. Enable the futures group and adjust the Asia and London windows to match your product and time zone.
6. Create alerts. Add alert → Condition → select Trader's Command Center → choose the event from the dropdown. Set Once Per Bar Close if you want confirmed signals only; leaving it on Once Per Bar will fire intrabar and can trigger on moves that reverse before the candle closes.
---
How to read it during a session
A workflow that suits most intraday traders:
Before the open, glance at the screener to see which of your names are running unusual volume. Note where premarket high and low sit relative to the previous day's range — a premarket high above yesterday's high with real volume is a materially different setup from one inside the prior range.
Through the opening drive, let the opening range establish, then watch for a break of ORB high or low. The checklist header tells you whether that break has context behind it. An ORB breakout with an A+ LONG verdict is a fundamentally different proposition from the same breakout printing MIXED.
In a position, the momentum row is your management tool. Direction rows staying green while momentum turns to FADING is the classic signal that a move is maturing — a reasonable trigger to tighten a stop or take partial profit, well before the directional rows themselves flip.
When the verdict reads MIXED, that is information. The context checks disagree, which usually means chop. Most consistent traders lose more money forcing trades in this state than they make from the ones that work.
---
Tuning guidance
Slope lookback (default 3 bars) governs momentum responsiveness. Drop to 2 on a 1-minute chart if the reading feels slow; raise to 5 or more on 15-minute and above.
Flat zone (default ±3% of ATR) controls how much movement is required before the momentum state changes. If the row flickers between states more than you find useful, raise it to 5 or 6. This is the first knob to reach for — if the momentum gate is talking you out of trades that later work, the flat zone is usually too tight rather than the concept being wrong.
Day RVOL threshold (default 1.5x) sets the participation bar. Lower it to 1.2 for large-cap index products where 1.5x is genuinely rare; raise it to 2.0 or beyond if you only want names that are decisively in play.
Opening range duration (default 15 minutes) is a matter of style. Five minutes gives earlier, noisier signals; thirty produces fewer, cleaner breaks.
Momentum requirement should match your entry style. Breakout traders want Require accelerating. Pullback and mean-reversion traders often prefer Off, since entering as momentum decelerates is the entire premise of that approach.
---
Limitations and honest notes
Pine cannot scan the whole market. The screener ranks only the symbols you enter. This is a platform constraint on all Pine scripts, not a design shortcut — TradingView limits the number of external symbol requests a script may make, and eight leaves headroom for the rest of the indicator's higher-timeframe calls.
Momentum measurement lags. MACD-derived acceleration is built on moving averages and inherits their delay. In a range, the histogram slope will whipsaw regardless of tuning. The momentum row is most reliable when the directional rows are already lopsided — it is a quality filter on an existing trend, not a standalone signal.
Buy/sell volume is an estimate. Without tick-level or order-flow data, the split is inferred from where each bar closes within its range. It is a reasonable proxy for pressure, not a substitute for a true delta feed.
Breadth is US-equity oriented. The default advance-decline symbol is meaningful for US stocks and index products. Trading FX, crypto, or non-US equities, the row should be repointed at something relevant or its influence on the score understood as noise.
The score is not a strategy. It describes context, not edge. It contains no backtest, makes no claim of profitability, and will happily print A+ LONG into a reversal. Entry, exit, position sizing, and risk management remain entirely yours.
Repainting: higher-timeframe levels read completed periods only and do not repaint. Live intraday values — the current bar's RVOL, momentum state, and checklist verdict — naturally update while the bar is forming and settle on close, as with any real-time indicator. Use Once Per Bar Close on alerts if you need confirmed-only behaviour.
---
Settings reference
Group Contains
① Key Levels Toggles for previous day, premarket, weekly, monthly levels and labels
② Opening Range ORB on/off and duration in minutes
③ Futures Sessions Asia and London session windows, reference time zone
④ Moving Averages / VWAP VWAP toggle, two EMA lengths, two SMA lengths
⑤ Volume / RVOL Averaging length, day-RVOL threshold, bar-spike multiple
⑥ Momentum MACD lengths, slope lookback, ATR length, flat zone, A+ gate strictness
⑦ A+ Trade Checklist Table on/off, breadth symbol, table position
⑧ Trending Stocks Screener Table on/off, eight symbol slots
⑨ Trade Planner Entry, stop, target prices
---
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, not a recommendation to buy or sell any security or contract, and not a solicitation of any kind. It contains no strategy, no backtest, and makes no representation about past or future performance.
Trading stocks, options, and futures involves substantial risk of loss and is not suitable for every investor. Levels, scores, and alerts produced by this script describe market context; they do not predict outcomes. All trading decisions, position sizing, and risk management are your own responsibility. Test any tool thoroughly on a simulated account before risking capital.
---
Comments and suggestions are welcome. If you find a calculation that behaves unexpectedly on a particular instrument or session, please describe the symbol, timeframe, and settings so it can be reproduced. Wskaźnik

Andean Oscillator ProFull credit to alexgrover for the Andean Oscillator, which this is built on.
Original script:
Original writeup: alpaca.markets/learn/andean-oscillator-a-new-technical-indicator-based-on-an-online-algorithm-for-trend-analysis/
WHAT THE ORIGINAL MEASURES
The oscillator tracks two exponential envelopes, one on price and one on price
squared. Differencing them recovers a standard deviation for each direction of
travel. The bull component grows as price pulls away above its lower envelope. The
bear component grows as price pulls away below its upper envelope. Whichever is
larger tells you which side is doing the work, and how hard.
The important thing to understand about this family of readings is that it is a
measure of distance already travelled. It cannot be large until a move has already
happened. That shapes everything about how you use it.
WHAT THIS VERSION ADDS
Adaptive envelope decay. The original decays its envelopes at a fixed rate set by one
length input. This version computes an efficiency ratio over a lookback and slides the
decay rate between a fast bound and a slow bound. In a clean directional move the
envelope forgets old extremes quickly, so the reading responds sooner. In chop it
slows back down to roughly the original behaviour. ER Power controls how much trend
quality it demands before speeding up.
Normalization. The raw components come out in price units, which means a threshold you
find on one symbol is meaningless on another. Percent mode expresses them as a share of
price. ATR mode expresses them in volatility units. Either way your settings travel.
Energy gate. The original compares the components to their own moving average, which
costs you several bars of lag. This version ranks the larger component as a percentile
of its own recent history instead. There is no smoothing involved, so it reacts the
moment expansion starts, and the number means the same thing on every instrument. A
gate of 90 means you only act on readings in the top tenth of what this market
normally produces.
Deadband with hysteresis. Entry requires the spread between the two components to
clear a percentile band. Exit only requires the spread to change sign. That asymmetry
is what lets the faster envelope run without producing constant flips around the zero
line.
Trade management on the chart. When bias flips, the script marks the entry and places
a stop at a multiple of ATR, both drawn on the price chart. Once price has moved a set
distance in your favour the stop jumps to just past your cost, then a chandelier trail
arms and ratchets in one direction only. It never loosens. The trade ends at that stop
or on an opposite signal, which closes and reverses. Stop colour tells you the state
at a glance. Red is the initial stop, orange means breakeven is locked, blue means the
trail is running.
Everything else. Optional squeeze filter requiring a quiet stretch before the gate
opens, the envelopes drawn on the price chart, bias shown three ways so you can read
direction without looking at numbers, and a single alert carrying entry, stop and
energy.
HOW TO READ IT
Green bars, green background, LONG label means the bull component leads and the gate
was open when it flipped. Red is the reverse. Grey bars mean no position. The two
faint black lines in the pane are the deadband, so you can see how far the spread has
to travel before a flip qualifies. Fill intensity between the components tracks
energy, so a washed out fill means the market is quiet by its own standards even if
the components have crossed.
Orange dots along the bottom mark bars where the gate is open but no bias has been
established yet. Think of those as armed and waiting.
SETTINGS
Energy Gate is the one that matters. It sets how selective the entries are, and
nothing else in the script changes behaviour as much. Raise it for fewer and larger
setups, lower it for more frequent ones. Expect a high gate to feel quiet. That is the
setting working.
Stop, breakeven and trail distances are all measured in ATR rather than in R, and that
is deliberate. Denominating protection distance in R ties how far you wait before
protecting profit to how far you are willing to be wrong, and those two should move
independently.
Defaults are set for 15 minute crypto. Presets are included for 5 minute and 1 hour.
Published open source under CC BY-NC-SA 4.0, same license as the original. Wskaźnik

All-in-One: Symbol, TF, Weekday Labels, Countdown/ClockAll-in-One: Symbol+TF • Weekday Labels • Countdown/Clock
Version 1.0.0
Chart-furniture dashboard that puts four everyday reference pieces on one indicator: a symbol / timeframe / date table, forex-session weekday labels along the bottom, an on-chart candle countdown, and a right-hand Clock and Countdown Panel showing the London clock, the candle countdown and the current candle's open and close time. Each piece toggles on or off independently.
WHAT IT DRAWS
• Symbol and timeframe table: a bottom-right table showing the ticker, the chart timeframe and the current date (weekday plus day-month). Works on every timeframe from seconds up to weekly.
• Weekday labels: forex-session weekday text along the bottom of the chart, drawn on 5m to 4h charts only. Each label is projected forward onto the next session, so the text shows the upcoming day.
• On-chart candle countdown: a floating label to the right of the last bar counting down to the current bar's close, with per-timeframe control over how far right it sits.
• Clock and Countdown Panel: a middle-right table showing any of three rows: the candle countdown, the live London clock, and the current candle's open and close time. The panel sizes itself to the visible rows and stays vertically centred.
HOW IT WORKS
• The countdown reads the time remaining to the current bar's close and updates live. It shows on daily and below (not on weekly or monthly), and a Visibility timeframe input restricts it further if you want it only on the lower timeframes.
• The Clock and Countdown Panel's live clock reads real time, while the candle-time row reads the bar you are on. In Bar Replay the candle time tracks the scrubbed-to bar while the live clock keeps real time. Each of the three rows toggles independently and there is no master toggle: turn all three off to hide the panel.
• The weekday labels draw on 5m to 4h charts only. Below 5m the fixed forward projection (a bar count) throws them far off-screen, and on seconds charts the offset maths mis-places them, so both are gated out. A marker is drawn at each session's open bar but pushed forward so it renders over the next session, which is why Monday's marker reads "Tue", Tuesday's reads "Wed", and so on. Friday reads "Mon", projecting across the closed weekend so Monday's session still gets a label. The Sunday-evening open is not traded, so it is intentionally not labelled.
• Opacity inputs read as true opacity: 0 is invisible and 100 is solid.
EXTENDED TRADING HOURS WHERE THE SYMBOL OFFERS THE CHOICE
The weekday labels need the overnight session-open bar to exist in the data. On any symbol that offers a Regular / Extended hours choice (for example DE40, and some FX feeds), set the chart's Session to "Extended trading hours" (Chart Settings, Symbol, Session, Extended trading hours). On Regular Hours the session-open bar is trimmed out of the series, so the weekday labels simply do not appear. Only the weekday labels depend on this: the countdown, the live clock, the candle time and the symbol/timeframe table read the current bar or real time and work either way. Symbols that trade one continuous session (for example US500, USTEC, XTIUSD) have no such option and are unaffected.
WHAT IT RUNS ON
It runs on any instrument. Only the weekday-label placement is instrument-dependent, so on untested symbols confirm the day labels land where you want them. Tested on ICMarkets data across forex pairs, DE40, XAUUSD, USTEC, US500, XTIUSD and US30.
HOW TO USE
Add it to any chart. Use the symbol/timeframe table and the live clock as an at-a-glance header, and the countdown to see how long the current bar has left. On a 5m to 4h chart, turn on the weekday labels to mark each upcoming session along the bottom (enable Extended Trading Hours first if the symbol offers the choice). Open the Clock and Countdown Panel's candle-time row when working in Bar Replay to read the open and close of the bar you are scrubbed to.
FEEDBACK
Please let me know if you experience any issues, or have feedback for improvements or additions in the comments below. Thank you, Tom Wskaźnik

Kill Zones, Market Opens and NewsKill Zones, Market Opens and News
Version 1.0.0
Draws FX session kill zones, market opens and news event lines on intraday charts, with its own purpose built kill zones for DE40, the US indices and crude oil. First release, shared open source.
WHAT IT DRAWS
• Forex kill zones: London 07:00-10:00 UK and New York 12:00-15:00 UK, each with start and end boundary lines.
• Market open lines: 08:00 London/Frankfurt and 14:30 New York, each on its own toggle.
• News event lines, filtered to the relevant pair: GBP 07:00 / 09:30 / 12:00, USD 13:15 / 13:30 / 14:45 / 15:00 / 19:00 / 19:30, EUR 08:30 / 13:15. 13:30 USD is on by default, the rest off.
• DE40: London morning only, 08:00-10:00 Frankfurt. Own 08:00 open and 10:00 end line, no afternoon zone.
• US500 / USTEC / US30 (identical): AM orange pre-market 13:30-14:30 then green 14:30-17:00; PM green 18:00-20:00 then blue power hour 20:00-21:00.
• XTIUSD: two green zones, 08:00-10:00 and 13:00-19:00 UK, plus the 14:30 New York open and USD news.
• History range: the last 5 trading days, or the full loaded history.
• Colour, opacity, width and style adjustable on every element.
WHY THESE HOURS
• The windows come from an hour-of-day volatility study, the average bar range in each UK hour: five years of data to July 2026 for the forex majors, gold and index CFDs, and around two years for crude oil, cross-checked against real price action. The aim is to shade the hours that actually move and mark the opens and news that drive them.
HOW IT WORKS
• Each custom instrument shows only its own windows; the forex shading, session lines, opens and news are suppressed on DE40, US500, USTEC, US30 and XTIUSD.
• Forex windows track a US (New York) data feed. The custom instruments are UK clock anchored and render correctly on any exchange timezone.
• The "UK-US Time Difference" input (5 or 4) covers the roughly 4 weeks a year when UK and US daylight saving are out of step. Leave it at 5 the rest of the year.
• Boundary lines draw below 1H; kill zone shading and market opens draw at 1H and below.
WHAT IT RUNS ON
• Intraday, 1H and below.
• Forex majors and XAUUSD get the standard drawing; DE40, US500, USTEC, US30 and XTIUSD get their own custom zones.
• Custom zones match the exact symbols DE40, US500, USTEC, US30 and XTIUSD. Other broker names (for example GER40, SPX500, NAS100, WTIUSD) fall back to the standard forex drawing. The script is open source, so you can add your broker's names.
• Tested so far on forex majors, XAUUSD, DE40, US500, USTEC, US30 and XTIUSD.
HOW TO USE
• Add it to any intraday chart, 1H or below.
• On forex or gold: use the London and NY kill zones to see where the sessions sit, and turn on the opens and news you follow.
• On DE40, US500, USTEC, US30 or XTIUSD: it switches automatically to that instrument's own zones.
• In a DST gap week, set "UK-US Time Difference" to 4; otherwise leave it at 5.
• Use the History range control to keep the chart light (5 days) or show the full history.
IN THIS RELEASE (v1.0.0)
• First public release.
• Forex London and NY kill zones with adjustable boundary lines.
• 08:00 London/Frankfurt and 14:30 New York market opens.
• GBP / USD / EUR news lines, toggled individually and filtered per pair.
• Custom kill zones for DE40, US500 / USTEC / US30 and XTIUSD.
• UK clock anchored custom instruments, timezone independent, with the 5/4 DST toggle.
• History range, and full colour, opacity, width and style control.
FEEDBACK
Please let me know if you experience any issues, or have feedback for improvements or additions in the comments below. Thank you, Tom Wskaźnik

ACTS Point & FigurePoint & Figure strips time out of the chart.
What's left is structure - where price actually fought, and where it broke. This draws that structure as an overlay on your ordinary candlestick chart, so you see the P&F reading and the candles together.
And the source is open. You don't have to take my word for any of it: read the code, check that it does what this description says, change it if you disagree. That is the point of publishing it this way.
Most free P&F tools stop at double tops. This one carries the full classical vocabulary - triples, catapults, traps, poles, 45-degree trend lines and structural stops - built the way the literature specifies.
It draws levels and structure. It does not issue buy or sell signals, and it makes no claim about what any level will do next. The interpretation is yours.
HOW THE GRID IS BUILT
Price moves one box, you add a box. It reverses by three boxes, a new column starts. The grid is computed internally from the ordinary OHLC history of the chart you're on - not from TradingView's Point & Figure chart type - so every level maps to a real price on a real bar with a real timestamp. Columns are built from closing prices, and the three-box reversal is fixed, the classical construction.
WHAT IT SHOWS YOU
Columns - the trend in its rawest form. A column of X's is buyers in control, O's sellers, and a new column means the move reversed by enough to matter. No wicks, no noise from time passing. Columns are numbered; the X/O characters and the column lines toggle independently.
Classic patterns and their breakout levels. Double and triple tops and bottoms, detected on the grid, each with its breakout level drawn and labelled. A breakout only counts if the column also clears every same-direction column behind it in the look-back window - so a "break" straight into overhead structure isn't one. A separate Pot BO line projects forward from the live column: the level the current column would have to reach for a breakout to register. It updates as the column builds.
45-degree trend lines. Bullish support and bearish resistance drawn at a fixed 45 degrees off the grid, plus internal lines, projecting a configurable distance to the right. On a P&F grid a 45-degree line has objective meaning, because the grid has a fixed geometry; on a time chart it does not. A line renders dotted while it is provisional and turns solid once a breakout confirms it, so you can see which lines have earned their keep.
The special formations. High and low poles, bull and bear catapults, bull and bear traps. A trap is a breakout that fails and pulls price back through its own level. A pole marks an unusually extended one-column move. Formations that have already resolved stay on the chart by default, tagged when the level was hit and when the formation was negated - so you can see what the recent structure actually did, not only what is still open. Two settings hide the hit and negated ones, and an age filter clears the old ones away; switch those on and what remains is only what is still live.
Structural stop levels - three modes, all box-denominated.
- Mode 1 - nearest. The extreme of the column immediately before the breakout, plus a buffer.
- Mode 2 - pattern-wide (default). The worst opposing extreme found across the whole width of the pattern, plus the same buffer. More conservative than Mode 1 by construction.
- Mode 3 - measured. A fixed distance from the breakout level itself (default two boxes), no buffer.
The buffer and the Mode 3 distance are both expressed as a percentage of your box size, never in pips. Nothing in this path assumes a decimal count, a pip value or an asset class, so the same settings behave sensibly on a 5-decimal FX pair, an index and a crypto pair alike.
TWO SETTINGS, AND THE SCRIPT HELPS YOU WITH ONE OF THEM
Set the Grid Anchor Price to a round number at or below current price - 1.0 for EURUSD, 100.0 for USDJPY. Then set the Box Size in price terms; a 10-pip EURUSD box is 0.00100.
Box size is instrument-specific by nature. A 0.001 box that reads EURUSD beautifully is meaningless on an index trading at 18,000, and there is no universal number. You don't need to know it in advance - the script tells you. If your box size is so large that the loaded history barely spans any boxes, or so small that it can't be read, an on-chart message says which way you're wrong and suggests a value for that instrument. So: put in any reasonable guess, read the message, adjust, and repeat until it stops complaining. Then check that the structure it draws matches moves you recognise. Write the number down - you'll reuse it.
Defaults are set for EURUSD. On anything else, expect the box-size message first. That's the setup assistant doing its job, not a fault.
MAKING IT READABLE
Two minutes of chart setup is the difference between "this is broken" and "oh, I see it."
1. Dim the candles - hollow bars or a muted grey. The P&F structure should be what your eye lands on; the candles are context. This one change does most of the work.
2. Lock the price-to-bar ratio, and set it to your box size divided by three. A column is three bars wide and a 45-degree line rises one box per column, so that ratio is what makes the geometry square - 0.00100 box on EURUSD gives 0.000333. To check it: draw an ordinary trend line at 45 degrees over one the script has drawn. If they lie on top of each other you are set. If they diverge, the ratio is wrong, and everything else on the chart is being read at the wrong angle.
3. Give it history. Too short a window and there is nothing to build.
4. Start on a timeframe you already read well. The structure comes from that chart's own data, so the timeframe you pick is the timeframe you're analysing.
HONEST NOTES ON CONSTRUCTION
- Standard charts only. Deliberately not run on TradingView's P&F chart type, which produces synthetic bars - levels read off those don't correspond to prices anyone could have traded.
- Columns come from closing prices. A choice, not an oversight: closes filter intrabar noise. The cost is real - a spike that reverses before the close prints no box, and structure that depended on it won't appear.
- The most recent 160 columns are drawn. Deeper history isn't rendered. TradingView caps how much any one script may draw, and the newest structure is the structure worth keeping.
- No alerts. There are none in this script.
- Price only. No volume input and no volume interpretation.
- It won't pick your box size for you. It will tell you when yours is wrong, which is a different and more honest thing.
- The detection is geometric. It will mark structure that later fails, as every structural method does.
- No performance claims are made here, and none are implied.
Pine v6, overlay, open source. Nothing in the file requests data from another symbol or timeframe.
If you're learning Point & Figure: put this on a market you already know and watch the columns build next to the candles you recognise. That is the fastest way in.
Wskaźnik

Navyraid ToolNavyraid Tool - ICT All-in-One Suite
The Navyraid Tool is a comprehensive, all-in-one indicator designed for traders utilizing Inner Circle Trader (ICT). To prevent chart clutter from overlapping indicators, this tool intelligently consolidates time-based sessions, liquidity levels, price gaps, and SMT divergences into a single, lightweight suite.
Key Features & How It Works:
Smart Auto-DST Sessions: Visually highlights the Asia, London, and New York sessions. It features a built-in dynamic timezone engine that automatically shifts session start/end times based on the active Daylight Saving Time (DST / Non-DST) period. Users can simply toggle between "Forex & Gold Mode" or "Index Mode" to get the mathematically accurate session times without manual monthly adjustments.
Liquidity Levels (PDH/PDL & PWH/PWL): Automatically maps out the Previous Daily High/Low and Previous Weekly High/Low. These lines serve as visual aids for identifying potential draw-on-liquidity targets or purge levels.
True Price Gaps (NWOG & NDOG): Plots the New Week Opening Gap (NWOG) and New Day Opening Gap (NDOG). The indicator actively tracks price interaction; if a candle mitigates and closes outside the gap boundary, it dynamically changes color to represent an "Inverse Gap."
Multi-Timeframe FVG (Fair Value Gaps): Simultaneously displays Higher Timeframe (HTF) and Lower Timeframe (LTF) FVGs on your current chart. Similar to the price gaps, these zones turn into Inverse FVGs (IFVG) upon full mitigation.
Manual SMT Divergence Engine: A strictly manual, linear SMT tracking system. By inputting a correlated comparison symbol (e.g., SP500FT vs NAS100FT, or EURUSD vs GBPUSD), the script calculates and draws structural divergences across Weekly, Daily, and Sessional timeframes.
Why this script?
Most ICT indicators only focus on one concept. The Navyraid Tool integrates all crucial time-and-price theories into one organized dashboard while maintaining high performance through strict historical lookback limiters.
Disclaimer: This indicator is designed solely for educational and structural analysis. It does not generate buy/sell signals. Always use proper risk management. Wskaźnik

Triple Confluence Meter - Trend, Momentum and Volume AgreementThree indicators agreeing feels like three reasons. Usually it is one reason counted three times — trend, momentum and volume all read the same price series, so of course they tend to point the same way.
This builds the ordinary confluence indicator and then does the thing confluence indicators never do: it grades itself.
THE THREE VOTES
Trend close above or below an EMA
Momentum RSI above or below 50
Volume the bar's direction, but only on bars where volume beats its average
Sum them for a score from −3 to +3. At the extremes all three agree, the bar is coloured, and a small triangle marks the first bar of each new alignment. On symbols with no volume feed the third vote abstains and the scale becomes −2 to +2 rather than quietly voting zero forever.
THE PART THAT MATTERS
Over the lookback, the script finds every alignment that happened at least one full horizon ago — so its outcome is already settled — and counts how often price actually went the signalled way. Then it does the subtraction almost nobody does:
Edge = hit rate after alignment − base rate over all bars
The base rate is the catch. A bullish signal firing during an uptrend will show a glorious 60% hit rate while price rose 60% of the time regardless, and an edge near zero tells you the signal contributed nothing. Only the difference is information.
READING THE SCORECARD
Trend / Momentum / Volume — each vote's current direction, with the RSI value shown so you can see how close the momentum vote is to flipping.
Score — the sum and whether it counts as aligned.
Base rate up — how often price rose over the horizon on all bars in the window. This is the number to beat.
After bull align / After bear align — the hit rate following each kind of alignment, with n= the number of events behind it. Read the n before the percentage. Alignment is rare by construction and thirty events is an anecdote.
Edge — the two subtractions, in percentage points. Positive means the alignment knew something the drift did not.
Sample — bar count and the roughly independent sample size. Overlapping horizons mean 500 bars at a 10-bar horizon is nearer 50 independent observations.
WHAT IT SHOWS RIGHT NOW
On BTCUSD 1h at the time of writing, with a 50% base rate: after bullish alignment price rose just 31.0% of the time across 58 events, an edge of −19.0 pp. Bearish alignment fared better but still negative at −7.9 pp.
Read that again, because it is the whole argument. Buying when trend, momentum and volume all agreed was substantially worse than a coin flip over this window. In a mean-reverting market that is exactly what a momentum confluence should do — it arrives late, at the point where the move it is confirming is closest to exhaustion. The indicator is not broken. The premise is.
Run it on your own symbol and timeframe before drawing any conclusion from mine. The answer changes, and being able to see it change is the point of shipping this rather than another confluence indicator that just glows green.
HONEST LIMITS
A hit rate is not a P&L. It ignores position size, cost, slippage, and the size of the moves it counts. Being right on small moves and wrong on large ones loses money at any hit rate.
Overlapping horizons correlate the observations, so the effective sample is much smaller than the event count implies. Treat differences of a few percentage points as noise.
Three votes drawn from one price series are not three independent opinions. That is a feature of the design being examined here, not a bug in the measurement.
Changing the EMA, RSI or volume lengths changes the answer. If you tune them until the edge looks good, you have fitted the window rather than found something.
NO REPAINT
There is no request.security call anywhere in this script, so the higher-timeframe lookahead problem does not arise. Every graded alignment sat at least one full horizon in the past and its outcome is already history. The current bar is scored but never graded.
Open source under MPL 2.0. Read it, fork it, tell me where I am wrong. Wskaźnik

Risk-Adjusted Performance Rankings | NickJoanRisk-Adjusted Performance Rankings | NickJoan
Core Idea
Risk-Adjusted Performance Rankings is a multi-asset comparison dashboard designed to rank up to 15 symbols by how efficiently they convert recent price movement into risk-adjusted return. Instead of looking only at raw price performance, the indicator evaluates three classic performance measures: Sharpe, Sortino and Omega over a user-defined lookback window and organizes the results into a table.
The script can be used in two ways:
• As a metrics table, where all three risk-adjusted values are shown side by side for each asset.
• As a ranking tool, where the symbols are sorted by Sharpe, Sortino, Omega, or a composite Z-Score score.
Calculation Logic
The indicator works by taking the percentage return of each symbol over the selected period and then building three separate statistics from that same return stream.
1. Return calculation
For each symbol, the script first calculates the one-bar rate of change. This creates a rolling return series that acts as the base input for all three risk-adjusted metrics.
2. Sharpe ratio
The Sharpe calculation measures average return relative to total return volatility.
• The script calculates the mean of returns over the selected lookback.
• It calculates the standard deviation of those returns.
• It divides mean return by standard deviation.
• It then multiplies by the square root of the lookback length to create a rolling-style scaled value.
In practical terms, a higher Sharpe reading means the asset has produced more return for each unit of total volatility.
3. Sortino ratio
The Sortino ratio is similar to Sharpe, but it only penalizes downside volatility.
• The script collects only negative returns from the lookback window.
• It computes the standard deviation of those downside returns.
• It divides mean return by that downside deviation.
• It then scales the result by the square root of the lookback.
This means Sortino rewards assets that may have volatile upside moves but relatively controlled downside behavior.
4. Omega ratio
The Omega calculation compares total gains to total losses over the selected window.
• All positive returns are summed as gains.
• All negative returns are converted to positive values and summed as losses.
• Omega is computed as the ratio of total gains to total losses.
A value above 1 suggests gains outweigh losses, while a value below 1 suggests the opposite.
Ranking Logic
The indicator supports several ranking modes, and each one uses the same asset list but applies a different sort key.
Metrics Table
In Metrics Table mode, the script shows:
• The ticker name.
• Sharpe.
• Sortino.
• Omega.
This mode is the most direct view if you want to inspect each asset’s raw values without sorting.
Sharpe / Sortino / Omega ranking
When one of these modes is selected:
• The table sorts the assets by that chosen metric.
• The highest values appear at the top.
• The table becomes a direct performance leaderboard.
Z-Score ranking
The Z-Score mode is a composite ranking system.
• The script first computes the mean and standard deviation of each metric across all 15 assets.
• It then converts each asset’s Sharpe, Sortino, and Omega into z-scores.
• Those three standardized values are averaged into one composite score.
• Assets are sorted by that final score.
This allows apples-to-apples comparison even when the raw metrics live on different numeric scales.
What the Colors Mean
The script uses color thresholds to make the table easier to read at a glance.
Sharpe colors
Sharpe cells are colored according to the input range defined by:
• Sharpe Min
• Sharpe Max
Values below the minimum are treated as weak.
Values between the lower zone and upper zone are shown as progressively stronger.
Values above the upper threshold are treated as strong.
Sortino colors
Sortino uses the same idea, but with its own range:
• Sortino Min
• Sortino Max
This allows the heatmap to reflect downside-adjusted performance independently from Sharpe.
Omega colors
Omega is especially important because it is naturally centered around 1.0.
• Values below the lower threshold are weak.
• Values between the band limits gradually improve.
• Values above the upper threshold are strong.
Z-Score colors
The Z-Score mode uses a standardized color logic:
• Strongly negative values are weak.
• Slightly negative values are mid-negative.
• Slightly positive values are mid-positive.
• Strongly positive values are strong.
This helps show whether an asset is above or below the group average on a normalized basis.
Table Output
Metrics Table output
In this mode, the table displays:
• Column 1: ticker.
• Column 2: Sharpe.
• Column 3: Sortino.
• Column 4: Omega.
Single-metric ranking output
In Sharpe, Sortino, and Omega modes, the table displays:
• Rank number.
• Ticker.
• Chosen metric.
This keeps the interface minimal while still showing the full ranked order.
Z-Score output
In this mode, the table displays:
• Rank number.
• Ticker.
• Sharpe Z.
• Sortino Z.
• Omega Z.
• Average score.
This view is useful when you want a compact, relative ranking rather than raw values.
Inputs
The indicator has four main input groups.
Calculation
• Period: defines the lookback window used for all metric calculations.
Table
• Display Mode: chooses between Metrics Table, Sharpe, Sortino, Omega, and Z-Score.
• Table Position: controls where the table is placed on the chart.
Color Scale
• Sharpe Min / Max: controls the heatmap thresholds for Sharpe.
• Sortino Min / Max: controls the heatmap thresholds for Sortino.
• Omega Min / Max: controls the heatmap thresholds for Omega.
Colors
• Strong: the strongest positive color.
• Mid +: the intermediate positive color.
• Mid -: the intermediate negative color.
• Weak: the weakest negative color.
Tickers
The script includes 15 symbol inputs, allowing you to compare a basket of assets at once. This makes it suitable for crypto rotation, watchlist comparison, or broad performance ranking across a selected universe.
How to Use It
This indicator is best used as a relative strength and quality filter, not as a standalone entry signal.
Trend selection
Use the ranking table to see which assets are showing the best risk-adjusted behavior over the chosen period.
Rotation analysis
If you track a basket of coins or market leaders, the indicator can help identify which names are improving in risk-adjusted terms and which ones are losing momentum.
Risk control
A raw gain is not always useful if it comes with excessive volatility or poor downside behavior. This script helps highlight assets with better return efficiency, not just bigger movement.
Multi-factor comparison
Because Sharpe, Sortino, and Omega emphasize different aspects of return quality, the script gives a more balanced view than a single metric alone.
Practical Interpretation
Here is a simple way to read the results:
• High Sharpe: efficient return relative to total volatility.
• High Sortino: strong return with less downside volatility.
• High Omega: gains outweigh losses over the lookback window.
• High Z-Score average: strong performance relative to the rest of the selected universe.
If an asset scores well across all three, it usually represents a stronger and more stable candidate than one that only looks good on one metric.
Best Use Cases
Typical uses include:
• Crypto basket comparison.
• Top-asset ranking.
• Risk-adjusted momentum filtering.
• Rotation watchlists.
• Regime-aware asset selection.
It is especially useful when you want to compare many symbols quickly without manually calculating which ones are actually performing best on a quality-adjusted basis.
Notes
The metric table is only as good as the selected lookback period and asset set.
• Shorter periods react faster but can be noisier.
• Longer periods smooth the results but may lag recent shifts.
• The Z-Score mode is relative to the selected group, so its meaning depends on the symbols you include. Wskaźnik

Volume Nodes & Value Migration [MQLSoftware]Volume Nodes & Value Migration is an anchored volume profile engine that rebuilds the profile construction itself and then measures how price actually behaves around the profile's own structure: the Point of Control (POC), the Value Area (VAH / VAL), high-volume nodes (HVN) and low-volume nodes (LVN). Instead of a fixed number of rows filled by spreading each bar's volume uniformly, it derives the bin height from ATR at each window anchor, weights every bar's volume toward its close with a triangular kernel, recomputes the POC and Value Area on every confirmed bar so the migration of value is visible as a trail, arms the committed POC and high-volume nodes as trackable levels with an accepted / rejected state machine, and reports measured base rates for those events from the chart's own history.
This is a visual analytical tool intended for chart reading and volume-structure mapping. It does not execute trades and does not provide financial advice.
Key Features
Anchored volume profiles (Day / Week / Month / Quarter, or Auto per chart timeframe) with bin height derived from ATR at the window anchor, so the bin count follows the window's range-to-ATR ratio instead of a fixed row number
Close-weighted triangular distribution: each bar's volume is spread over its high-low span with the apex at the close, so the settled price carries more weight than the wick extremes
Developing POC step-trail and Value Area band for the active window, recomputed on every confirmed bar; committed windows keep their final POC and Value Area lines so history stays clean, and consecutive windows are chained with dotted POC-to-POC links labelled with the migration distance in ATR and percent
Committed POC and the strongest HVNs arm as horizontal levels and every return is tracked armed, then accepted (confirmed closes inside the node zone) or rejected (a probe through the node center that closes outside the zone)
Thin Zones (LVN) of each committed window shaded as context — the low-volume gaps price historically transits rather than builds business in
A statistics panel with the live window status, developing value, node states and measured base rates: how often price revisited the prior POC and how node retests resolved, each with its sample size
Four confirmed-bar alerts: node accepted, node rejected, profile committed, prior POC revisited
Core Concept
TradingView already ships volume profile tools (Visible Range, Fixed Range, Session and periodic profiles), and most community profiles repeat the same construction: a fixed row count, each bar's volume spread uniformly across its high-low range, and a final static histogram left for the reader to interpret. This indicator rebuilds each of those stages and then closes the loop by measuring what price actually does at the profile's own levels. Five specific algorithmic elements:
1. Adaptive resolution. The bin height is derived from ATR at the window anchor (Coarse 0.50, Balanced 0.25, Fine 0.125 ATR per bin), so the number of bins follows the window's range-to-ATR ratio. A quiet range window and an expansion window get structurally comparable profiles on any symbol and timeframe, with no fixed row count and no per-market tuning. If a window's range outgrows the internal cap, bins merge 2:1 and the height doubles — resolution stays bounded by construction.
2. Close-weighted triangular distribution. Each bar's volume is distributed over its high-low span by a triangular kernel with its apex at the bar close: the weight a price bin receives is the integral of that kernel over the bin. For a bin inside a bar with low L, high H and close C, the weight is F(b) - F(a), where F(x) = (x - L)^2 / ((H - L)(C - L)) below the close and F(x) = 1 - (H - x)^2 / ((H - L)(H - C)) above it. The settled price therefore carries more weight than the wick extremes, which a uniform spread treats identically to the body.
3. Developing value area. POC, VAH and VAL are recomputed on every confirmed bar of the active window; the POC is drawn as a step trail and the Value Area as a developing band, so the reader sees value migrate through the window — POC ladders, value-area expansion and contraction — rather than only the final snapshot. Once a window commits, its trail retires and the final POC / VAH / VAL lines remain, so history stays readable. Committed windows are chained with dotted POC-to-POC links labelled with the migration distance in ATR units and percent.
4. Node acceptance state machine. When a window commits, its POC and the strongest HVNs (local peaks holding at least half of the POC volume) arm as horizontal levels. Every return is tracked on confirmed bars only: a retest is accepted after N consecutive confirmed closes inside the node zone (node center plus/minus half an ATR, never thinner than one bin), and rejected when a probe trades through the node center and closes outside the zone, or when a visit leaves the zone before N closes. A graze of the zone edge that neither trades the center nor closes inside resolves nothing. Resolutions are latched and marked on the chart; unresolved nodes expire when the next window commits.
5. Measured base rates. The panel reports observed frequencies from this chart's own loaded history: how often price traded back through the prior window's POC, how often POC retests resolved as accepted, and how often HVN retests were rejected — each with its sample size. Below a minimum sample the panel says "collecting" instead of quoting a percentage. Observed frequencies, not assumptions, and no claims attached to them.
Anatomy of the Display
The committed histogram is the final profile of each closed window, drawn from the window's start with bin brightness following volume share; the Value Area is shaded behind it. The POC row and line mark the single price bin that traded the most volume, labelled `POC · High Volume Node`; VAH and VAL are dashed lines labelled `VAH · Value Area High` and `VAL · Value Area Low`.
The developing trail is a step line of the active window's POC with the developing Value Area shaded behind it, both recomputed on every confirmed bar and existing only for the window still forming. The dotted migration link connects the final POCs of consecutive windows and carries a label with the shift in ATR units and percent.
Node lines extend right from each commit: the POC node in the bright POC color, HVNs in the profile color, each labelled by kind. When a retest resolves, the line recolors and a mark is printed: `✓ accepted` when price held the required confirmed closes inside the zone, `✕ rejected` when it was turned away. Expired (untested) nodes fade to dotted.
Thin Zones are faint dashed boxes labelled `LVN · Thin Zone` over the committed window's low-volume gaps. They carry no state machine and no alerts — context only.
The panel shows the window status (anchor period, bars, bins and bin height), the developing POC and Value Area, the POC migration versus the prior window, the state of each armed node, and the measured base rates with sample sizes.
Notes on Repainting
Volume accumulation, developing POC / VAH / VAL updates, node state transitions, base-rate counters and alerts run on confirmed bars only.
A committed profile is final: it is built exclusively from the confirmed bars of a closed window and is never recalculated afterwards.
Node resolutions are latched. An accepted or rejected mark cannot un-happen if price later trades back through the level.
The live developing histogram, POC trail and Value Area band of the current window redraw as the window grows — they are explicitly visual context for the forming profile, not signals.
The script requests no higher-timeframe data at all (no `request.security` calls); window anchors are detected with `timeframe.change` in the chart context.
Alerts are gated by confirmed-bar events and fire once per closed bar, never intra-bar.
Typical Analysis Workflow
A common analytical workflow may include:
Reading the committed profile for the prior window: where the POC sits, how wide the Value Area is, and where the Thin Zones are
Watching the developing POC trail of the active window — a POC laddering in one direction reads as value migrating, a static POC as value building in place
Comparing the migration link and the panel's MIGRATION row to see how far value shifted between windows in ATR terms
Waiting for price to return to an armed node and letting the state machine resolve the retest into accepted or rejected on confirmed bars
Consulting the measured base rates to see how often such revisits and retests actually occurred on this chart's history, then combining the read with other forms of analysis and risk management
Configuration
Anchor Period - the window each profile covers (Auto, Day, Week, Month, Quarter); Auto follows the chart timeframe and a pick at or below it escalates automatically.
Committed Profiles to Keep - how many closed windows keep their histogram drawn; statistics always use the full loaded history.
Profile Detail - target resolution (Coarse / Balanced / Fine), expressed as ATR per bin, never a bin count.
ATR Length - the ATR lookback used for bin height and migration distances.
Value Area % - the share of window volume the Value Area encloses.
Track POC / HVN as Nodes - arms committed levels for the accepted / rejected state machine.
Acceptance Closes - confirmed closes inside the node zone required for an accepted resolution.
HVN Nodes per Window - how many high-volume nodes arm besides the POC.
Thin Zones (LVN) - shades the committed window's low-volume gaps.
Resolved Marks to Keep - how many resolved node marks stay drawn on the chart; the measured statistics are unaffected.
Rendering - committed profiles, live developing profile, profile width, the active window's POC trail and Value Area band, migration links, glow, and the four palette colors.
Statistics Panel - visibility, corner and text size.
Markets and Timeframes
The indicator can be applied across multiple markets and timeframes:
Forex
Stocks and Indices
Commodities
Cryptocurrencies
Because the bin height, node zones and migration distances are all ATR-based, the visual behavior stays consistent across instruments and timeframes. On symbols that supply no volume data the script weights every bar equally (a time-at-price read) and the panel states so explicitly.
Alerts
Node accepted - price printed the required confirmed closes inside an armed node zone
Node rejected - an armed node turned the retest away (probe through the node center with a confirmed close outside the zone)
Profile committed - an anchor window closed; its profile is final and its nodes are armed
Prior POC revisited - price traded back through the previous window's Point of Control
All alerts evaluate on confirmed bars to avoid intra-bar oscillation. A dynamic alert message naming the exact event(s) is also provided. Wskaźnik
