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

Indicator

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

Advanced RVOL Timed Buy Candidate## Advanced RVOL Timed Buy Candidate
このインジケーターは、日足を対象に、通常よりも出来高が増えている銘柄を検出するための相対出来高(RVOL)インジケーターです。
単純に当日の出来高を見るだけではなく、指定時刻までの出来高進捗率から1日の推定出来高を計算し、引け前や午前中など、ユーザーが設定した時刻に購入候補を通知できます。
### 主な特徴
#### 1. 現在足を除外した平均出来高
現在進行中の日足を平均計算に含めず、過去の確定済み出来高と比較します。
これにより、当日の大きな出来高によって平均値そのものが上昇し、出来高増加の検出が遅れる問題を軽減します。
平均期間は以下から選択できます。
* 任意の日数
* 月初から
* 四半期初から
* 年初来
* 決算発表後
データ数が不足している場合は、任意日数の移動平均へ自動的に切り替えることもできます。
#### 2. 相対出来高(RVOL)の表示
当日の出来高を平均出来高で割り、通常時と比較して何倍の出来高が発生しているかを表示します。
例:
* RVOL 1.00倍:平均と同程度
* RVOL 1.50倍:平均の1.5倍
* RVOL 2.00倍:平均の2倍
オシレーターでは、平均出来高を0%として表示します。
* 0%:平均と同じ
* +50%:平均の1.5倍
* +100%:平均の2倍
#### 3. 指定時刻での推定RVOL判定
最大2つの途中判定時刻を設定できます。
例:
* 10:00時点
* 15:24時点
それぞれの時刻について、「通常はその時刻までに1日の出来高の何%が消化されるか」を設定します。
例として、平均1日出来高が100万株、10:00までの通常進捗率を30%と設定し、10:00時点で45万株の出来高がある場合、推定RVOLは次のようになります。
45万株 ÷(100万株 × 30%)=1.50倍
この機能により、日足の確定を待たずに、出来高ペースが通常より速い銘柄を検出できます。
#### 4. 決算フィルター
決算発表日や決算直後は、通常とは異なる大きな出来高が発生しやすいため、購入候補から除外できます。
除外する営業日数は設定可能です。
* 0:決算日のみ除外
* 1:決算日と翌営業日を除外
* 2:決算日とその後2営業日を除外
決算日には「E」マークを表示でき、除外期間の背景色も設定できます。
#### 5. 価格条件フィルター
出来高だけでは、買いによる上昇と売りによる急落を区別できません。
そのため、以下の価格条件を任意で追加できます。
* 陽線であること
* 終値が当日の値幅上部にあること
* 直近高値を終値で突破していること
「終値位置」は、その日の安値から高値までの範囲内で、終値がどこにあるかを表します。
70%に設定した場合、終値が当日の値幅の上位30%以内にあることが必要です。
#### 6. アラート
以下のアラートを利用できます。
* 途中判定1の購入候補
* 途中判定2の購入候補
* 日足確定時の購入候補
途中判定アラートを使用する場合、PulseWireのアラート頻度は「バーにつき1回」に設定してください。
スクリプトや設定を変更した場合は、既存のアラートを削除して再作成する必要があります。
### 推奨初期設定
* チャート:日足
* 平均出来高:過去20日
* 購入候補基準:平均の150%
* 特大出来高基準:平均の200%
* 陽線条件:オン
* 終値位置:70%
* 高値突破条件:オフ
* 決算後の除外日数:1営業日
* 途中判定1:10:00
* 10:00までの出来高進捗率:30%
* 途中判定2:15:24
* 15:24までの出来高進捗率:90%
出来高の時間帯別分布は銘柄によって異なるため、進捗率は対象銘柄や市場に合わせて調整してください。
### 注意事項
このインジケーターは日足での使用を前提としています。
指定時刻のアラートは、時刻だけで自動実行されるものではありません。PulseWireが新しい価格または出来高データを受信した時点でスクリプトが再計算されます。
そのため、売買が少ない銘柄では、指定時刻ちょうどに通知されない場合があります。
また、途中判定で使用する当日の価格、出来高、ローソク足は未確定です。その後の取引によって、陽線・終値位置・高値突破などの条件が変化する可能性があります。
本インジケーターは、出来高と価格条件に基づいて銘柄候補を抽出するための補助ツールです。売買を推奨するものではなく、利益を保証するものでもありません。実際の投資判断は、価格帯別出来高、VWAP、トレンド、企業業績、流動性、リスク管理などと併せて行ってください。
## Advanced RVOL Timed Buy Candidate
This indicator is a daily-chart Relative Volume tool designed to identify stocks experiencing unusually strong volume activity.
In addition to comparing the current volume with historical average volume, it can estimate full-day relative volume from the volume accumulated by a user-defined time. This allows users to receive potential buy-candidate alerts during the morning session or shortly before the market close.
### Main Features
#### 1. Average volume excluding the current bar
The current daily bar is excluded from the average-volume calculation.
This prevents unusually high current-day volume from raising the reference average and delaying the detection of a potential volume expansion.
The following averaging periods are available:
* Custom number of days
* Month to date
* Quarter to date
* Year to date
* Since the latest earnings release
When insufficient data is available, the indicator can automatically fall back to the custom moving-average period.
#### 2. Relative Volume display
Relative Volume is calculated by dividing the current volume by the selected average volume.
Examples:
* RVOL 1.00x: volume is equal to the average
* RVOL 1.50x: volume is 1.5 times the average
* RVOL 2.00x: volume is twice the average
The oscillator uses average volume as the zero line.
* 0%: equal to average volume
* +50%: 1.5 times average volume
* +100%: twice average volume
#### 3. Time-based projected RVOL
The indicator provides two configurable intraday evaluation times.
Examples:
* 10:00
* 15:24
For each evaluation time, users can define the percentage of normal daily volume that is typically completed by that time.
For example, assume:
* Average daily volume: 1,000,000 shares
* Expected volume progress by 10:00: 30%
* Actual volume at 10:00: 450,000 shares
The projected RVOL is:
450,000 ÷ (1,000,000 × 30%) = 1.50x
This feature helps identify stocks whose volume is developing faster than normal without waiting for the daily bar to close.
#### 4. Earnings filter
Earnings announcements and the sessions immediately following them often produce unusually high volume that may not represent normal accumulation.
The earnings filter can exclude the earnings session and a configurable number of subsequent trading days.
Examples:
* 0: Exclude the earnings session only
* 1: Exclude the earnings session and the next trading day
* 2: Exclude the earnings session and the following two trading days
An “E” marker can be displayed on earnings sessions, and the excluded period can be highlighted with a background color.
#### 5. Price-action filters
High volume alone cannot distinguish strong buying pressure from heavy selling.
Optional price-action filters are therefore included:
* Require a bullish candle
* Require the close to finish in the upper portion of the daily range
* Require a closing-price breakout above a recent high
The close-location value measures where the close is positioned between the session low and high.
For example, a setting of 70% requires the close to finish within the upper 30% of the session’s range.
#### 6. Alerts
The following alert conditions are available:
* Timed evaluation 1 buy candidate
* Timed evaluation 2 buy candidate
* Daily-close buy candidate
For timed alerts, set the PulseWire alert frequency to “Once Per Bar.”
After changing the script or its input settings, existing alerts must be deleted and recreated because PulseWire alerts use a server-side snapshot of the script and settings from the time the alert was created.
### Suggested Starting Settings
* Chart timeframe: Daily
* Average-volume period: 20 days
* Buy-candidate threshold: 150% of average
* Mega-volume threshold: 200% of average
* Bullish candle filter: Enabled
* Minimum close location: 70%
* Breakout filter: Disabled
* Earnings exclusion: Earnings day plus one trading day
* Timed evaluation 1: 10:00
* Expected volume progress by 10:00: 30%
* Timed evaluation 2: 15:24
* Expected volume progress by 15:24: 90%
Intraday volume distribution varies by stock and market, so the expected volume-progress settings should be adjusted for the instruments being monitored.
### Important Notes
This indicator is designed primarily for use on the daily timeframe.
Timed alerts are not triggered by an independent clock. Pine Script recalculates when PulseWire receives a new price or volume update.
As a result, thinly traded stocks may not generate an alert at the exact selected time.
Price, volume, candle direction, close location, and breakout status remain provisional before the daily bar closes. A timed signal may therefore differ from the final daily-close result.
This indicator is a screening and decision-support tool based on volume and price conditions. It is not financial advice, does not recommend any security, and does not guarantee future performance. Users should combine its signals with additional analysis, including VWAP, volume profile, trend structure, company fundamentals, liquidity, position sizing, and risk management.
Indicator

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

