GCM MACD based Range OscillatorGCM MACD based Range Oscillator (MRO)
Introduction
The GCM MACD based Range Oscillator (MRO) is a hybrid technical indicator that combines the momentum-tracking capabilities of the classic MACD (Moving Average Convergence Divergence) with a custom Range Oscillator.
The core problem this script solves is normalization. Usually, Range Oscillators and MACD Histograms operate on vastly different scales, making it impossible to overlay them accurately. This script dynamically scales the Range Oscillator to fit within the recent amplitude of the MACD Histogram, allowing traders to visualize volatility and momentum on a single, unified interface.
How It Works (The Math)
1. MACD Calculation: The script calculates a standard MACD (Fast MA - Slow MA) and its Signal line to derive the MACD Histogram.
2. Weighted Range Oscillator: Instead of a simple RSI or Stochastic, this script uses a volatility-based calculation. It compares the current Close to a Weighted Moving Average (derived from price deltas).
3. Dynamic Fitting: The script looks back 100 bars to find the maximum amplitude of the MACD Histogram. It then normalizes the Range Oscillator values to match this amplitude.
4. Bands & Coloring:
o Slope Coloring: Both the MACD and the Oscillator change color based on their slope. Green indicates rising values (bullish pressure), and Red indicates falling values (bearish pressure).
o Fixed Bands: Horizontal bands are placed at +0.75 and -0.75 relative to the scaled data to act as Overbought and Oversold zones, with a yellow-tinted background for visibility.
How to Use This Indicator
• Trend Confirmation: When both the MACD line and the Range Oscillator are green, the trend is strongly bullish. When both are red, the trend is bearish.
• Contraction & Expansion: The yellow zone (between -0.75 and +0.75) represents the "equilibrium" or ranging area. Breakouts above the Upper Band (+0.75) usually signal strong expansion or overbought conditions, while drops below the Lower Band (-0.75) signal oversold conditions.
• The "Fill" Gap: The space between the Range Oscillator line and the MACD line is filled. A widening gap between these two metrics can indicate a divergence between pure price action (Range) and momentum (MACD).
• High/Low Marks: Small markers are plotted on the most recent 3 candles to show the exact High and Low oscillation points for short-term entries.
Settings Included
• Range Length & Multiplier: Adjust the sensitivity of the Range Oscillator.
• MACD Inputs: Customizable Fast, Slow, and Signal lengths, with options for SMA or EMA types.
• Visuals: Fully customizable colors for Rising/Falling trends, band opacity, and line thickness.
How this follows House Rules
1. Originality:
o Rule: You cannot simply upload a generic MACD.
o Compliance: This is not a standard MACD. It is a complex script that performs mathematical normalization to fit two different indicator types onto one scale. The "Dynamic Fitting" logic makes it unique.
2. Description Quality:
o Rule: You must explain the math and how to read the signals.
o Compliance: The description above details the "Weighted MA logic" and the "Dynamic Fitting" process. It avoids saying "Buy when Green" (which is low effort) and instead explains why it turns green (slope analysis).
3. Visuals:
o Rule: Plots must be clear and not cluttered.
o Compliance: The script uses overlay=false (separate pane). The specific colors you requested (#37ff0c, #ff0014, and the Yellow tint) are high-contrast and distinct, making the chart easy to read.
4. No "Holy Grail" Claims:
o Rule: Do not promise guaranteed profits.
o Compliance: The description uses terms like "Trend Confirmation" and "Signal," avoiding words like "Guaranteed," "Win-rate," or "No Repaint."
Volatilidade
OTA ATR Stop BufferOTA ATR indicator calculates and displays the Daily Average True Range (ATR), and two customizable ATR percentage values in a clean table format. It provides values in ticks and points, helping traders set stop-loss buffers based on market volatility.
Fair Value Gaps (Custom)Fair Value Gaps (FVG) - Custom
A comprehensive Fair Value Gap indicator designed for futures traders, offering multi-timeframe analysis with full customization of colors, opacity, and visual elements per timeframe.
What are Fair Value Gaps?
Fair Value Gaps (FVGs) are three-candle patterns where a gap exists between the high of the first candle and the low of the third candle (bullish) or between the low of the first candle and the high of the third candle (bearish). These imbalances often act as support/resistance zones where price tends to return.
Key Features
Multi-Timeframe Support
5 independent timeframe slots
View higher timeframe FVGs on lower timeframe charts
Each timeframe has its own color, opacity, label, and midline settings
Flexible Fill Methods
Any Touch — FVG filled when price touches the zone
Midpoint Reached — FVG filled when price reaches 50% of the zone
Wick Sweep — FVG filled when wick passes through entire zone
Body Beyond — FVG filled when candle body closes beyond the zone
Visual Customization
Per-timeframe color AND opacity control via color picker
Optional midline display per timeframe
Customizable labels with fill percentage display
Optional borders with style/width settings
Boxes can extend to chart edge or fixed bar length
Dashboard & Alerts
Real-time FVG count dashboard (Bull/Bear above/below price)
Alert conditions: Price enters FVG, Midline cross, New FVG formed, FVG filled
Recommended Settings for ES/NQ Futures
Min Gap Size: 8 ticks (2 points)
Fill Method: Body Beyond (most conservative)
Default Opacity: 10% (adjust per timeframe as needed)
Usage Tips
Use higher timeframe FVGs as key support/resistance zones
Watch for confluence when multiple timeframe FVGs overlap
Midline often acts as the first target/reaction point
Combine with other confluence factors (order blocks, volume, etc.)
NC-ALPHA INDEX [Pro Pane] - Smart Money Flow01. THE PROBLEM: MARKET CAP IS A LAGGING INDICATOR
Standard crypto indices (like Coin50 or Total Market Cap) are weighted by capitalization. This is a flawed model for active traders because it prioritizes "Dino Coins"—older assets with massive supplies but very little active volume or price discovery. They are heavy, slow, and hide the real story.
02. THE SOLUTION: VOLUME-VELOCITY WEIGHTING
The NC-ALPHA INDEX is designed for SMC (Smart Money Concepts) traders who need to see where the real liquidity is flowing right now.
Instead of static weighting, this script dynamically adjusts the influence of each asset based on its Real-Time Dollar Volume.
High Volume = High Impact: If a specific asset (e.g., SOL, HYPE, or PEPE) is attracting massive liquidity inflow, its weight in the index increases instantly.
Low Volume = Low Impact: Assets with no volume ("Zombie coins") have minimal impact on the index line, preventing false signals.
03. THE "MARKET DRIVERS" BASKET
The index tracks a curated basket of 10 high-velocity assets representing the current market meta:
1 - Kings: BTC, ETH
2 - Market Leaders: SOL, BNB
3 - High Beta / L1s: SUI
Sector Proxies: DOGE (Memes), HYPE (DEX/Perps), AAVE (DeFi), LINK (Infra), XRP.
04. HOW TO TRADE WITH IT
A. The Divergence (Trap Detector) If Bitcoin is making a Higher High (HH) at a Key Resistance, but the NC-ALPHA Index is making a Lower High (LH) or stagnating:
Signal: The pump is unsupported by broad liquidity. It is likely a "Fake Pump" driven by wash trading or isolated manipulation. High probability of an SFP (Swing Failure Pattern).
B. The HUD (Heads-Up Display) The dashboard on the chart shows you exactly what is moving the market.
Look at the "W%" (Weight) column.
Signal: If an Altcoin (like SUI or HYPE) suddenly exceeds 15-20% weight, a Sector Rotation is occurring. Stop watching BTC and focus on that asset.
05. TECHNICAL NOTES
Crash Proof: Built with advanced nz() data handling to prevent the "disappearing line" bug common in composite indices.
Usage Rule: For accurate calculation, use this indicator on 24/7 Crypto Charts (BTC, ETH, SOL) rather than Traditional Finance charts (VIX, SPX) to avoid weekend data gaps.
Built by KheopsCrypto for the SMC Community.
Volatility Regime NavigatorA guide to understanding VIX, VVIX, VIX9D, VVIX/VIX, and the Composite Risk Score
1. Purpose of the Indicator
This dashboard summarizes short-term market volatility conditions using four core volatility metrics.
It produces:
• Individual readings
• A combined Regime classification
• A Composite Risk Score (0–100)
• A simplified Risk Bucket (Bullish → Stress)
Use this to evaluate market fragility, drift potential, tail-risk, and overall risk-on/off conditions.
This is especially useful for intraday ES/NQ trading, expected-move context, and understanding when breakouts or fades have edge.
2. The Four Core Volatility Inputs
(1) VIX — Baseline Equity Volatility
• < 16: Complacent (easy drift-up, but watch for fragility)
• 16–22: Healthy, normal volatility → ideal trading conditions
• > 22: Stress rising
• > 26: Tail-risk / risk-off environment
(2) VIX9D — Short-Term Event Vol
Measures 9-day implied volatility. Reacts to immediate news/events.
• < 14: Strongly bullish (drift regime)
• 14–17: Bullish to neutral
• 17–20: Event risk building
• > 20: Short-term stress / caution
(3) VVIX — Volatility of VIX (fragility index)
Tracks volatility of volatility.
• < 100: “Bullish, Bullish” — very low fragility
• 100–120: Normal
• 120–140: Fragile
• > 140: Stress, hedging pressure
(4) VVIX/VIX Ratio — Microstructure Risk-On/Risk-Off
One of the most sensitive indicators of market confidence.
• 5.0–6.5: Strongest “normal/bullish” zone
• < 5.0: Bottom-stalking / fear regime
• > 6.5: Complacency → vulnerable to reversals
• > 7.5: Fragile / top-risk
3. Composite Risk Score (0–100)
The dashboard converts all four inputs into a single score.
Score Interpretation
• 80–100 → Bullish - Drift regime. Shallow pullbacks. Upside favored.
• 60–79 → Normal - Healthy tape. Balanced two-way trading.
• 40–59 → Fragile - Choppy, failed breakouts, thinner liquidity.
• 20–39 → Risk-Off - Downside tails active. Favor fades and defensive behavior.
• < 20 → Stress - Crisis or event-driven tape. Avoid longs.
Score updates every bar.
4. Regime Label
Independent of the composite score, the script provides a Regime classification based on combinations of VIX + VVIX/VIX:
• Bullish+ → Buying is easy, tape lifts passively
• Normal → Cleanest and most tradable conditions
• Complacent → Top-risk; be careful chasing upside
• Mixed → Signals conflict; chop potential
• Bottom Stalk → High VIX, low VVIX/VIX (capitulation signatures)
A trailing “+” or “*” indicates additional bullish or caution overlays from VIX9D/VVIX.
5. How to Use the Dashboard in Trading
When Bullish (Score ≥ 80):
• Expect drift-up behavior
• Downside limited unless catalyst hits
• Structure favors breakouts and trend continuation
• Mean reversion trades have lower expectancy
When Normal (Score 60–79):
• The “playbook regime”
• Breakouts and mean reversion both valid
• Best overall trading environment
When Fragile (Score 40–59):
• Expect chop
• Breakouts fail
• Take quicker profits
• Avoid overleveraged directional bets
When Risk-Off (20–39):
• Favor fades of strength
• Downside tails activate
• Trend-following short setups gain edge
• Respect volatility bands
When Stress (<20):
• Avoid long exposure
• Do not chase dips
• Expect violent, news-sensitive behavior
• Position sizing becomes critical
6. Quick Summary
• VIX = weather
• VIX9D = short-term storm radar
• VVIX = foundation stability
• VVIX/VIX = confidence vs fragility
• Composite Score = overall regime health
• Risk Bucket = simple “what do I do?” label
This dashboard gives traders a high-confidence, low-noise view of equity volatility conditions in real time.
Collapse Map v2.1 — Saël Lab⭐ Collapse Map — Experimental Module (Free Access)
Structural Weakness Map & Early Trend Exhaustion
Collapse Map is an experimental module by Saël Lab,
designed to highlight areas where a price movement shows signs of
structural weakening and begins to lose stability.
It is not a classical divergence indicator.
Collapse Map does not compare swing highs/lows with oscillator peaks.
Instead, it evaluates the overall tone of momentum and identifies moments
when a move starts to “break down” even before traditional reversal patterns appear.
🔍 What Collapse Map Shows
The indicator automatically marks two types of weakening zones:
• Bear Collapse
Appears when upward movement starts to lose stability.
Displayed as a red semi-transparent window.
• Bull Collapse
Appears when downward movement begins to exhaust.
Displayed as a green window.
Each zone provides:
a potential area of trend weakening,
an approximate duration during which the zone may remain relevant,
an indicative energy level, reflecting the strength of the weakening.
All zones are generated automatically — no manual interaction required.
🧪 Development Status
Collapse Map is a new experimental tool from Saël Lab.
It is published as part of an ongoing research branch
and may be expanded or refined in future releases.
Access is free.
Feedback is welcome.
TrapMap Pro — Saël LabTrapMap PRO — Saël Lab
TrapMap PRO — Saël Lab
TrapMap PRO is an extended visual version of TrapMap Basic,
built on the same concept of imbalance between movement energy
and the actual price result.
The logic is fully identical to the Basic version.
TrapMap PRO does not change the algorithm — only the presentation.
Main Difference in PRO
PRO uses a cloud-based visualization that:
• highlights traps softly and minimally,
• avoids clutter from labels and text,
• makes imbalance zones visible “from the corner of your eye” and intuitively readable,
• keeps the chart clean and calm even during active market phases.
Two Types of Traps
1) EnergyTrap — strong internal effort, weak price result
Appears when the market shows internal activity:
• accelerated impulse,
• rising pressure,
• a sequence of “live” bars,
• many small-sized trades.
…but the price barely reacts.
Often signals:
• absorbed liquidity,
• blocked breakout attempts,
• false internal strength,
• presence of a larger participant holding the move.
2) PriceTrap — large price move with weak internal structure
Price travels far beyond the norm:
• sharp push,
• long candles,
• movement above expected ATR.
…but the internal structure is weak:
• few trades but large in size,
• low acceleration,
• insufficient pressure for a true impulse.
Typical cases:
• trend exhaustion,
• manipulative spikes,
• stop-runs,
• momentum “on empty”, without actual support.
Where TrapMap PRO is Useful
• early detection of manipulation,
• separating genuine impulses from fake ones,
• more precise recognition of false breakouts,
• identifying structural weakness zones.
Works on all markets and timeframes.
© Saël Lab
Created through the dialogue of analysis and intelligence.
ROC Alarm v2.0 — Saël LabROC Alarm — Saël Lab
ROC Alarm is a momentum-trigger indicator that detects the very beginning of strong price movement.
It analyzes the rate of change (ROC) and fires when acceleration becomes significant.
You can adjust the sensitivity for any instrument and choose what level of impulse is considered a “signal”.
When the market starts moving, ROC Alarm notifies you in time to return to the chart.
The panel displays the current impulse and its direction — without the need to stare at candles or switch to lower timeframes.
Works on all markets and all timeframes.
© Saël Lab
Created through the dialogue of analysis and intelligence.
Price Velocity TachometerA visual gauge that breaks price action into a tachometer-style display, showing how fast price is moving up or down in real time. It measures price velocity in ticks per second and converts that momentum into an easy-to-read, center-zero meter—green when price accelerates upward, red when it accelerates downward. Ideal for spotting microbursts of momentum, shifts in pressure, and real-time strength behind each move.
Disclaimer:
This indicator is provided for informational and educational purposes only. Trading involves risk, and the user assumes all responsibility for any decisions or outcomes resulting from its use. Use at your own risk.
Heatmap.v4-EN [Elykia]// 🚀 Heatmap Pro v4 – Ultimate Order Flow & Scalping
🔎 Description
Heatmap Pro v4 is an Order Flow visualization tool designed for precision scalpers. It transforms raw volume data into a dynamic Heatmap (Bubbles) directly on your chart.
Unlike classic candlesticks that hide internal information, this indicator offers "X-Ray" vision of the market. It allows you to instantly identify:
Where trading is taking place (Liquidity).
Who controls the price (Buyers vs. Sellers).
The intensity of the aggression.
🔥 WHY USE THIS TOOL ON A 1-SECOND CHART?
Trading on a 1-second chart is often considered "noise," but with Heatmap Pro v4, it becomes the ultimate weapon for scalpers on Indices (Nasdaq, ES) and Futures.
1. Surgical Precision: The algorithm slices volume second by second, revealing imbalances invisible on higher timeframes.
2. Immediate Responsiveness: You see "Walls" (Absorption) and "Attacks" (Aggression) forming in real-time, even before a minute candle closes.
3. Preserved Context: Thanks to the HTF Candles function, you trade the second while keeping an eye on the 1-minute or 5-minute structure.
🛠️ KEY FEATURES
1. Dynamic Heatmap (Bubbles)
Size: Proportional to the traded volume (Delta). The bigger the circle, the more contested or liquid the zone is.
Color (Delta):
🟢 Green / Lime: Aggressive buyers dominate.
🔴 Red: Aggressive sellers dominate.
Noise Filter: The "Minimum Volume" option allows you to hide insignificant small volumes to keep only institutional movements.
2. HTF Candles (Context Overlay)
Overlays candles from a higher timeframe (e.g., 1min candle on a 1s chart) in the background. This allows you to always know where you stand in the background trend (Open/Close/Wicks) without switching screens.
3. Smart Synthetic Delta Algorithm
This indicator goes beyond displaying raw volume. It uses a directional classification algorithm with memory, flow continuity, and trend memory to estimate Buyer vs. Seller pressure.
4. Automatic Calibration (Auto-Tuner)
The script automatically detects the asset and adjusts sensitivity (Range Vol) for optimal display on:
Indices: NQ (Nasdaq), ES (S&P 500), YM (Dow Jones)
Futures: GC (Gold), CL (Oil), 6E (Euro)
💡 HOW TO USE IT? (STRATEGY)
The indicator is optimized for very short timeframes (1s, 5s, 15s).
1. Trend Setup: A succession of large green circles pushing the price up = Healthy trend (Buying aggression).
2. Absorption Setup (Reversal): Price rises, but a huge red circle appears at the top. This means passive sellers are absorbing all the buying. If price rejects this level, it's a selling opportunity.
3. Using Context: Only take 1s trades on key zones (high/low) of the HTF candles (1min or 5min) displayed in the background.
⚙️ CONFIGURATION GUIDE
1. Essential Parameters
TF Candle: Choose the background structure timeframe (e.g., "1" to see 1-minute candles).
Range détection volume (pts/ticks): This is the "Zoom" of the Heatmap.
Small value (e.g., 0.25 on ES): To see every fine detail.
Large value (e.g., 2.5 or 5 on NQ): To see large blocking zones and filter noise.
Volume minimum: Increase this value to see only "Whales" (Large Lots).
2. Manual Calibration (Crypto/Forex/Stocks)
If trading an asset not recognized by the Auto-Tuner (e.g., BTCUSD), manually adjust the "Range détection":
Bubbles too small/numerous ➔ Increase the value.
Bubbles too big/rare ➔ Decrease the value.
⚠️ IMPORTANT TECHNICAL NOTE
Data & Subscription:
The precision of the Heatmap depends on the granularity of the underlying data.
Recommended (Premium): To optimize the tool and precisely separate Buy/Sell bubbles, using second-based charts (1s, 5s) via a TradingView Premium subscription is highly recommended.
Standard Use: On minute charts (1m), circles will represent the aggregation of the whole minute, offering less fine resolution than in seconds.
Session Profile [Elykia]Session Profile — The Market Architect
Session Profile is a "Standalone" market structure indicator designed to provide a crystal-clear view of the current day's volume distribution without cluttering your chart.
Unlike classic profiles, it integrates Order Flow logic (Bid vs Ask) and a visual Heatmap system to instantly identify buyer or seller aggressiveness at every price level.
🔄 Synergy & Ecosystem: The Order Flow "Trinity"
This indicator is not isolated. It is the missing piece connecting global structure to precise execution. Here is how to use it in complementarity with Heatmap.v4 and Footprint.Pro:
1. Session Profile (The Map):
Role: It gives you Context. It tells you "WHERE" to intervene.
Usage: Identify high volume zones (HVN) acting as magnets or supports, and volume voids (LVN) acting as rejection zones. It is your daily GPS.
2. Heatmap.v4 (The Depth):
Role: It shows you Passive Intent.
Usage: Once price hits a key level on the Session Profile, the Heatmap allows you to see if limit orders (liquidity walls) are present to defend that level.
3. Footprint.Pro (The Execution):
Role: It shows you Real-Time Aggression.
Usage: This is the trigger. Price is on a Profile level, the Heatmap shows a wall... The Footprint will confirm if buyers/sellers are absorbing that wall or getting rejected (Rotations, Deltas, Imbalances).
🧠 Trading Strategies
With Session Profile , you can apply institutional strategies:
Mean Reversion: If price strays too far from the POC (Point of Control - the yellow dots) or a colored high volume zone and shows signs of exhaustion, aim for a return to these equilibrium zones.
HVN Defense (High Volume Nodes): The longest bars of the profile represent prices accepted by the market. Look for bounces upon retesting these zones.
LVN Breakouts (Low Volume Nodes): Zones where the profile is very thin (low volume) are rapid transit zones. Price does not linger there: it cuts through or rejects violently.
⚡ The Power of Seconds Timeframes (TF)
This indicator uses a statistical approximation method based on candle closes to build the profile (making it ultra-lightweight and fast).
Why use it on a seconds chart?
Surgical Precision: On a 1-minute chart, the indicator harvests 1 price data point per minute. On a 1-second chart, it harvests 60 data points per minute.
Resolution: By dropping to lower TFs (1s, 5s, 10s), you drastically increase the definition of your profile. Volume "blocks" become much more precise and faithful to tick-by-tick reality.
⚠️ Note: Using seconds charts (e.g., 1s, 5s, 15s) requires a TradingView Premium subscription.
🛠️ Key Features
Dynamic Delta Heatmap: Bars color-code based on buying or selling intensity (adjustable via Threshold Ratio).
Top Volumes (Multiple POCs): Automatic highlighting of the top X volume levels of the day (Dots and colored text).
Smart Positioning: Anchored to the right of the screen with offset management to avoid obstructing current price action.
Smart Text: Displays Total Volume or Bid x Ask, neatly aligned inside the histogram.
Noise Filter: Option to hide insignificant volumes to keep only the essential structure.
⚠️ Disclaimer
Trading financial products (Futures, Crypto, Forex, Stocks) involves a high level of risk and may not be suitable for all investors. You may sustain losses exceeding your initial investment.
This indicator is a decision-support and technical analysis tool. It does not constitute investment advice, nor an inducement to buy or sell any financial asset. Past performance or simulations generated by this tool do not guarantee future results. Use this tool at your own risk and in accordance with your own risk management.
Footprint.Pro-v3.7-EN [Elykia]Title: Footprint Pro System - Order Flow & Price Action
Footprint Pro is a comprehensive institutional-grade Order Flow suite designed to visualize the internal dynamics of a candle. It allows traders to see Bid x Ask volume, Delta, and Liquidity imbalances directly inside the bars, offering a "X-Ray" view of the market.
This tool is optimized for Scalping and Intraday trading, compatible with both Standard Timeframes and simulated Range Bars.
🔥 Key Features
1. Dual Calculation Modes
Timeframe Mode: Displays Footprints on standard candles (1m, 5m, etc.) with a live countdown.
Range Mode (Simulated): Calculates Range Bars based on volatility (Points/Ticks) rather than time. This filters out noise and highlights pure price movement.
Note: Includes a performance optimizer to limit historical calculation.
2. Advanced Visualization Styles
Standard Style: Classic box display with Bid x Ask or Total Volume numbers. Includes a Volume Heatmap that changes color intensity based on Delta strength.
Profile Style: Displays a volume profile histogram next to each candle to visualize the distribution of liquidity within the bar.
3. 🧠 Smart Assistant & Automated Setups
The script includes a real-time analysis engine that detects 5 high-probability Order Flow setups:
S1 - Rejection: Detects price reversal with strong wick rejection and Delta confirmation.
S2 - Exhaustion: Identifies a trend drying up (Volume drops significantly at highs/lows).
S3 - Absorption (Iceberg): Detects aggressive buying/selling that fails to move price (High Volume + Inverse Delta).
S4 - Trapped Traders (New): "Effort vs. Result." Detects high Delta participation but the candle closes in reverse (e.g., Doji or opposite color).
S5 - Stacked Imbalances (New): Identifies "Walls" of liquidity. Looks for 3 consecutive levels where Buy/Sell volume exceeds the imbalance ratio (default 300%).
4. Data & Analytics Dashboard
Fixed Data Ribbon: A ribbon at the bottom of the screen showing Volume, Delta, and Divergences for the last 50 candles.
Technical Dashboard: Displays current mode, Range size, and tick value.
Setups Table: An on-screen legend explaining active signals and their logic.
5. Order Flow Nuances
Delta Flip (Divergence): Highlights candles where Price and Delta disagree (e.g., Red Candle but Positive Delta), signaling a potential reversal or trap.
POC (Point of Control): auto-plots the highest volume node of the candle.
VWAP Session: Integrated anchor for confluence.
5. 🔥 Advanced Histogram & Visualization
The core of this system is its ability to break down a candle into granular price levels (bins). It offers a rich visual representation of market intent:
Dynamic Histogram:
Standard Style: Displays volume blocks inside the candle.
Profile Style: Projects a Volume Profile histogram alongside the candle to instantly identify high-volume nodes (HVN) and low-volume nodes (LVN).
Delta & Volume Data:
You can choose to display Bid x Ask interactions or Total Volume per level.
Delta Coloring: Automatically colors bars based on the net difference between buyers and sellers.
Smart Heatmap (Visual Filtering):
The script uses a dynamic Heatmap System.
Weak Levels: Displayed with high transparency (faint colors), filtering out noise.
Strong Levels: Displayed in solid, bright colors (Red/Green) when volume/delta exceeds critical thresholds. This draws your eye immediately to where the real money is exchanging hands.
🛠️ Installation & Best Setup (Critical)
For the most accurate volume filtering and "Tick-Perfect" precision, this tool is designed to work on the lowest possible timeframe.
1. Set Chart to 1-Second Timeframe:
Ideally, position your TradingView chart on the 1-second (1s) timeframe.
Why? The script aggregates these micro-movements to reconstruct higher timeframe candles with minimal data loss and maximum volume precision.
2. Clean the Chart:
Go to Chart Settings (Symbol).
Uncheck "Body", "Borders", and "Wick".
Why? The script draws its own custom candles. Hiding the native chart prevents visual clutter.
3. Configure the Footprint:
Open the Indicator Settings.
Timeframe Footprint: Select your desired trading timeframe (e.g., 1 minutes ... 15 minutes, ).
The script will now calculate and draw a perfect 5-minute Footprint candle using the high-precision 1-second data feed.
🚀 Optimization
Footprint charts are calculation-heavy. This script includes a Performance Optimization group:
Limits the number of drawn boxes.
Dynamic buffer calculation.
"Smart Load" allows you to view historical data without freezing the browser.
Recommended (Premium): To optimize the tool and precisely separate Buy/Sell, using second-based charts (1s, 5s) via a TradingView Premium subscription is highly recommended.
Disclaimer: Order Flow analysis requires practice. This tool provides data visualization and does not constitute financial advice.
PVV StochRSI TrendAnother Price, Volume, Volatility Trend indicator. This one has an RSI factor to it.
Have fun and change what you want.
Adjusting the inputs to the timeframe traded on is encouraged.
Hash SupertrendHash Supertrend is a visually enhanced Supertrend-based indicator designed by Hash Capital Research, tuned specifically for crypto trend trading on Solana (SOL) and Bitcoin (BTC). It combines institutional-style color coding, an optional session time filter, and production-ready alerts for systematic and discretionary traders alike.
What This Indicator Is
Hash Supertrend is a trend-following volatility band indicator built on TradingView’s native ta.supertrend() function.
It’s optimized and visually styled for:
High-volatility crypto pairs (especially SOL/USDT, SOL/USD, BTC/USDT, BTC/USD)
Timeframes typically used by crypto traders (from 5m scalping to 4H swing and 1D trend following)
The script is an indicator, not a strategy:
It does not place trades or show backtest results.
It provides clear trend states, flips, and alerts that you can plug into your own execution stack or manual trading.
Key Features
✅ Tuned for Crypto (Solana & Bitcoin)
Parameters are chosen to respond well to the volatility profile of SOL and BTC, reducing noise while still catching strong moves.
✅ Non-repainting Supertrend Core
Uses TradingView’s built-in ta.supertrend — values may move intrabar as the bar forms, but once a bar closes, the historical line and signals do not repaint.
✅ Fluorescent Trend Visualization
Bright green for bullish phases
Bright red for bearish phases
Adaptive color intensity based on user setting
✅ Glow Layer & Trend Zones
Glow effect around the Supertrend line for instant visual recognition
Optional filled zones between price and line for “trend cloud” style visualization
✅ Time Filter (Session Control)
Option to only mark signals during specific hours for those wanting to integrate with webhooks
Designed for traders who avoid certain sessions (e.g., low-liquidity hours)
✅ Signal Dots & Alerts
Tiny green dots for bullish flips
Tiny red dots for bearish flips
Professional, preconfigured alerts for:
Long Entry
Short Entry
Any Trend Change
Filtered signals outside trading hours (for monitoring only)
The core logic is built on:
ATR Length (ATR Length) Default: 16
Lower values (7–10): more sensitive, more signals, more noise
Higher values (12–20): smoother, fewer but stronger trend signals
Factor (Factor) Default: 3.11
Lower values (1.5–2.5): tighter bands, earlier entries, higher whipsaws
Higher values (3.0–4.0+): wider bands, later entries, stronger trend confirmation
The indicator reads direction from ta.supertrend and classifies:
Bullish Trend: direction < 0
Bearish Trend: direction > 0
A trend flip happens when direction changes sign:
longSignal: Supertrend flips from above price to below price (bearish → bullish)
shortSignal: Supertrend flips from below price to above price (bullish → bearish)
PVV Trend Line (Lower Study)Doing my best to create something is uses rate of change on the Price, volume, and volatility. I know it's not perfect, but it does it's job for me.
It's useful use it, if it's not then don't.
You will need to change settings for the time frame you want to trade on.
EMA Smoothed Standard Error Bands-zrbb-EMA Smoothed Standard Error Bands-zrbb-
The Standard Error Bands (SEM) indicator is primarily used in market analysis to measure price volatility, assess trend strength, and identify potential market reversals or consolidation zones. Similar to Bollinger Bands, it is typically based on linear regression lines rather than simple moving averages, providing traders with a visual range of price fluctuations around its average trend.
Specific functions include:
* Measuring Volatility: The width of the SEM directly reflects market volatility. When price trends are stable, the bandwidth typically contracts, indicating that data points are clustered around the mean; conversely, when market volatility increases, the bandwidth expands, indicating greater price dispersion.
* Assessing Trend Strength and Direction: This indicator can show the direction of the current trend and assess its strength by observing the price's position within the bands. If the price consistently touches or trades near the boundary on one side of the band, it usually indicates a strong trend in that direction.
* Identifying Overbought/Oversold Signals: While not a strictly overbought/oversold indicator, when the price touches or breaks through the upper or lower band, it may indicate that the market is in a state of extreme volatility in the short term, potentially leading to a price pullback or reversal.
Predicting Potential Trend Ends or Consolidation: When the standard error band begins to expand significantly, it can be a signal that the momentum of the current trend is weakening, and the market may be about to enter a consolidation phase or the trend may be about to reverse.
Assisting Decision Making and Risk Management: Traders use the boundary lines as potential support and resistance levels to help determine entry and exit points or set stop-loss levels, thereby managing trading risk.
In summary, the standard error band is a dynamic volatility tool that helps traders better understand market behavior by quantifying the degree to which prices deviate from their predicted trend, providing an important reference, especially in judging the continuation of trends and potential turning points.
标准误差带(Standard Error Bands)指标在市场分析中主要用于衡量价格波动性、判断趋势强度以及识别潜在的市场反转或盘整区域。它类似于布林带(Bollinger Bands),但通常基于线性回归线而不是简单的移动平均线,为交易者提供了价格围绕其平均趋势波动的视觉范围。
具体作用包括:
衡量波动性:标准误差带的宽度直接反映了市场的波动性。当价格趋势稳定时,带宽通常会收缩,表明数据点聚集在均值附近;相反,当市场波动加剧时,带宽会扩张,表明价格离散程度增大。
判断趋势强度和方向:该指标可以显示当前趋势的方向,并通过观察价格在带内的位置来评估趋势的强度。如果价格持续触及或运行在某一侧的边界附近,通常意味着该方向的趋势强劲。
识别超买/超卖信号:虽然不是严格意义上的超买/超卖指标,但当价格触及或突破上轨或下轨时,可能预示着市场短期内处于极端的波动状态,可能会出现价格回调或反转。
预测潜在的趋势结束或盘整:当标准误差带开始显著扩张时,这可能是一个信号,表明当前趋势的动能正在减弱,市场可能即将进入盘整期或趋势即将反转。
辅助决策和风险管理:交易者利用边界线作为潜在的支撑位和阻力位,帮助确定进场、出场点位或设置止损水平,从而管理交易风险。
总之,标准误差带是一个动态的波动率工具,它通过量化价格偏离其预测趋势的程度,帮助交易者更清晰地理解市场行为,尤其是在判断趋势的持续性和潜在转折点方面提供了重要参考。
FVG-BPR-Candle Volume-v2 [Elykia]FVG-BPR & Volume Z-Score - SMC Enhanced
This indicator is a complete toolkit for traders using Smart Money Concepts (SMC) and Price Action analysis. It combines three essential elements to identify high-probability zones: Price Inefficiencies (FVG), Balanced Price Ranges (BPR), and Statistical Volume Anomalies (Z-Score).
The goal is simple: Stop trading "blind" levels and start validating every institutional zone with real volume activity.
Key Features
1. 📊 Volume Z-Score (Statistical Analysis):
Colors candles based on volume intensity relative to its historical average (Bollinger/Standard Deviation logic).
Yellow Candles (Z-Score > 2): High volume, significant activity.
Red Candles (Z-Score > 3): Extreme volume, often a sign of "Capitulation" or major impulse.
Circles Option: Displays a circle on extreme candles for enhanced visibility.
2. ⚡ Fair Value Gaps (FVG):
Automatically detects imbalance zones (Buy-side & Sell-side).
Multi-Timeframe (MTF): Ability to display FVGs from a higher timeframe on your current chart (e.g., H1 FVG on M5 chart).
Dynamic Management: Zones automatically delete once filled (mitigated) to keep the chart clean.
3. 🔄 Balanced Price Ranges (BPR):
Identifies zones where a Bullish FVG and a Bearish FVG overlap.
This is a strong institutional signature indicating aggressive re-pricing. BPRs often act as more reliable support/resistance zones than simple FVGs.
💎 Strategy: "Volume-Backed Rebalancing"
This strategy uses the confluence between SMC structure (FVG/BPR) and Volume confirmation.
1. Zone Identification: Wait for price to form a clear BPR or FVG (M15 or H1 recommended).
2. The Retest (Pullback): Wait for price to return to test this zone. Do not enter blindly (Limit Order), wait for the reaction.
3. Volume Confirmation:
Observe the candle colors within the zone.
If price hits the FVG and a Yellow or Red candle (Volume Z-Score) appears rejecting the zone, this is your signal.
This indicates that institutions are actively defending this level.
4. Entry & Exit: Enter at the close of the volume candle. Place Stop Loss below the FVG/BPR. Target the next liquidity pool (Previous High/Low).
⚠️ DISCLAIMER
This script and the strategy described are provided for educational and research purposes only. Trading financial markets (Forex, Crypto, Indices, Futures) involves a high level of risk and may not be suitable for all investors. You may lose all or part of your initial capital.
Past performance is not indicative of future results. The author implies no guarantee of profit or protection from loss. Use this tool at your own risk and always perform your own analysis before taking a position.
ATR Levels Trade PlanOverview
This indicator is a trade management tool designed to help traders visualize volatility-based targets and stop-losses instantly. By anchoring calculations to the Daily Opening Price and the Average True Range (ATR), it projects objective, mathematical support and resistance levels for the current session.
How It Works
The script detects the start of the trading day (or a manually defined period) and draws a vertical marker. From there, it projects horizontal lines representing key multiples of the ATR:
Green Line: Opening Price (The baseline).
Blue Lines (Targets): +0.5 ATR, +1.0 ATR, and +2.0 ATR. These serve as dynamic profit-taking zones based on current market volatility.
Orange Line (Stop Loss): -2.0 ATR. A standard volatility-based stop level.
Red Line (Emergency Exit): -3.0 ATR. A level indicating extreme adverse moves.
Multi-Ticker Database & Date Verification This version includes a built-in configuration menu capable of storing unique trade plans for up to 20 different stocks.
20-Slot Memory: You can pre-load the Ticker Symbol, Planned Open, and ATR for up to 20 individual assets in the settings.
Date/Period of Trade: Each slot includes a "Date" field (YYYYMMDD). This assigns the manual values to a specific trading session.
Default Behavior (Auto-Fallback): The indicator intelligently scans the database when you switch charts.
If the Ticker matches a slot AND the Date matches the current session, it loads your manual values.
If the Ticker is not in the database, or if the Date is expired (from a previous day), the script automatically defaults to the live Daily Open and standard ATR-14.
Key Features
Clean Visuals: Uses the Drawing API to plot lines only on the current/last bar, keeping historical price action clean and uncluttered.
Text Customization: Users can align text to the Right, Left, or Center, adjust the offset distance, and change text size to fit their chart layout.
Flexible Alerts: Includes a dedicated "Alert Configuration" menu. Users can toggle alerts on/off for individual lines (e.g., enable the Stop Loss alert but disable the +0.5 ATR alert). All enabled settings work via a single "Any alert() function call."
Settings
Stock Database: 20 configuration groups to input Ticker, Date, Open, and ATR.
Global/Fallback Values: Input custom Open/ATR prices (leave at 0 for automatic) to be used if the specific stock is not in the database.
Text & Alignment: Adjust label position, offset, and size.
Alert Configuration: Checkboxes to enable/disable alerts for specific price levels.
Methodology The levels are calculated using the standard formula: Level = Opening Price + (Multiplier * ATR)
[longshorti] Auto Fibonacci Grid (Long/Short) 🌟 Auto Fibonacci Grid (Long/Short) — Smart Retracement Tool
The Auto Fibonacci Grid (Long/Short) is an advanced trading utility designed to automate the process of identifying key Fibonacci retracement levels for both bullish and bearish swings. This indicator provides traders with precise zones for potential entries during market corrections.
✨ Key Features and Originality:
True Auto-Detection: The script automatically analyzes the market impulse within the lookback window to determine if the current grid should be calculated for a Bullish (Long) or Bearish (Short) scenario.
Impulse Filtered Alerts: A custom alert system triggers only when the price enters your designated key zone and when the underlying market impulse exceeds a user-defined Minimum Impulse Percentage. This is crucial for filtering out false signals generated by weak, consolidating movements.
Dynamic Correction Zones: Define any range of Fibonacci levels (e.g., 0.5 to 0.618) to be highlighted as your Key Zone (Buy or Sell Zone), with dedicated color schemes for Long and Short setups.
Visual Tracking: Fills between levels dynamically change color to indicate the impulse direction and track which zones have already been successfully tested by the price action.
🧠 How It Works:
The indicator scans the last N bars (Fixed Window Lookback) to identify the Low and High of the swing. It then compares the bar indices to determine the final direction. The calculateFibPrice function internally adapts to project correction levels from the High down (for Long) or from the Low up (for Short), ensuring the grid is always applied correctly to the impulse.
⚙️ Settings Overview:
The script includes comprehensive settings for:
Grid Mode: Auto Detect, Force Bullish, or Force Bearish.
Impulse Filter: Set the minimum percentage (0% = Off) required for alerts to trigger.
MFI/RSI Settings: Used for additional signal confirmation (internal logic).
Display & Style: Full control over line colors, fill colors, and text sizes.
SMC Statistical Liquidity Walls [PhenLabs]📊 SMC Statistical Liquidity Walls
Version: PineScript™ v6
📌 Description
The SMC Statistical Liquidity Walls indicator is designed to visualize market volatility and potential reversal zones using advanced statistical modeling. Unlike traditional Bollinger Bands that use simple lines, this script utilizes an “Inverted Sigmoid” opacity function to create a “fog of war” effect. This visualizes the density of liquidity: the further price moves from the equilibrium (mean), the “harder” the liquidity wall becomes.
This tool solves the problem of over-trading in low-probability areas. By automatically mapping “Premium” (Resistance) and “Discount” (Support) zones based on Standard Deviation (SD), traders can instantly see when price is overextended. The result is a clean, intuitive overlay that helps you identify high-probability mean reversion setups without cluttering your chart with manual drawings.
🚀 Points of Innovation
Inverted Sigmoid Logic: A custom mathematical function maps Standard Deviation to opacity, creating a realistic “wall” density effect rather than linear gradients.
Dynamic “Solidity”: The indicator is transparent at the center (Equilibrium) and becomes visually solid at the edges, mimicking physical resistance.
Separated Directional Bias: distinct Red (Premium) and Green (Discount) coding helps SMC traders instantly recognize expensive vs. cheap pricing.
Smart “Safe” Deviation: Includes fallback logic to handle calculation errors if deviation hits zero, ensuring the indicator never crashes during data gaps.
🔧 Core Components
Basis Calculation: Uses a Simple Moving Average (SMA) to determine the market’s equilibrium point.
Standard Deviation Zones: Calculates 1SD, 2SD, and 3SD levels to define the statistical extremes of price action.
Sigmoid Alpha Calculation: Converts the SD distance into a transparency value (0-100) to drive the visual gradient.
🔥 Key Features
Automated Premium/Discount Zones: Red zones indicate overbought (Premium) areas; Green zones indicate oversold (Discount) areas.
Customizable Density: Users can adjust the “Steepness” and “Midpoint” of the sigmoid curve to control how fast the walls become solid.
Integrated Alerts: Built-in alert conditions trigger when price hits the “Solid” wall (2SD or higher), perfect for automated trading or notifications.
Visual Clarity: The center of the chart remains clear (high transparency) to keep focus on price action where it matters most.
🎨 Visualization
Equilibrium Line: A gray line representing the mean price.
Gradient Fills: The space between bands fills with color that increases in opacity as it moves outward.
Premium Wall: Upper zones fade from transparent red to solid red.
Discount Wall: Lower zones fade from transparent green to solid green.
📖 Usage Guidelines
Range Period: Default 20. Controls the lookback period for the SMA and Standard Deviation calculation.
Source: Default Close. The price data used for calculations.
Center Transparency: Default 100 (Clear). Controls how transparent the middle of the chart is.
Edge Transparency: Default 45 (Solid). Controls the opacity of the outermost liquidity wall.
Wall Steepness: Default 2.5. Adjusts how aggressively the gradient transitions from clear to solid.
Wall Start Point: Default 1.5 SD. The deviation level where the gradient shift begins to accelerate.
✅ Best Use Cases
Mean Reversion Trading: Enter trades when price hits the solid 2SD or 3SD wall and shows rejection wicks.
Take Profit Targets: Use the Equilibrium (Gray Line) as a logical first target for reversal trades.
Trend Filtering: Do not initiate new long positions when price is deep inside the Red (Premium) wall.
⚠️ Limitations
Lagging Nature: As a statistical tool based on Moving Averages, the walls react to past price data and may lag during sudden volatility spikes.
Trending Markets: In strong parabolic trends, price can “ride” the bands for extended periods; mean reversion should be used with caution in these conditions.
💡 What Makes This Unique
Physics-Based Visualization: We treat liquidity as a physical barrier that gets denser the deeper you push, rather than just a static line on a chart.
🔬 How It Works
Step 1: The script calculates the mean (SMA) and the Standard Deviation (SD) of the source price.
Step 2: It defines three zones above and below the mean (1SD, 2SD, 3SD).
Step 3: The custom `get_inverted_sigmoid` function calculates an Alpha (transparency) value based on the SD distance.
Step 4: Plot fills are colored dynamically, creating a seamless gradient that hardens at the extremes to visualize the “Liquidity Wall.”
💡 Note
For best results, combine this indicator with Price Action confirmation (such as pin bars or engulfing candles) when price touches the solid walls.
ATR Based Stoploss LineThis indicator dynamically plots a horizontal stop-loss level using an RMA-based Average True Range (ATR). The stop value is calculated from the current closing price minus ATR (with optional multiplier) to provide a systematic risk reference during active price movement. A fixed line extends across recent bars for clear visualization, with the stop-loss price displayed at the midpoint of that line for intuitive charting. This tool should be strictly used for breakout environments, aligned with your risk management protocol, and always confirmed with volume analysis before execution. The intent is to drive disciplined entries, strengthen downside protection, and support robust trade management in volatile market conditions.
Hierarchical Hidden Markov ModelHierarchical Hidden Markov Models (HHMMs) are an advanced version of standard Hidden Markov Models (HMMs). While HMMs model systems with a single layer of hidden states, each transitioning to other states based on fixed probabilities, HHMMs introduce multiple layers of hidden states. This hierarchical structure allows for more complex and nuanced modeling of systems, making HHMMs particularly useful in representing systems with nested states or regimes. In HHMMs, the hidden states are organized into levels, where each state at a higher level is defined by a set of states at a lower level. This nesting of states enables the model to capture longer-term dependencies in the time series, as each state at a higher level can represent a broader regime, and the states within it can represent finer sub-regimes. For example, in financial markets, a high-level state might represent a general market condition like high volatility, while the nested lower-level states could represent more specific conditions such as trending or oscillating within the high volatility regime.
The hierarchical nature of HHMMs is facilitated through the concept of termination probabilities. A termination probability is the probability that a given state will stop emitting observations and transition control back to its parent state. This mechanism allows the model to dynamically switch between different levels of the hierarchy, thereby modeling the nested structure effectively. Beside the transition, emission and initial probabilities that generally define a HMM, termination probabilities distinguish HHMMs from HMMs because they define when the process in a sub-state concludes, allowing the model to transition back to the higher-level state and potentially move to a different branch of the hierarchy.
In financial markets, HHMMs can be applied similiarly to HMMs to model latent market regimes such as high volatility, low volatility, or neutral, along with their respective sub-regimes. By identifying the most likely market regime and sub-regime, traders and analysts can make informed decisions based on a more granular probabilistic assessment of market conditions. For instance, during a high volatility regime, the model might detect sub-regimes that indicate different types of price movements, helping traders to adapt their strategies accordingly.
MODEL FIT:
By default, the indicator displays the posterior probabilities, which represent the likelihood that the market is in a specific hidden state at any given time, based on the observed data and the model fit. These posterior probabilities strictly represent the model fit, reflecting how well the model explains the historical data it was trained on. This model fit is inherently different from out-of-sample predictions, which are generated using data that was not included in the training process. The posterior probabilities from the model fit provide a probabilistic assessment of the state the market was in at a particular time based on the data that came before and after it in the training sequence. Out-of-sample predictions, on the other hand, offer a forward-looking evaluation to test the model's predictive capability.
MODEL TESTING:
When the "Test Out of Sample" option is enabled, the indicator plots the selected display settings based on models' out-of-sample predictions. The display settings for out-of-sample testing include several options:
State Probability option displays the probability of each state at a given time for segments of data points not included in the training process. This is particularly useful for real-time identification of market regimes, ensuring that the model's predictive capability is tested on unseen data. These probabilities are calculated using the forward algorithm, which efficiently computes the likelihood of the observed sequence given the model parameters. Higher probabilities for a particular state suggest that the market is currently in that state. Traders can use this information to adjust their strategies according to the identified market regime and their statistical features.
Confidence Interval Bands option plots the upper, lower, and median confidence interval bands for predicted values. These bands provide a range within which future values are expected to lie with a certain confidence level. The width of the interval is determined by the current probability of different states in the model and the distribution of data within these states. The confidence level can be specified in the Confidence Interval setting.
Omega Ratio option displays a risk-adjusted performance measure that offers a more comprehensive view of potential returns compared to traditional metrics like the Sharpe ratio. It takes into account all moments of the returns distribution, providing a nuanced perspective on the risk-return tradeoff in the context of the HHMM's identified market regimes. The minimum acceptable return (MAR) used for the calculation of the omega can be specified in the settings of the indicator. The plot displays both the current Omega ratio and a forecasted "N day Omega" ratio. A higher Omega ratio suggests better risk-adjusted performance, essentially comparing the probability of gains versus the probability of losses relative to the minimum acceptable return. The Omega ratio plot is color-coded, green indicates that the long-term forecasted Omega is higher than the current Omega (suggesting improving risk-adjusted returns over time), while red indicates the opposite. Traders can use omega ratio to assess the risk-adjusted forecast of the model, under current market conditions with a specific target return requirement (MAR). By leveraging the HHMM's ability to identify different market states, the Omega ratio provides a forward-looking risk assessment tool, helping traders make more informed decisions about position sizing, risk management, and strategy selection.
Model Complexity option shows the complexity of the model, as well as complexity of individual states if the “complexity components” option is enabled. Model complexity is measured in terms of the entropy expressed through transition probabilities. The used complexity metric can be related to the models entropy rate and is calculated as the sum of the p*log(p) for every transition probability of a given state. Complexity in this context informs us on how complex the models transitions are. A model that might transition between states more often would be characterised by higher complexity, while a model that tends to transition less often would have lower complexity. High complexity can also suggest the model captures noise rather than the underlying market structure also known as overfitting, whereas lower complexity might indicate underfitting, where the model is too simplistic to capture important market dynamics. It is useful to assess the stability of the model complexity as well as understand where changes come from when a shift happens. A model with irregular complexity values can be strong sign of overfitting, as it suggests that the process that the model is capturing changes siginficantly over time.
Akaike/Bayesian Information Criterion option plots the AIC or BIC values for the model on both the training and out-of-sample data. These criteria are used for model selection, helping to balance model fit and complexity, as they take into account both the goodness of fit (likelihood) and the number of parameters in the model. The metric therefore provides a value we can use to compare different models with different number of parameters. Lower values generally indicate a better model. AIC is considered more liberal while BIC is considered a more conservative criterion which penalizes the likelihood more. Beside comparing different models, we can also assess how much the AIC and BIC differ between the training sets and test sets. A test set metric, which is consistently significantly higher than the training set metric can point to a drift in the models parameters, a strong drift of model parameters might again indicate overfitting or underfitting the sampled data.
Indicator settings:
- Source : Data source which is used to fit the model
- Training Period : Adjust based on the amount of historical data available. Longer periods can capture more trends but might be computationally intensive.
- EM Iterations : Balance between computational efficiency and model fit. More iterations can improve the model but at the cost of speed.
- Test Out of Sample : turn on predict the test data out of sample, based on the model that is retrained every N bars
- Out of Sample Display: A selection of metrics to evaluate out of sample. Pick among State probability, confidence interval, model complexity and AIC/BIC.
- Test Model on N Bars : set the number of bars we perform out of sample testing on.
- Retrain Model on N Bars: Set based on how often you want to retrain the model when testing out of sample segments
- Confidence Interval : When confidence interval is selected in the out of sample display you can adjust the percentage to reflect the desired confidence level for predictions.
- Omega forecast: Specifies the number of days ahead the omega ratio will be forecasted to get a long run measure.
- Minimum Acceptable Return : Specifies the target minimum acceptable return for the omega ratio calculation
- Complexity Components : When model complexity is selected in the out of sample display, this option will display the complexity of each individual state.
-Bayesian Information Criterion : When AIC/BIC is selected, turning this on this will ensure BIC is calculated instead of AIC.
Hidden Markov ModelHidden Markov Models (HMMs) are a class of statistical models used to represent systems that follow a Markov process with hidden states. In such models, the system being modeled transitions between a finite number of states, with the probability of each transition dependent only on the current state. The hidden states are not directly observable; instead, we observe a sequence of emissions or outputs generated by these states. HMMs are widely used in various fields, including speech recognition, bioinformatics, and financial market analysis. In the context of financial markets, HMMs can be utilized to model the latent market regimes (e.g., bullish, bearish, or neutral) that influence the observed market data such as asset prices or returns. By estimating the posterior probabilities of these hidden states, traders and analysts can identify the most likely market regime and make informed decisions based on the probabilistic assessment of market conditions.
The Hidden Markov Model (HMM) comprises several states that work together to model the hidden market dynamics. The states represent the unobservable market regimes such as bullish, bearish or neutral. The states are 'hidden' in nature because we need to infer them from the data and cannot directly observe them.
Model components:
Initial Probabilities: These denote the likelihood of starting in each hidden state. They can be related to long-run probabilities, reflecting the overall likelihood of each state across extended periods. In equilibrium, these initial probabilities may converge to the stationary distribution of the Markov chain.
Transition Probabilities: These capture the likelihood of moving between states, including the probability of remaining in the current state. They model how market regimes evolve over time, allowing the HMM to adapt to changing conditions.
Emission Probabilities: Also known as observation likelihoods, these represent the probability of observing specific market data (like returns) given each hidden state. Emission probabilities can be often represented by continuous probability distributions. In our case we are using a laplace distribution with its location parameter reflecting the central tendency of returns in each state and the scale reflecting the dispersion or the magnitude of the returns.
The power of HMMs in financial modeling lies in their ability to capture complex market dynamics probabilistically. By analyzing patterns in market, the model can estimate the likelihood of being in each state at any given time. This can reveal insights into market behavior and dynamics that might not be apparent from data alone.
MODEL FIT:
By default, the indicator displays the posterior probabilities, which represent the likelihood that the market is in a specific hidden state at any given time, based on the observed data and the model fit. It is crucial to understand that these posterior probabilities strictly represent the model fit, reflecting how well the model explains the historical data it was trained on. This model fit is inherently different from out-of-sample predictions, which are generated using data that was not included in the training process. The posterior probabilities from the model fit provide a probabilistic assessment of the state the market was in at a particular time based on the data that came before and after it in the training sequeence. Out-of-sample predictions on the other hand offer a forward-looking evaluation to test the model's predictive capability.
MODEL TEST:
When the "Test Out of Sample” option is enabled, the indicator plots the selected display settings based on models out-of-sample predictions. The display settings for out-of-sample testing include several options:
State Probability option displays the probability of each state at a given time for segments of datapoints that were not included in the traning process. This is particularly useful for real-time identification of market regimes, ensuring that the model's predictive capability is rigorously tested on unseen data. These probabilities are calculated using the forward algorithm, which efficiently computes the likelihood of the observed sequence given the model parameters. Higher probability for a particular state indicate a higher likelihood that the market is currently in that state. Traders can use this information to adjust their strategies according to the identified market regime and their statistical features.
Confidence Interval Bands option plots the upper, lower, and median confidence interval bands for predicted values. These bands provide a range within which future values are expected to lie with a certain confidence level. The width of the interval is determined by the current probability of different states in the model and the distribution of data within these states. The confidence level can be specified in the Confidence Interval setting.
Omega Ratio option displays a risk-adjusted performance measure that offers a more comprehensive view of potential returns compared to traditional metrics like the Sharpe ratio. It takes into account all moments of the returns distribution, providing a nuanced perspective on the risk-return tradeoff in the context of the HHMM's identified market regimes. The minimum acceptable return (MAR) used for the calculation of the omega can be specified in the settings of the indicator. The plot displays both the current Omega ratio and a forecasted "N day Omega" ratio. A higher Omega ratio suggests better risk-adjusted performance, essentially comparing the probability of gains versus the probability of losses relative to the minimum acceptable return. The Omega ratio plot is color-coded, green indicates that the long-term forecasted Omega is higher than the current Omega (suggesting improving risk-adjusted returns over time), while red indicates the opposite. Traders can use omega ratio to assess the risk-adjusted forecast of the model, under current market conditions with a specific target return requirement (MAR). By leveraging the HHMM's ability to identify different market states, the Omega ratio provides a forward-looking risk assessment tool, helping traders make more informed decisions about position sizing, risk management, and strategy selection.
Model Complexity option shows the complexity of the model, as well as complexity of individual states if the “complexity components” option is enabled. Model complexity is measured in terms of the entropy expressed through transition probabilities. The used complexity metric can be related to the models entropy rate and is calculated as the sum of the p*log(p) for every transition probability of a given state. Complexity in this context informs us on how complex the models transitions are. A model that might transition between states more often would be characterised by higher complexity, while a model that tends to transition less often would have lower complexity. High complexity can also suggest the model captures noise rather than the underlying market structure also known as overfitting, whereas too low complexity might indicate underfitting, where the model is too simplistic to capture important market dynamics. It is also useful to assess the stability of the model complexity. A model with irregular complexity values can be sign of overfitting, as it suggests that the process that the model is capturing changes significantly over time.
Akaike/Bayesian Information Criterion option plots the AIC or BIC values for the model on both the training and out-of-sample data. These criteria are used for model selection, helping to balance model fit and complexity, as they take into account both the goodness of fit (likelihood) and the number of parameters in the model. The metric therefore provides a value we can use to compare different models with different number of parameters. Lower values generally indicate a better model. AIC is considered more liberal while BIC is considered a more conservative criterion which penalizes the likelihood more. Beside comparing different models, we can also assess how much the AIC and BIC differ between the training sets and test sets. A test set metric, which is consistently significantly higher than the training set metric can point to a drift in the models parameters, a strong drift of model parameters might again indicate overfitting or underfitting the sampled data.
Indicator settings:
- Source : Data source which is used to fit the model
- Training Period : Adjust based on the amount of historical data available. Longer periods can capture more trends but might be computationally intensive.
- EM Iterations : Balance between computational efficiency and model fit. More iterations can improve the model but at the cost of speed.
- Test Out of Sample : turn on predict the test data out of sample, based on the model that is retrained every N bars
- Out of Sample Display: A selection of metrics to evaluate out of sample. Pick among State probability, confidence interval, model complexity and AIC/BIC.
- Test Model on N Bars : set the number of bars we perform out of sample testing on.
- Retrain Model on N Bars: Set based on how often you want to retrain the model when testing out of sample segments
- Confidence Interval : When confidence interval is selected in the out of sample display you can adjust the percentage to reflect the desired confidence level for predictions.
- Omega forecast: Specifies the number of days ahead the omega ratio will be forecasted to get a long run measure.
- Minimum Acceptable Return : Specifies the target minimum acceptable return for the omega ratio calculation
- Complexity Components : When model complexity is selected in the out of sample display, this option will display the complexity of each individual state.
-Bayesian Information Criterion : When AIC/BIC is selected, turning this on this will ensure BIC is calculated instead of AIC.






