ETH1! Futures Volume//@version=6
indicator("ETH1! Futures Volume", shorttitle="ETH1 Vol", overlay=false)
// Inputs
ethSymbol = input.symbol("CME:ETH1!", "ETH1! Futures Symbol")
maLength = input.int(20, "Volume MA", minval=1)
highMult = input.float(1.5, "High Volume Multiplier")
ultraMult = input.float(2.5, "Ultra Volume Multiplier")
lowMult = input.float(0.5, "Low Volume Multiplier")
// Get ETH1! Futures Volume
ethVol = request.security(ethSymbol, timeframe.period, volume)
// Moving Average
volMA = ta.sma(ethVol, maLength)
// Conditions
isUltra = ethVol >= volMA * ultraMult
isHigh = ethVol >= volMA * highMult and not isUltra
isLow = ethVol <= volMA * lowMult
// Original PulseWire volume colors
volColor = close >= open ? color.green : color.red
// Plots
plot(ethVol, title="ETH1! Volume", style=plot.style_columns, color=volColor)
plot(volMA, title="Volume MA", color=color.orange, linewidth=2)
plotshape(isUltra ? ethVol : na,
title="Ultra High",
style=shape.triangleup,
location=location.absolute,
color=color.orange,
size=size.small)
plotshape(isHigh ? ethVol : na,
title="High",
style=shape.circle,
location=location.absolute,
color=color.yellow,
size=size.tiny)
plotshape(isLow ? ethVol : na,
title="Low",
style=shape.triangledown,
location=location.absolute,
color=color.gray,
size=size.tiny)
// Alerts
alertcondition(isUltra, title="Ultra High Volume", message="ETH1! Ultra High Volume")
alertcondition(isHigh, title="High Volume", message="ETH1! High Volume")
alertcondition(isLow, title="Low Volume", message="ETH1! Low Volume") Indicator

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 Indicator

BTC1! Futures Volume//@version=6
indicator("BTC1! Futures Volume", shorttitle="BTC1 Vol", overlay=false)
// Inputs
btcSymbol = input.symbol("CME:BTC1!", "BTC1! Futures Symbol")
maLength = input.int(20, "Volume MA", minval=1)
highMult = input.float(1.5, "High Volume Multiplier")
ultraMult = input.float(2.5, "Ultra Volume Multiplier")
lowMult = input.float(0.5, "Low Volume Multiplier")
// Get BTC1! Futures Volume
btcVol = request.security(btcSymbol, timeframe.period, volume)
// Moving Average
volMA = ta.sma(btcVol, maLength)
// Conditions
isUltra = btcVol >= volMA * ultraMult
isHigh = btcVol >= volMA * highMult and not isUltra
isLow = btcVol <= volMA * lowMult
// Original Volume Colors
volColor = close >= open ? color.green : color.red
// Plots
plot(btcVol, title="BTC1! Volume", style=plot.style_columns, color=volColor)
plot(volMA, title="Volume MA", color=color.orange, linewidth=2)
plotshape(isUltra ? btcVol : na,
title="Ultra High",
style=shape.triangleup,
location=location.absolute,
color=color.orange,
size=size.small)
plotshape(isHigh ? btcVol : na,
title="High",
style=shape.circle,
location=location.absolute,
color=color.yellow,
size=size.tiny)
plotshape(isLow ? btcVol : na,
title="Low",
style=shape.triangledown,
location=location.absolute,
color=color.gray,
size=size.tiny)
// Alerts
alertcondition(isUltra, title="Ultra High Volume", message="BTC1! Ultra High Volume")
alertcondition(isHigh, title="High Volume", message="BTC1! High Volume")
alertcondition(isLow, title="Low Volume", message="BTC1! Low Volume") Indicator

SMC Structures + Baseline proSMC Structures + Baseline pro Tuấn Anh
etLineStyle(lineOption) =>
lineOption == "┈" ? line.style_dotted : lineOption == "╌" ? line.style_dashed : line.style_solid
get_structure_highest_bar(lookback) =>
var int idx = 0
maxBar = bar_index > lookback ? ta.highestbars(high, lookback) : ta.highestbars(high, bar_index + 1)
for i = 0 to lookback - 1 by 1
if high > high and high <= high and ((i+1) * -1) >= maxBar
idx := (i+1) * -1
idx := idx == 0 ? maxBar : idx
get_structure_lowest_bar(lookback) =>
var int idx = 0
minBar = bar_index > lookback ? ta.lowestbars(low, lookback) : ta.lowestbars(low, bar_index + 1)
for i = 0 to lookback - 1 by 1
if low < low and low >= low and ((i+1) * -1) >= minBar
idx := (i+1) * -1
idx := idx == 0 ? minBar : idx
// ── JMA (Jurik Moving Average) ──────────────────────────────────
jma(src, length, power, phase) =>
phaseRatio = phase < -100 ? 0.5 : phase > 100 ? 2.5 : phase / 100 + 1.5
beta = 0.45 * (length - 1) / (0.45 * (length - 1) + 2)
alpha = math.pow(beta, power)
var float jmaVal = 0.0
var float e0 = 0.0
var float e1 = 0.0
var float e2 = 0.0
e0 := (1 - alpha) * src + alpha * nz(e0 )
e1 := (src - e0) * (1 - beta) + beta * nz(e1 )
e2 := (e0 + phaseRatio * e1 - nz(jmaVal )) * math.pow(1 - alpha, 2) + math.pow(alpha, 2) * nz(e2 )
jmaVal := e2 + nz(jmaVal )
jmaVal Indicator

Indicator

Bill Williams: Alligator, Fractals, AO, AC, BW MFI, BDB# Bill Williams Chaos System — Alligator • Fractals • AO • AC • BW MFI • BDB
A complete Bill Williams inspired trading toolkit combining market structure, momentum, volume analysis and price behavior into one indicator.
This indicator is designed to help traders analyze the market through the principles of **Trading Chaos** by combining several key elements:
### 🐊 Alligator
The indicator includes the Bill Williams Alligator with Jaw, Teeth and Lips lines to identify market phases:
* Sleeping market (low activity)
* Awakening phase
* Trend development
* Trend continuation
The Alligator is also used as a filter for signal confirmation, helping avoid trades against the current market structure.
### 🔺 Fractals
Classic Bill Williams fractals are included to identify potential breakout levels and important swing points.
Fractals can help traders:
* Detect local highs and lows
* Identify breakout areas
* Understand market structure
### 🌈 Awesome Oscillator (AO)
AO momentum analysis with:
* Zero line crossing signals
* Saucer signals
* Alligator confirmation filter
Signals are generated only when price position agrees with the Alligator structure.
### 💎 Accelerator Oscillator (AC)
AC measures the acceleration and deceleration of momentum.
Included signals:
* Momentum continuation
* Counter-trend acceleration setups
* Filtered signals to reduce noise
### 📊 Bill Williams Market Facilitation Index (BW MFI)
Volume and price range analysis based on Bill Williams' Market Facilitation concept.
The indicator highlights four market states:
🟢 Green — volume and range increase (strong market participation)
🔵 Blue — range increases while volume decreases (possible continuation)
🩷 Pink — volume increases while range decreases (possible battle between buyers and sellers)
🟤 Brown — low activity / market pause
### 🔥 BDB (Divergent Bar Behavior)
Price action analysis based on bar location and relationship with the Alligator.
Detects:
* Strong bullish and bearish bars
* Weak divergent bars
* Market exhaustion behavior
Signals are filtered using Alligator positioning to improve quality.
### 📌 PB Signals (Price Behavior)
Additional price behavior signals based on:
* Candle position inside its range
* Relationship with the Alligator Teeth line
* Strong directional candle structure
Designed to highlight candles showing possible continuation behavior.
---
## Indicator Philosophy
This script combines:
* Market structure
* Momentum
* Volume
* Price action
* Trend confirmation
The goal is not to predict the market, but to help traders recognize current market conditions and make decisions using multiple confirmations.
⚠️ This indicator is an analytical tool and does not provide guaranteed buy or sell signals. Always combine signals with risk management and your own market analysis.
Created by OlekBard
Indicator

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 PulseWire’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 PulseWire’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 في PulseWire.
لا تتضمن النتائج العمولات أو الانزلاق السعري أو فرق العرض والطلب أو حجم الصفقة أو إمكانية التنفيذ الفعلي.
حقوق الكود والتعديلات
الكود الأصلي مفتوح المصدر من تطوير fluxchart.
تم تعديله بواسطة Mohammed Bedaiwi (mbedaiwi2).
تشمل التعديلات:
• التحويل إلى Pine Script v6
• تحسين معالجة الإطار الزمني
• استخدام فترة تلقائية تعادل أربع شمعات عند الحاجة
• حماية حسابات لوحة النتائج
• تغيير اسم وهوية المؤشر بصورة مستقلة
يظل الكود المعدل خاضعًا لترخيص Mozilla Public License 2.0.
إخلاء المسؤولية
هذا المؤشر أداة تعليمية وتحليلية فقط، ولا يمثل توصية مالية أو ضمانًا للربح.
ينطوي التداول والاستثمار على مخاطر. يجب على المستخدم إجراء تحليله المستقل، واستخدام حجم صفقة مناسب، وتطبيق إدارة المخاطر وعدم المخاطرة بأموال لا يستطيع تحمل خسارتها.
Indicator

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

Indicator

Indicator

Indicator

Volume DNA: Heatmap [BigBeluga]🔵 OVERVIEW
The Volume DNA: Heatmap is an advanced technical indicator created by BigBeluga to decode institutional volume and price action dynamics using market microstructure principles. Traditional volume indicators often look at volume in isolation, failing to account for the efficiency or inefficiency of price movement. In order to provide a solution to this problem, this indicator combines rolling volume Z-scores with high-low price spread Z-scores, classifying every single bar into distinct institutional signatures—such as Absorption, Effort, Exhaustion, and Stagnation.
The indicator aims to visualize institutional accumulation, distribution, and exhaustion points directly on the chart. The core element of its calculation involves tracking volume and spread deviations against rolling means defined as:
volZ = (volume - volMean) / volStd
spreadZ = (spread - spreadMean) / spreadStd
where volMean and spreadMean are moving averages over lookback lengths volLengthInput and spreadLengthInput , and volStd and spreadStd represent standard deviations. Higher values of volThreshInput and spreadThreshInput allow the indicator to filter out random market noise and isolate major institutional footprints.
🔵 FEATURES
The system utilizes a multi-layered matrix structure to provide actionable market intelligence:
1 — DNA Engine & Classification Matrix
Absorption ( ABS ): Triggered by high volume and narrow spread via highVol and narrowSpread , signaling institutional limit orders absorbing market flow.
Effort Bullish / Bearish ( EFF+ / EFF- ): Triggered by high volume and wide spread via highVol and wideSpread , signaling aggressive buying or selling pressure driving trend continuation.
Exhaustion ( EXH ) & Stagnation ( STG ): Tracks low volume relative to price spreads to identify thin liquidity moves or equilibrium consolidation phases.
2 — Visual Enhancements & Ghost Glows
Ghost Glow Effect: Renders a semi-transparent wider candle behind classified DNA bars using plotcandle(showGlowBar ? bodymax + glowExpand : na, ...) to visually distinguish key events from normal price action.
Liquidity Clouds: Draws transparent box zones over Absorption bars extending cloudExtendInput bars to the right, marking where institutional limit orders may be resting.
3 — Real-Time Barcode Tape & Statistics Tables
DNA Barcode Tape: Displays a vertical heatmap table on the chart showing the DNA type and volume of the last tapeRowsInput bars as a real-time institutional activity tape.
Stats Panel Table: Summarizes current bar status, Volume Z-Scores via str.tostring(volZ, "#.##") , and Spread Z-Scores for instant quantitative feedback.
🔵 HOW TO USE
Apart from the basic visualization of institutional volume signatures, this tool can also act in alternative ways to support decision-making:
Spot Institutional Absorption: Look for ABS candles and their accompanying Liquidity Cloud zones to identify potential support or resistance levels where large market participants are absorbing flow.
Ride Trend Continuations via Effort: Monitor EFF+ and EFF- signal shapes (where size and color intensity scale with volume Z-scores) to confirm aggressive momentum driving price in the direction of the breakout.
Anticipate Reversals with Exhaustion: Watch for EXH signals where price moves on thin liquidity, signaling that a current trend may be running out of fuel and nearing a pullback or reversal.
🔵 NOTES
Why this implementation is unique:
It merges volume and price spread analytics using statistical Z-scores rather than arbitrary thresholds, offering an objective look at market efficiency.
The multi-table interface provides both historical sequencing (Barcode Tape) and real-time metric tracking without crowding the main price action view.
The script is fully optimized for Pine Script version 6, utilizing high-performance array management (`var array dnaHistory = array.new(tapeRowsInput, 0)`) for smooth execution across extensive historical data.
Note: The indicator relies on rolling standard deviation calculations; initial chart loads require enough bars to populate the lookback window accurately.
Indicator

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

MoChen - Crypto Sessions and D/W/M OpensOVERVIEW
MoChen Crypto Sessions and DWM Opens is an overlay indicator designed for continuously traded cryptocurrency markets.
The script combines three configurable regional market sessions with UTC-based Daily, Weekly, and Monthly opening levels. Its purpose is to provide a consistent time-and-price framework for intraday analysis without requiring traders to redraw the same sessions and period-opening levels manually.
The indicator does not generate buy or sell signals. It provides contextual reference levels that can be combined with market structure, liquidity analysis, support and resistance, or the trader's own execution model.
SESSION FRAMEWORK
The default sessions are:
- Asian: 09:00-13:30 in Asia/Taipei
- London: 08:00-16:30 in Europe/London
- New York: 09:30-16:00 in America/New_York
These are configurable analysis windows for cryptocurrency trading. They should not be interpreted as official cryptocurrency exchange opening or closing hours because cryptocurrency markets trade continuously.
Each session uses its own IANA time zone. Europe/London and America/New_York automatically follow their respective daylight-saving-time rules, so users do not need to switch manually between summer and winter offsets.
While a session is active, the script tracks:
- Session open
- Developing session high
- Developing session low
- Latest session close
The session range updates as new bars form. When the session ends, its completed range stops updating.
Users can independently control:
- Session visibility
- Session time
- Session name
- Color and background opacity
- Open, close, high, and low visibility
- Line style and width
- Session labels
- Number of completed sessions retained
DAILY, WEEKLY, AND MONTHLY OPENS
The indicator also calculates three UTC-based period-opening references:
- D: Daily open at 00:00 UTC
- W: Weekly open at Monday 00:00 UTC
- M: Monthly open on the first calendar day at 00:00 UTC
These levels represent the opening price of the first available chart bar belonging to the corresponding UTC period.
The default visual hierarchy is:
- Daily Open: blue solid line, width 1
- Weekly Open: cyan solid line, width 2
- Monthly Open: yellow solid line, width 3
OVERLAPPING DWM LEVELS
A key feature of the script is its handling of overlapping Daily, Weekly, and Monthly opens.
When two or more periods begin from the same price, the indicator does not draw several identical lines on top of one another. It displays one consolidated level and uses the higher-timeframe visual style.
The priority is:
Monthly > Weekly > Daily
Examples:
- A Monday Daily Open that matches the Weekly Open is initially displayed as W/D.
- After that Daily period ends, the same higher-timeframe level is displayed as W.
- If a new month begins on Monday, the combined level is initially displayed as M/W/D.
- After the Daily period ends, it becomes M/W.
- After the Weekly period ends, the remaining higher-timeframe reference is displayed as M.
The underlying Daily, Weekly, and Monthly period states remain separate. Only their visual presentation is consolidated to reduce chart clutter and avoid making one price appear to be several different levels.
HOW TO USE THE INDICATOR
The session ranges can help traders observe:
- Expansion from an established regional range
- Breakouts above or below a completed session
- Reactions around a session open
- Continuation or reversal between Asian, London, and New York participation
- Whether price is trading above or below the Daily, Weekly, or Monthly open
One possible analysis sequence is:
1. Identify the current position relative to the Weekly and Monthly Open.
2. Observe the range formed during the Asian session.
3. Evaluate whether London expands, rejects, or remains inside that range.
4. Observe how New York reacts to the completed Asian and London ranges.
5. Use market structure and risk management to determine whether a trade is justified.
The indicator itself does not define an entry, stop loss, take profit, or directional forecast.
ORIGINAL IMPLEMENTATION
This script uses an independently implemented session and period-level architecture.
Its main distinguishing elements are:
- Three separately managed session states
- IANA-based daylight-saving-time handling
- Developing session ranges that freeze after completion
- Independent historical-object retention for each session
- UTC-based Daily, Weekly, and Monthly period detection
- Consolidated DWM display with higher-timeframe priority
- Dynamic removal of lower-timeframe labels after their periods expire
- Controlled line, label, and box lifecycle management
The DWM consolidation system is intended to preserve the meaning of each period while displaying only the most relevant higher-timeframe reference when multiple levels occupy the same price.
TIMEFRAME AND DATA LIMITATIONS
The session component is intended primarily for intraday charts.
Recommended chart timeframes include:
- 1 minute
- 3 minutes
- 5 minutes
- 15 minutes
- 30 minutes
On higher chart timeframes, a bar may span across a session boundary. In that case, the first or last chart bar detected inside a session may not represent the exact minute-level opening or closing price.
For example, a New York session beginning at 09:30 cannot always be represented precisely on a 1-hour or 4-hour chart.
The Daily, Weekly, and Monthly levels are based on UTC calendar boundaries. Users who require exchange-specific daily candles should verify whether their selected symbol's data feed aligns with the UTC period definition used by this script.
REAL-TIME BEHAVIOR
The developing high and low of an active session change as new price information becomes available. This is expected real-time behavior.
After a session ends, its completed high, low, open, and close references no longer update.
The script is designed without future-looking or lookahead calculations. It does not use completed future bars to alter earlier session results.
DISCLAIMER
This script is intended for educational, analytical, and informational purposes only.
It does not constitute financial advice, an investment recommendation, or a guarantee of future results. Users remain responsible for their own analysis, trading decisions, position sizing, and risk management.
繁體中文說明
MoChen Crypto Sessions and DWM Opens 是一套為 24 小時加密貨幣市場設計的圖表指標。
它整合三個主要市場時段,以及依 UTC 計算的日開、週開與月開,協助交易者建立一致的時間與價格參考架構,減少每天重複標記時段與開盤價的工作。
本指標不提供自動買賣訊號。
一、三大市場時段
預設時段為:
- Asian:09:00-13:30,Asia/Taipei
- London:08:00-16:30,Europe/London
- New York:09:30-16:00,America/New_York
這些是加密貨幣盤面分析使用的時間區間,不代表加密貨幣交易所的官方開盤或收盤。
倫敦與紐約使用 IANA 當地時區,因此會自動依日期處理夏令與冬令時間,不需要使用者手動切換 UTC 偏移。
時段進行中,指標會持續更新:
- 時段開盤價
- 時段最高價
- 時段最低價
- 最新時段收盤價
時段結束後,已完成區間停止更新。
二、日開、週開與月開
三個週期基準固定為:
- D:每日 UTC 00:00
- W:每週一 UTC 00:00
- M:每月第一天 UTC 00:00
預設樣式:
- D:藍色實線,線寬 1
- W:青色實線,線寬 2
- M:黃色實線,線寬 3
三、D/W/M 重疊處理
當日開、週開或月開位於同一個價格時,指標不會重複畫出多條完全相同的線。
顯示優先級為:
M > W > D
例如:
- 星期一的日開與週開相同時,建立當下顯示 W/D。
- 當日結束後,該高週期位置只顯示 W。
- 月初剛好是星期一時,建立當下顯示 M/W/D。
- 日線週期結束後顯示 M/W。
- 週線週期結束後只保留 M。
日、週、月的內部計算仍然彼此獨立,只有圖表上的顯示會進行整合。
四、使用方式
可以用來觀察:
- 亞洲時段建立的區間
- 倫敦是否延續或突破亞洲區間
- 紐約是否掃取或突破先前時段高低點
- 價格位於日開、週開與月開上方或下方
- 價格對時段開盤價及高週期開盤價的反應
建議搭配市場結構、流動性、支撐壓力與風險管理使用。
本指標不會自動提供進場、停損、止盈或方向預測。
五、週期限制
建議使用:
- 1 分鐘
- 3 分鐘
- 5 分鐘
- 15 分鐘
- 30 分鐘
在 1 小時或 4 小時等較高週期中,一根 K 棒可能橫跨時段邊界,因此時段開盤價與收盤價未必能精準對應到分鐘級時間。
六、即時更新與重繪說明
時段尚未結束時,最高價與最低價會隨即時價格更新,這是正常的進行中計算。
時段完成後,已完成區間不再更新。
本指標不使用未來資料產生歷史訊號。
免責聲明
本指標僅供教育、研究與盤面分析使用,不構成任何投資建議,也不保證任何交易結果。
使用者應自行完成交易判斷並做好風險管理。 Indicator

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

[SkuldX] Average Daily RangeSkuldX Average Daily Range
by SkuldX Trading Systems
What is it?
SkuldX ADR calculates the Average Daily Range across three independent periods and projects statistical price targets directly on the chart. Instead of just showing a raw number, it tells you exactly where today's statistically likely high and low are — and how much of that range has already been consumed. This transforms a simple volatility measure into a practical decision-making tool for every session.
The core concept
Every instrument has a characteristic daily range — how far it typically moves from low to high in a single day. ADR measures this by averaging the daily High minus Low over a chosen number of past sessions. When today's price approaches the ADR High or Low level projected from the daily open, the market is statistically reaching its expected limit for the day. This is where momentum tends to slow, consolidate, or reverse.
The key insight: if the market has already consumed 90%+ of its average daily range, the probability of further directional movement drops significantly. Conversely, if only 20% of the range has been used, there is substantial room left to move.
Three periods — three perspectives
🟡 ADR 5 — 5-day average (one trading week) . Most reactive to recent conditions. Best for identifying short-term volatility shifts and current week behavior.
🔵 ADR 10 — 10-day average (two weeks) . Balanced view of recent momentum without excessive noise.
🟠 ADR 20 — 20-day average (one month) . The standard institutional reference. Most stable and reliable for setting daily targets and stops.
All three periods are independent and can be toggled on or off. When all three are active simultaneously, the spacing between their levels gives a visual read on volatility expansion or contraction — tight clustering means stable conditions, wide separation means the market is in a transitional phase.
What you see on the chart
Each enabled period draws two horizontal lines per day — an ADR High and an ADR Low — projected symmetrically above and below the daily open (00:00 NY time). A dotted midline marks the daily open itself.
Each label shows three pieces of information simultaneously:
ADR20 H 2415.50 72% used
The projected level price
The ADR value in brackets — how many points the average daily range is
The percentage of today's range already consumed
Lines are drawn fresh at the start of each day and historical days remain visible on the chart for reference and backtesting.
Daily Range Used %
This is the most actionable metric in the indicator. It answers the question: how much room does the market have left today?
Below 50% — significant range remaining, directional moves are still viable
50–80% — range is being consumed, momentum may slow near ADR levels
Above 90% — statistically exhausted, high probability of slowdown, consolidation or reversal at ADR levels
Above 100% — unusual day, range has exceeded the historical average, often signals a news-driven or institutional event
Alerts
A configurable alert fires when the daily range consumed exceeds your threshold (default 90%). This allows you to catch exhaustion points in real time without watching the chart constantly. The alert specifies which ADR period triggered and the exact percentage consumed.
Settings
ADR 5 / 10 / 20 — enable or disable each period independently with custom colors
Show ADR High / Low levels — toggle the projected level lines
Show Daily Open — toggle the dotted midline at 00:00 NY open
Show Daily Range Used % — toggle the consumption percentage in labels
Show Labels — toggle all right-edge labels
Label Size — tiny, small, or normal
Line Width / Style — visual customization
Alert threshold % — percentage of ADR consumed that triggers the exhaustion alert
How to use it in practice
As a take-profit guide — when price approaches ADR High or Low with 80%+ range consumed, consider taking partial or full profit rather than holding for further extension.
As a reversal filter — avoid entering new directional trades when the ADR Used % is above 85–90%. The statistical edge has diminished significantly.
As a stop-loss reference — place stops beyond the ADR High or Low to avoid being caught by normal daily volatility.
Combined with session analysis — ADR levels are most powerful when they align with session structures. An ADR High that coincides with London High or Asian High becomes a confluence zone with significantly higher reversal probability.
Combined with OI data — if price reaches ADR High while the OI Delta shows Short Squeeze conditions, the move is likely unsustained and a reversal is probable. If it reaches ADR High with Bullish Trend OI, the day may extend beyond the average range.
Why 00:00 NY as the daily open
Crypto trades 24/7 without a traditional open. The New York midnight open (00:00 NY) is used as the reference point because it aligns with institutional risk resets, matches the TDO used across the SkuldX suite, and provides a consistent reference across all instruments and timezones with automatic DST adjustment.
Built for SkuldX ecosystem
SkuldX ADR is designed to work alongside the full SkuldX suite. ADR levels combined with TDO/TWO session opens, OI Delta signals, and Level Patterns reactions give a complete picture of where price is likely to pause, reverse, or accelerate on any given day. Indicator

Indicator

CandelaCharts - Intraday Gaps📝 Overview
The CandelaCharts - Intraday Gaps indicator is a precise technical tool designed to automatically identify, visualize, and track market gaps between daily trading sessions. By highlighting the hidden zones between the Previous Day's Close (or High/Low) and Today's Open, this indicator provides traders with actionable support and resistance levels right from the market open.
Gaps are powerful price action phenomena. A "Gap Up" occurs when the market opens higher than the previous session's close, leaving a void that often acts as support. Conversely, a "Gap Down" occurs when the market opens lower, leaving a void that often acts as resistance. This indicator eliminates the need to manually draw these zones every day.
📦 Features
Dynamic Gap Detection: Automatically detects Gap Ups (Bullish) and Gap Downs (Bearish) at the start of every new daily session.
Customizable Gap Logic: Choose whether gaps are calculated based on the Previous Day's Close (standard) or the Previous Day's High/Low (traditional breakaway gaps).
Filter by Bias: Easily unclutter your chart by filtering the display to only show Bullish gaps, Bearish gaps, or Both.
Midline Tracking: Automatically calculates and plots the exact 50% mean (midline) of the gap zone, a highly respected level for intraday rejections. The midline can be easily toggled on or off.
Precision Price Labels: Displays dynamic price labels for the top, bottom, and midline of the active gap directly on the chart axis.
⚙️ Settings
Filter Bias: Select which gap types to display (Bullish, Bearish, or Both).
Gap Up / Gap Down Toggles: Enable or disable gap detection. If the tooltip checkbox is checked, the gap is calculated from the previous day's close. If unchecked, it calculates from the previous day's high/low.
Midline: Toggle the visibility of the gap's 50% mean level.
Enable Alerts: Toggle the ability for the indicator to fire programmatic alerts.
⚡️ Showcase
Bullish Gap
Bearish Gap
Both
1H Range
📒 Usage
Opening Range Strategies: Use the gap zones as immediate support and resistance for the first few hours of trading. Price will often test the edges of the gap before reversing or accelerating.
The "Gap Fill" Trade: If price enters the gap and gains momentum, it will often gravitate toward the opposite side of the gap (the "fill").
Midline Rejections: Watch price action closely as it approaches the gap's midline. The 50% level of a gap is a classic hidden barrier where intraday reversals frequently occur.
🚨 Alerts
This indicator includes built-in alert conditions ensuring you never miss a critical gap test. Once "Enable Alerts" is checked in the settings, you can configure PulseWire to notify you when:
Price reaches the boundary of an active gap.
Price fully fills the gap zone.
⚠️ Disclaimer
Trading involves significant risk, and many participants may incur losses. The content on this site is not intended as financial advice and should not be interpreted as such. Decisions to buy, sell, hold, or trade securities, commodities, or other financial instruments carry inherent risks and are best made with guidance from qualified financial professionals. Past performance is not indicative of future results.
Indicator
