Change in State of Delivery CISD [AlgoAlpha]🟠 OVERVIEW
This script tracks how price “changes delivery” after failed attempts to push in one direction. It builds swing levels from pivots, watches for those levels to be wicked, and then checks if price delivers cleanly in the opposite direction. When the pattern meets the script’s tolerance rules, it marks a Change in State of Delivery (CISD). These CISD levels are drawn as origin lines and are used to spot shifts in intent, failed pushes, and continuation attempts. A CISD becomes stronger when it forms after opposing liquidity is swept within a defined lookback.
🟠 CONCEPTS
The script first defines structure using swing highs/lows. These levels act as potential liquidity points. When price wicks through a swing, the script registers a mitigation event. After this, it looks for a reversal-style candle sequence: a failed push, followed by a counter-move strong enough to pass a tolerance ratio. This ratio compares how far price expanded away from the failed attempt versus the counter-move that followed. If the ratio is high enough, this becomes a CISD. The idea is simple: liquidity interaction sets context , and the tolerance logic identifies actual intent . CISD levels and sweep markers combine these two ideas into a clean map of where delivery flipped.
🟠 FEATURES
Liquidity tracking: marks swing highs/lows and updates them until expiry
Liquidity sweep confirmation when CISD aligns with recent mitigations
Alert conditions for all key events: mitigations, CISDs, and strong CISDs
🟠 USAGE
Setup : Add the script to your chart. Use it on any timeframe where swing behavior matters. Set the Swing Period for how wide a pivot must be. Set Noise Filter to control how strict the CISD detection is. Liquidity Lookback defines how recent a wick must be to confirm a sweep.
Read the chart : Origin lines mark where the CISD began. A green line signals bullish intent; a red line signals bearish intent. ▲ and ▼ shapes show CISDs that form after liquidity is swept, these mark strong signals for potential entry. Swing dots show recent swing highs/lows. Candle colors follow the latest CISD trend.
Settings that matter : Increasing Swing Period produces fewer but stronger swings. Raising Noise Filter requires cleaner counter-moves and reduces false CISDs. Liquidity Lookback controls how strict the sweep confirmation is. Expiry Bars decides how long swing levels remain active.
Indikatoren und Strategien
Uptrick: Dynamic Z-Score DivergenceIntroduction
Uptrick: Dynamic Z-Score Divergence is an oscillator that combines multiple momentum sources within a Z-Score framework, allowing for the detection of statistically significant mean-reversion setups, directional shifts, and divergence signals. It integrates a multi-source normalized oscillator, a slope-based signal engine, structured divergence logic, a slope-adaptive EMA with dynamic bands, and a modular bar coloring system. This script is designed to help traders identify statistically stretched conditions, evolving trend dynamics, and classical divergence behavior using a unified statistical approach.
Overview
At its core, this script calculates the Z-Score of three momentum sources—RSI, Stochastic RSI, and MACD—using a user-defined lookback period. These are averaged and smoothed to form the main oscillator line. This normalized oscillator reflects how far short-term momentum deviates from its mean, highlighting statistically extreme areas.
Signals are triggered when the oscillator reverses slope within defined inner zones, indicating a shift in direction while the signal remains in a statistically stretched state. These mean-reversion flips (referred to as TP signals) help identify turning points when price momentum begins to revert from extended zones.
In addition, the script includes a divergence detection engine that compares oscillator pivot points with price pivot points. It confirms regular bullish and bearish divergence by validating spacing between pivots and visualizes both the oscillator-side and chart-side divergences clearly.
A dynamic trend overlay system is included using a Slope Adaptive EMA (SA-EMA). This trend line becomes more responsive when Z-Score deviation increases, allowing the trend line to adapt to market conditions. It is paired with ATR-based bands that are slope-sensitive and selectively visible—offering context for dynamic support and resistance.
The script includes configurable bar coloring logic, allowing users to color candles based on oscillator slope, last confirmed divergence, or the most recent signal of any type. A full alert system is also built-in for key signals.
Originality
The script is based on the well-known concept of Z-Score valuation, which is a standard statistical method for identifying how far a signal deviates from its mean. This foundation—normalizing momentum values such as RSI or MACD to measure relative strength or weakness—is not unique to this script and is widely used in quantitative analysis.
What makes this implementation original is how it expands the Z-Score foundation into a fully featured, signal-producing system. First, it introduces a multi-source composite oscillator by combining three momentum inputs—RSI, Stochastic RSI, and MACD—into a unified Z-Score stream. Second, it builds on that stream with a directional slope logic that identifies turning points inside statistical zones.
The most distinctive additions are the layered features placed on top of this normalized oscillator:
A structured divergence detection engine that compares oscillator pivots with price pivots to validate regular bullish and bearish divergence using precise spacing and timing filters.
A fully integrated slope-adaptive EMA overlay, where the smoothing dynamically adjusts based on real-time Z-Score movement of RSI, allowing the trend line to become more reactive during high-momentum environments and slower during consolidation.
ATR-based dynamic bands that adapt to slope direction and offer real-time visual zones for support and resistance within trend structures.
These features are not typically found in standard Z-Score indicators and collectively provide a unique approach that bridges statistical normalization, structure detection, and adaptive trend modeling within one script.
Features
Z-Score-based oscillator combining RSI, StochRSI, and MACD
Configurable smoothing for stable composite signal output
Buy/Sell TP signals based on slope flips in defined zones
Background highlighting for extreme outer bands
Inner and outer zones with fill logic for statistical context
Pivot-based divergence detection (regular bullish/bearish)
Divergence markers on oscillator and price chart
Slope-Adaptive EMA (SA-EMA) with real-time adaptivity based on RSI Z-Score
ATR-based upper and lower bands around the SA-EMA, visibility tied to slope direction
Configurable bar coloring (oscillator slope, divergence, or most recent signal)
Alerts for TP signals and confirmed divergences
Optional fixed Y-axis scaling for consistent oscillator view
The full setup mode can be seen below:
Input Parameters
General Settings
Full Setup: Enables rendering of the full visual system (lines, bands, signals)
Z-Score Lookback: Lookback period for normalization (mean and standard deviation)
Main Line Smoothing: EMA length applied to the averaged Z-Score
Slope Detection Index: Used to calculate directional flips for signal logic
Enable Background Highlighting: Enables visual region coloring in
overbought/oversold areas
Force Visible Y-Axis Scale: Forces max/min bounds for a consistent oscillator range
Divergence Settings
Enable Divergence Detection: Toggles divergence logic
Pivot Lookback Left / Right: Defines the structure of oscillator pivot points
Minimum / Maximum Bars Between Pivots: Controls the allowed spacing range for divergence validation
Bar Coloring Settings
Bar Coloring Mode:
➜ Line Color: Colors bars based on oscillator slope
➜ Latest Confirmed Signal: Colors bars based on the most recent confirmed divergence
➜ Any Latest Signal: Colors based on the most recent signal (TP or divergence)
SA-EMA Settings
RSI Length: RSI period used to determine adaptivity
Z-Score Length: Lookback for normalizing RSI in adaptive logic
Base EMA Length: Base length for smoothing before adaptivity
Adaptivity Intensity: Scales the smoothing responsiveness based on RSI deviation
Slope Index: Determines slope direction for coloring and band logic
Band ATR Length / Band Multiplier: Controls the width and responsiveness of the trend-following bands
Alerts
The script includes the following alert conditions:
Buy Signal (TP reversal detected in oversold zone)
Sell Signal (TP reversal detected in overbought zone)
Confirmed Bullish Divergence (oscillator HL, price LL)
Confirmed Bearish Divergence (oscillator LH, price HH)
These alerts allow integration into automation systems or signal monitoring setups.
Summary
Uptrick: Dynamic Z-Score Divergence is a statistically grounded trading indicator that merges normalized multi-momentum analysis with real-time slope logic, divergence detection, and adaptive trend overlays. It helps traders identify mean-reversion conditions, divergence structures, and evolving trend zones using a modular system of statistical and structural tools. Its alert system, layered visuals, and flexible input design make it suitable for discretionary traders seeking to combine quantitative momentum logic with structural pattern recognition.
Disclaimer
This script is for educational and informational purposes only. No indicator can guarantee future performance, and trading involves risk. Always use risk management and test strategies in a simulated environment before deploying with live capital.
Dresteghamat:Adaptive Multi-TF Decision Engine**Dresteghamat: Adaptive Multi-Timeframe Decision Engine**
This open-source indicator is an algorithmic decision-support system designed to filter market noise by quantifying three core market dimensions: **Regime**, **Direction**, and **Exhaustion**.
**⚠️ Technical Note on Originality:**
This script solves the "Timeframe Irrelevance" problem found in standard dashboards. Instead of using static HTF references, it implements a custom **"Adaptive Context Engine"** (see lines 245-270 in source code). It calculates the user's current `timeframe.multiplier` and dynamically maps the mathematically relevant Higher Timeframes.
* *Innovation:* A 5m chart automatically weights 15m/1H structure, whereas a 1H chart weights 4H/Daily structure. This dynamic logic is proprietary and ensures contextual accuracy.
---
### 🛠️ Logic & Calculation Methodology
The script does not simply overlay indicators. It processes raw market data through a **Weighted Scoring Engine** (lines 275-285) to output a unified market state.
**1. Regime Identification (Volatility Normalized)**
We calculate a custom "Volatility Ratio" to distinguish Trend vs. Range regimes.
* **Logic:** `Range / Smoothed_ATR`.
* **Function:** If Ratio > 2.0, the market is in Expansion (Trend). If < 1.2, it is in Compression (Range). This normalizes volatility across assets (Crypto/Forex/Stocks).
**2. Directional Bias (Composite Metric)**
Direction is calculated via a voting system of three sub-components (lines 80-130):
* **Structural Pivots:** Detects Swing Highs/Lows using a 25-bar lookback to define market structure.
* **Cumulative Body Delta:** Tracks the net buying/selling pressure within candle bodies.
* **Micro-Flow:** A short-term (5-bar) momentum filter to detect immediate order flow shifts.
**3. Exhaustion Model (Risk Management)**
The script prevents late entries by calculating an "Exhaustion Score" (lines 150-200). It aggregates:
* **VRSD (Volatility Regime Shift):** Detects when volatility expands > 2 standard deviations (Mean Reversion risk).
* **Volume Decay (VEFF):** Identifies Divergence where price makes new highs on declining Volume MA.
* **RSI/Impulse Divergence:** Standard momentum divergence logic.
**4. The Decision Output (MODE)**
The dashboard renders a final signal based on a hierarchical algorithm:
* **BUY/SELL ONLY:** Triggered when Current Momentum aligns with the Dynamically Selected HTF Structure AND the Exhaustion Score is low.
* **PULLBACK:** Triggered when HTF Structure is bullish, but Current Momentum is bearish (indicating a corrective phase).
* **HTF EXHAUST:** Overrides signals when the Higher Timeframe metrics hit extreme levels.
* **WAIT:** Default state during Range Regimes or conflicting signals.
---
### 📊 Usage Guide
1. Apply to chart (Auto-adapts to any timeframe).
2. **Status Column:** Shows the raw health of the trend (Strong/Weakening/Exhausted).
3. **MODE Column:** Displays the final actionable bias based on the scoring algorithm.
**Disclaimer:** This tool provides statistical analysis based on historical data. It does not guarantee future results.
Supertrend + QQE MOD CombinedI've combined the Supertrend and QQE MOD scripts into a unified trading system. Here's what the combined indicator does:
Dual Signal System:
1. buy/sell labels show every Supertrend reversal
2. Strong Buy/Strong Sell labels only appear when both Supertrend AND QQE MOD align
Signal Logic:
1. Continuous Alignment Check:
alignedBullish - TRUE whenever both Supertrend is bullish AND QQE is bullish
alignedBearish - TRUE whenever both Supertrend is bearish AND QQE is bearish
2. Signal Triggers:
BUY Signal - Fires when alignment FIRST becomes bullish (wasn't aligned before, now is)
SELL Signal - Fires when alignment FIRST becomes bearish (wasn't aligned before, now is)
Alert System:
1. Individual alerts for Supertrend reversals and QQE signals
2. Combined alerts (most important): Fire only when both indicators align
"Any Combined Signal" alert catches both buy and sell alignments
Dashboard:
1. Shows individual status of Supertrend and QQE MOD
2. "Alignment" row shows if both are bullish/bearish
3. "Signal" row highlights actual entry signals
Optional Features:
1. Trading session filter (enable/disable)
2. Background highlighting on signals
3. Toggle individual Supertrend labels
4. Toggle combined signal labels
What This all Means:
Now you'll get signals in these scenarios:
1. Supertrend reverses and QQE is already aligned ✓ (original behavior)
2. QQE crosses threshold while Supertrend is already in the right direction ✓ (NEW!)
Both align simultaneously ✓
Visual Feedback:
Large BUY/SELL labels - Appear when alignment FIRST occurs (entry point)
Background color - Stays highlighted continuously while aligned (shows you're in a good trade zone)
Dashboard - Now shows "Hold Long" or "Hold Short" when aligned but no new signal
This gives you more entry opportunities while maintaining the requirement that both indicators must agree!
Trend ProTrend Pro is a volatility-adaptive trend and momentum system designed for scalping, day trading, and short-term swing trading.
It uses an ATR-based dynamic trend line (Alpha-Trend style) to identify momentum shifts and confirm directional strength.
Unlike traditional moving averages, Trend Pro adapts to volatility and reacts faster during expansions while filtering noise during chop.
🔍 How Trend Pro Works
Trend Pro builds a dynamic volatility channel using ATR and tracks whether price stays above or below this adaptive line.
When price crosses and closes on the opposite side, it suggests a shift in market control.
When price closes above the line → the trend turns BULLISH (green)
When price closes below the line → the trend turns BEARISH (red)
This gives a clear, visual trend state without repainting.
Tips for Best Performance:
✔ Avoid signals directly inside major ranges or sideways chop
✔ Strongest entries come after small pullbacks into the line
✔ Combine signals with:
Market structure
Key swing highs/lows
Liquidity sweeps
Session timing (NYSE open, power hour)
✔ Trend Pro works best when used with the trend, not counter-trend
Enjoy!
15m ORB BREAK AND RETEST - MIDPOINT═══════════════════════════════════
15m ORB BREAK AND RETEST - MIDPOINT
═══════════════════════════════════
Free professional 15-minute Opening Range Breakout indicator from QuantCrawler - your AI-powered futures trading analysis platform.
Built as a free resource for the trading community. Support us at quantcrawler.com and on YouTube @AutomateWithAaron.
═══════════════════════════════════
📊 HOW IT WORKS
1. Captures the 15-minute Opening Range (default: 9:30-9:45 AM ET)
2. Draws OR High, OR Low, and Midpoint levels on your chart
3. Detects breakouts when price closes beyond the OR zone + your specified distance
4. Fires LONG/SHORT entry signals when price retests the OR midpoint after breakout
═══════════════════════════════════
✓ FEATURES
- Runs on 1m or 5m charts - captures 15m opening range automatically
- Universal - works on futures, forex, stocks, and crypto
- Customizable sessions - NY, London, Asia, or any custom timeframe
- Adjustable breakout distance to match your instrument
- Clean visual signals - only shows actionable entries
- Session end time stops monitoring after market close
═══════════════════════════════════
⚙️ SETTINGS
- Breakout Distance (Points): Distance outside OR zone to confirm breakout
- Timezone: Select your trading session
- Opening Range Time: First 15 minutes to capture (default 9:30-9:45)
- Session End Time: When to stop monitoring (default 16:00)
═══════════════════════════════════
🎯 IDEAL FOR
Day traders and swing traders who prefer wider opening ranges for reduced noise. The 15-minute OR provides more stable support/resistance levels compared to 5m setups.
═══════════════════════════════════
🚀 WANT MORE?
This indicator pairs perfectly with QuantCrawler's AI-powered chart analysis:
- Multi-timeframe futures analysis (15m/5m/1m scalping, 4H/1H/30m intraday, 1D/4H/1H swing)
- Precision entry points, stop losses, and profit targets
- Confidence scoring for every setup
- Covers futures, forex, and crypto markets
Visit quantcrawler.com to see how AI can level up your trading.
═══════════════════════════════════
⚠️ DISCLAIMER
This indicator is for educational purposes only. Past performance does not guarantee future results. Always use proper risk management and never risk more than you can afford to lose.
═══════════════════════════════════
Built with ❤️ by Aaron and QuantCrawler
quantcrawler.com | AI-Powered Futures Trading Analysis
Labden Swing 1.0Labden Swing Indicator, non real-time. good with semafor, ema 12 & 26 stochastic rsi and macd
Pre-Market ORB Break and Retest - Institutional═══════════════════════════════════
PRE-MARKET ORB BREAK AND RETEST - INSTITUTIONAL
═══════════════════════════════════
Free professional Pre-Market Opening Range Breakout indicator from QuantCrawler - your AI-powered futures trading analysis platform.
Built as a free resource for the trading community. Support us at quantcrawler.com and on YouTube @AutomateWithAaron.
═══════════════════════════════════
📊 HOW IT WORKS
1. Captures the 8:00-8:15 AM ET pre-market range where institutional investors position
2. Draws OR High, OR Low, and Midpoint levels on your chart
3. Waits for market open at 9:30 AM EST before detecting breakouts
4. Fires LONG/SHORT entry signals when price retests the OR midpoint after breakout
═══════════════════════════════════
✓ FEATURES
- Runs on 1m or 5m charts - captures 15m pre-market range automatically
- Zone marked at 8:15 AM, trades trigger after 9:30 AM market open
- Universal - works on futures, forex, stocks, and crypto
- Customizable sessions - NY, London, Asia, or any custom timeframe
- Adjustable breakout distance to match your instrument
- Clean visual signals - only shows actionable entries
- Session end time stops monitoring after market close
═══════════════════════════════════
⚙️ SETTINGS
- Breakout Distance (Points): Distance outside OR zone to confirm breakout
- Timezone: Select your trading session
- Opening Range Time: Pre-market positioning window (default 8:00-8:15)
- Session End Time: When to stop monitoring (default 16:00)
═══════════════════════════════════
🎯 IDEAL FOR
Day traders who defend institutional positioning levels. The 8:00-8:15 AM range captures where smart money positions before retail market open, giving you an edge on key support/resistance zones.
═══════════════════════════════════
🚀 WANT MORE?
This indicator pairs perfectly with QuantCrawler's AI-powered chart analysis:
- Multi-timeframe futures analysis (15m/5m/1m scalping, 4H/1H/30m intraday, 1D/4H/1H swing)
- Precision entry points, stop losses, and profit targets
- Confidence scoring for every setup
- Covers futures, forex, and crypto markets
Visit quantcrawler.com to see how AI can level up your trading.
═══════════════════════════════════
⚠️ DISCLAIMER
This indicator is for educational purposes only. Past performance does not guarantee future results. Always use proper risk management and never risk more than you can afford to lose.
═══════════════════════════════════
Built with ❤️ by Aaron at QuantCrawler
quantcrawler.com | AI-Powered Futures Trading Analysis
GOLD 5MIN — 9×21 EMA Strategy (Aggressive)GOLD 5-MIN 9×21 EMA (Aggressive Version)
EMA Trend + VWAP Direction + Statistical RSI/MACD Filter
📌 Overview
This strategy is a short-term trend-following system built for GOLD MGC1! on the 5-minute chart.
It uses a combination of:
9/21 EMA momentum cross
50 & 200 EMA trend filters
VWAP directional alignment
Data-driven RSI + MACD histogram filter (for shorts)
Strict time-of-day filters
Statistically optimized SL & TP levels based on average run-up and drawdown
This version represents the highest-performing configuration after analyzing hundreds of trades across a multi-month dataset.
It is designed specifically for manual traders (including prop traders) who must trade themselves and cannot use bots.
📌 Why This Strategy Works
Backtesting revealed several repeatable tendencies in the GOLD 5-minute market:
EMA Trend + VWAP Alignment Increases Win Probability
Trades taken with both EMA structure And VWAP direction had much better follow-through.
Longs → work best when above VWAP and VWAP risingShorts → work best when below VWAP and VWAP falling
This filter alone removed many losing signals.
Shorts Were Bad When RSI > 55 AND MACD Histogram Rising
This scenario repeatedly produced:
reduced R-multiple output
shallow follow-through
high likelihood of being squeezed
Filtering out these shorts increased profitability significantly.
3. Certain Hours of the Day Lose Money
The two statistically weakest windows were:
❌ 08:00 EST
❌ 10:00 EST
Removing these increased expectancy without sacrificing win rate.
4. A Fixed 2R Target on Longs + Fixed $161 TP on Shorts
Using the statistical distribution of run-up:
Longs favored ~2R
Shorts favored a fixed TP of $161 per contract (equivalent avg move)
This combination produced the most stable equity curve.
📌 Backtest Summary (Aggressive Version)
(Numbers reflect your exact dataset: Sept 25 – Nov 22)
+8.4% account growth trading a single micro contract
Profit Factor ~ 2.2
~58% win rate
Shallow max drawdown (~1.3%)
Very consistent equity curve
Highest P&L of all strategy variants tested
This version provided the best risk-adjusted performance and the smoothest equity curve, outperforming conservative and hybrid exit versions.
📌 When This Strategy Works Best
Based on verified trade statistics, the strategy performs strongest during:
Best Sessions
⭐ London Session (3–5 AM EST)
⭐ NY Pre-Market (7–8:30 AM EST)
⭐ NY Session Trend Legs (9:30–12:00 PM EST)
Avoid
❌ 8:00 AM EST spike
❌ 10:00 AM EST chop
❌ 16:30–18:00 PM EST session reset
❌ Wild FOMC / CPI / NFP moments unless you turn the strategy off
📌 How Entries Work
You get an entry signal only if:
9 EMA crosses 21 EMA
50 & 200 EMA confirm trend direction
VWAP confirms direction
Not during weak hours
Not during the 16:30–18:00 reset
Shorts pass RSI+MACD filter
Confidence weighting determines position size:
Conf 3 (high confidence) → 2 contracts
Low confidence → 1 contract
📌 Stop Loss & Take Profit Logic
LONGS
Stop = swing low − 3 ticks
Target = 2R
SHORTS
Stop = swing high + 3 ticks
Target = fixed $161 per contract
This TP was statistically verified from average short-run behavior.
📌 Setting Up Alerts (Manual Trader Instructions)
STEP 1 — Use “Order fills & alert() function calls”
In the Create Alert panel:
Condition: GOLD 5MIN — 9×21 EMA Strategy (Aggressive…)
Type: ✔ Order fills & alert() function calls
Interval: Same as chart (5 min)
Expiration: choose a long window (e.g., 6–12 months)
This ensures you receive:
✓ Entry alerts (Long / Short)
✗ No exit alerts unless explicitly coded
📌 What to Put in the Message Box
Use this simple, readable format:
text{{strategy.order.action}}
{{strategy.order.contracts}} contract(s)
@ {{strategy.order.price}}
Position size: {{strategy.position_size}}
You can also include SL / TP if needed:
textEntry: {{strategy.order.price}}
SL: {{plot("stop_level")}}
TP: {{plot("tp_level")}}
(I can wire these into Pine if you'd like.)
📌 How to Use Alerts in a Prop Firm (No Bots Allowed)
When an alert fires:
Open your DOM / order panel
Match the direction (Buy or Sell)
Enter:
* Entry price (market or limit)
* Stop loss at the strategy’s stop level
* Take profit at the displayed TP level
Size
* 1 contract = Low confidence
* 2 contracts = Conf 3
Let the trade run—do not manually override unless platform constraints require it.
This creates a mechanical, rules-based approach without automation, fully compliant with prop firm rules.
📌 Intended Audience
This strategy is ideal for:
✔ Prop traders (TP Trader, Apex, Topstep)
Manual execution only—no bots required.
✔ Intraday gold traders
Those who want a rules-based, statistically proven, trend-following micro futures system.
✔ New systematic traders
Clear logic, easy visuals, simple alerts.
📌 Final Notes
This script is the product of:
data-driven optimization
hundreds of trades
removal of low-probability behavior
strict adherence to verifiable edges
It is not curve-fit—all rules are independently validated via:
distribution analysis
time-of-day heatmaps
indicator correlation
run-up/drawdown buckets
This makes it robust enough for prop evaluation trading and real capital deployment.
— ASALEH2297
Smart Money Volume Matrix [Ata]Smart Money Volume Matrix
The Smart Money Volume Matrix (SMV Matrix) is an advanced volume-spread analysis (VSA) dashboard and charting tool designed to identify significant market anomalies by analyzing the relationship between price extremes and volume flow.
Unlike traditional indicators that rely solely on moving averages or oscillators, this tool performs a "Snapshot Analysis" of a defined lookback period (default: 100 bars) to rank price action based on Order Flow Dominance. It isolates the Top 10 Highest and Lowest Close prices and scrutinizes the volume behind them to categorize market sentiment into four distinct phases: Distribution, No Demand, Absorption, and Exhaustion.
Core Logic & Methodology
The script operates on a Zero-Lag Snapshot Engine. It does not print historical signals bar-by-bar; instead, it evaluates the current market structure relative to the recent history (Lookback Period).
1. Ranking Engine: The script scans the lookback period to find the Top 10 Highest Closes and Top 10 Lowest Closes.
2. Volume Classification: For each ranked bar, it calculates the "Intrabar Buy/Sell Volume" (or approximates it using candle geometry if Intrabar data is unavailable).
3. Dominance Detection: It compares Buying Volume vs. Selling Volume to determine who is in control at critical price levels.
Signal Classifications (VSA Logic)
The indicator generates labels on the chart and updates the dashboard table based on the following logic:
1. At Price Tops (Resistance Areas):
- Distribution (Supply): High Price + High Total Volume + Sellers Dominant.
Interpretation: Indicates heavy institutional selling into rising prices. Often precedes a reversal.
- Buy Climax: High Price + High Total Volume + Buyers Dominant.
Interpretation: Extreme buying frenzy. While bullish, it often marks a "trap" or temporary top due to exhaustion.
- No Demand: High Price + Low Volume.
Interpretation: Prices drifted higher but lack institutional participation. A sign of weakness.
2. At Price Bottoms (Support Areas):
- Absorption: Low Price + High Total Volume + Buyers Dominant.
Interpretation: Institutional money is absorbing selling pressure (passive buying). A strong sign of accumulation.
- Panic Sell: Low Price + High Total Volume + Sellers Dominant.
Interpretation: Extreme fear. High volume at lows typically indicates capitulation and potential hands-changing.
- Exhaustion: Low Price + Low Volume.
Interpretation: Selling pressure has dried up. The market may float upward due to lack of sellers.
Key Features
- Dashboard Matrix Table:
Displays the exact Close Price, Buy/Sell Volume, and Market State (Group) for the Top 10 ranking bars.
Smart Footer: Automatically detects the active "Resistance Zone" (derived from G1 Distribution levels) and "Support Zone" (derived from G3 Absorption levels) and reports the current price status relative to these zones (e.g., "Testing Resistance", "Breakout", "At Support").
- Smart Zones (Auto S/R):
Automatically draws Support and Resistance boxes extending into the future based on the most significant volume clusters found in the rankings. Includes logic to detect "Flips" (e.g., when Support breaks, it is labeled as a flip to Resistance).
- Average Trend Channels:
Calculates a Linear Regression trend line based specifically on the coordinates of the Top 10 Highs and Top 10 Lows, providing a "Best Fit" channel for the current market structure.
- Visual Clarity:
Labels utilize a "Smart Stacking" algorithm to prevent overlap on the chart. Guide lines connect labels to their respective candles for precise identification.
Settings & Configuration
- Matrix Settings: Lookback Period (default 100 bars) and Top Rank Count.
- Volume Engine: Choose between "Intrabar (Precise)" for accurate order flow or "Geometry (Approx)" for standard volume estimation.
- Visuals: Toggle Table, Labels, Lines, Zones, and Trend Lines. Adjust transparency and font sizes.
IMPORTANT NOTE ON SNAPSHOT LOGIC
This indicator is designed as a Real-Time Dashboard. It continuously updates the "Top 10" list as new candles form. Therefore, a label that appears on a candle may disappear if that candle falls out of the Top 10 ranking or leaves the lookback window. This is intended behavior to ensure the chart always reflects the current most critical levels, rather than a historical record of past signals. It is best used for live market analysis rather than historical back testing.
Disclaimer: This tool is for educational and analytical purposes only. Volume analysis is subjective and should be used in conjunction with other methods of technical analysis.
Multi Timeframe Bollinger Bands Spectrum [Ata]Multi-Timeframe Bollinger Bands Spectrum
Technical Overview
This script integrates multi-timeframe volatility analysis with volume-derived order flow estimation. By combining Bollinger Bands (statistical deviation) with internal candle volume logic, the indicator qualifies price movements to differentiate between sustained trends, reversals, and exhaustion events.
The system is designed to provide a structural context for price action, visualizing market regimes through a dual-zone spectrum and filtering signals based on the interaction between price location and specific volume thresholds.
Core Logic & Calculation
1. Volume Decomposition Algorithm
Instead of using total volume, the script estimates Buying Pressure vs. Selling Pressure based on the close position relative to the candle's High/Low range:
- Buying Volume (vb): Increases as the close approaches the High.
- Selling Volume (vs): Increases as the close approaches the Low.
This logic allows the detection of directional flow even within standard volume bars.
2. Statistical Spectrum
The indicator renders deviations from the Basis (SMA) as two distinct zones:
- Bullish Zone (Blue): Price positioning between the Basis and Upper Band.
- Bearish Zone (Red): Price positioning between the Basis and Lower Band.
This structure is applied across multiple timeframes (overlay) to visualize the macro trend context without noise.
3. Non-Repainting Execution
To ensure historical accuracy and reliability for backtesting, all higher-timeframe data is requested using "lookahead_off". Signals are confirmed only upon the closure of the respective timeframe's candle.
Signal Definitions
Signals are generated only when specific Volatility and Volume conditions intersect:
Reversal Setups (Reaction to Liquidity)
- WALL: Triggered when price rejects the Upper Band accompanied by Extreme Selling Volume (vs > Limit). This suggests active limit sell orders absorbing the rally.
- FLOOR: Triggered when price rejects the Lower Band accompanied by Extreme Buying Volume (vb > Limit). This suggests active limit buy orders absorbing the drop.
- ABSORP: Identifies absorption near the lower bands where selling pressure is met with passive buying (indicated by lower wicks and relative buy volume).
Momentum Setups (Trend Continuation)
- POWER: Validates a breakout above the Upper Band only if supported by Dominant Buying Volume and a strong candle body.
- PANIC: Validates a breakdown below the Lower Band only if supported by Dominant Selling Volume.
- TRAP: Marks failed breakouts where price exits the bands but volume analysis contradicts the move (e.g., low directional volume).
Exhaustion Setups (Statistical Extremes)
- CLIMAX/CRASH: Identifies anomalies where price deviates significantly from the mean (Extreme Deviation) or when volume reaches unsustainable levels relative to the average, often preceding a mean reversion.
Input Parameters
- Bollinger Logic: Configuration for Length and Standard Deviation Multiplier.
- Volume Thresholds: Adjustable factors for Minimum Volume (Trend) and Extreme Volume (Reversal/Climax).
- Timeframe Layers: Toggle visibility for up to 5 higher timeframes.
- Theme: Adjusts label contrast for Dark/Light backgrounds.
Disclaimer
This indicator is strictly for analytical purposes. It provides a visualization of past market data based on statistical and volumetric formulas. Users should apply their own risk management protocols.
Donchian Predictive Channel (Zeiierman)█ Overview
Donchian Predictive Channel (Zeiierman) extends the classic Donchian framework into a predictive structure. It does not just track where the range has been; it projects where the Donchian mid, high, and low boundaries are statistically likely to move based on recent directional bias and volatility regime.
By quantifying the linear drift of the Donchian midline and the expansion or compression rate of the Donchian range, the indicator generates a forward propagation cone that reflects the prevailing trend and volatility state. This produces a cleaner, more analytically grounded projection of future price corridors, and it remains fully aligned with the signal precision of the underlying Donchian logic.
█ How It Works
⚪ Donchian Core
The script first computes a standard Donchian Channel over a configurable Length:
Upper Band (dcHi) – highest high over the lookback.
Lower Band (dcLo) – lowest low over the lookback.
Midline (dcMd) – simple midpoint of upper and lower: (dcHi + dcLo)/ 2.
f_getDonchian(length) =>
hi = ta.highest(high, length)
lo = ta.lowest(low, length)
md = (hi + lo) * 0.5
= f_getDonchian(lenDC)
⚪ Slope Estimation & Range Dynamics
To turn the Donchian Channel into a predictive model, the script measures how both the midline and the range are changing over time:
Midline Slope (mSl) – derived from a 1-bar difference in linear regression of the midline.
Range Slope (rSl) – derived from a 1-bar difference in linear regression of the Donchian range (dcHi − dcLo).
This pair describes both directional drift (uptrend vs. downtrend) and range expansion/compression (volatility regime).
f_getSlopes(midLine, rngVal, length) =>
mSl = ta.linreg(midLine, length, 0) - ta.linreg(midLine, length, 1)
rSl = ta.linreg(rngVal, length, 0) - ta.linreg(rngVal, length, 1)
⚪ Forward Projection Engine
At the last bar, the indicator constructs a set of forward points for the mid, upper, and lower projections over Forecast Bars:
The midline is projected linearly using the midline slope per bar.
The range is adjusted using the range slope per bar, creating either a widening cone (expansion) or a tightening cone (compression).
Upper and lower projections are then anchored around the projected midline, with logic that keeps the structure consistent and prevents pathological flips when slope changes sign.
f_generatePoints(hi0, md0, lo0, steps, midSlp, rngSlp) =>
upPts = array.new()
mdPts = array.new()
dnPts = array.new()
fillPts = array.new()
hi_vals = array.new_float()
md_vals = array.new_float()
lo_vals = array.new_float()
curHiLocal = hi0
curLoLocal = lo0
curMidLocal = md0
segBars = math.floor(steps / 3)
segBars := segBars < 1 ? 1 : segBars
for b = 0 to steps
mdProj = md0 + midSlp * b
prevRange = curHiLocal - curLoLocal
rngProj = prevRange + rngSlp * b
hiTemp = 0.0
loTemp = 0.0
if midSlp >= 0
hiTemp := math.max(curHiLocal, mdProj + rngProj * 0.5)
loTemp := math.max(curLoLocal, mdProj - rngProj * 0.5)
else
hiTemp := math.min(curHiLocal, mdProj + rngProj * 0.5)
loTemp := math.min(curLoLocal, mdProj - rngProj * 0.5)
hiProj = hiTemp < mdProj ? curHiLocal : hiTemp
loProj = loTemp > mdProj ? curLoLocal : loTemp
if b % segBars == 0
curHiLocal := hiProj
curLoLocal := loProj
curMidLocal := mdProj
array.push(hi_vals, curHiLocal)
array.push(md_vals, curMidLocal)
array.push(lo_vals, curLoLocal)
array.push(upPts, chart.point.from_index(bar_index + b, curHiLocal))
array.push(mdPts, chart.point.from_index(bar_index + b, curMidLocal))
array.push(dnPts, chart.point.from_index(bar_index + b, curLoLocal))
ptSet.new(upPts, mdPts, dnPts)
⚪ Rejection Signals
The script also tracks failed Donchian breakouts and marks them as potential reversal/reversion cues:
Signal Down: Triggered when price makes an attempt above the upper Donchian band but then pulls back inside and closes above the midline, provided enough bars have passed since the last signal.
Signal Up: Triggered when price makes an attempt below the lower Donchian band but then snaps back inside and closes below the midline, also requiring sufficient spacing from the previous signal.
// Base signal conditions (unfiltered)
bearCond = high < dcHi and high >= dcHi and close > dcMd and bar_index - lastMarker >= lenDC
bullCond = low > dcLo and low <= dcLo and close < dcMd and bar_index - lastMarker >= lenDC
// Apply MA filter if enabled
if signalfilter
bearCond := bearCond and close < ma // Bearish only below MA
bullCond := bullCond and close > ma // Bullish only above MA
signalUp := false
signalDn := false
if bearCond
lastMarker := bar_index
signalDn := true
if bullCond
lastMarker := bar_index
signalUp := true
█ How to Use
The Donchian Predictive Channel is designed to outline possible future price trajectories. Treat it as a directional guide, not a fixed prediction tool.
⚪ Map Future Support & Resistance
Use the projected upper and lower paths as dynamic future reference levels:
Projected upper band ≈ is likely a resistance corridor if the current trend and volatility persist.
Projected lower band ≈ likely support corridor or expected downside range.
⚪ Trend Path & Volatility Cone
Because the projection is driven by midline and range slopes, the channel behaves like a trend + volatility cone:
Steep positive midline slope + expanding range → accelerating, high-volatility trend.
Flat midline + compressing range → coiling/contracting regime ahead of potential expansion.
This helps you distinguish between a gentle drift and an aggressive move that likely needs more risk buffer.
⚪ Reversion & Rejection Signals
The Donchian-based signals are especially useful for mean-reversion and fade-style trades.
A Signal Down near the upper band can mark a failed breakout and a potential rotation back toward the midline or the lower projected band.
A Signal Up near the lower band can flag a failed breakdown and a potential snap-back up the channel.
When Filter Signals is enabled, these signals are only generated when they align with the chart’s directional bias as defined by the moving average. Bullish signals are allowed only when the price is above the MA, and bearish signals only when the price is below it.
This reduces noise and helps ensure that reversions occur in harmony with the prevailing trend environment.
█ Settings
Length – Donchian lookback length. Higher values produce a smoother channel with fewer but more stable signals. Lower values make the channel more reactive and increase sensitivity at the cost of more noise.
Forecast Bars – Number of bars used for projecting the Donchian channel forward.
Higher values create a broader, longer-term projection. Lower values focus on short-horizon price path scenarios.
Filter Signals – Enables directional filtering of Donchian signals using the selected moving average. When ON, bullish signals only trigger when the price is above the MA, and bearish signals only trigger when the price is below it. This helps reduce noise and aligns reversions with the broader trend context.
Moving Average Type – The type of moving average used for signal filtering and optional plotting.
Choose between SMA, EMA, WMA, or HMA depending on desired responsiveness. Faster averages (EMA, HMA) react quickly, while slower ones (SMA, WMA) smooth out short-term noise.
Moving Average Length – Lookback length of the moving average. Higher values create a slower, more stable trend filter. Lower values track price more tightly and can flip the directional bias more frequently.
-----------------
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.
Bifurcation Zone - CAEBifurcation Zone — Cognitive Adversarial Engine (BZ-CAE)
Bifurcation Zone — CAE (BZ-CAE) is a next-generation divergence detection system enhanced by a Cognitive Adversarial Engine that evaluates both sides of every potential trade before presenting signals. Unlike traditional divergence indicators that show every price-oscillator disagreement regardless of context, BZ-CAE applies comprehensive market-state intelligence to identify only the divergences that occur in favorable conditions with genuine probability edges.
The system identifies structural bifurcation points — critical junctures where price and momentum disagree, signaling potential reversals or continuations — then validates these opportunities through five interconnected intelligence layers: Trend Conviction Scoring , Directional Momentum Alignment , Multi-Factor Exhaustion Modeling , Adversarial Validation , and Confidence Scoring . The result is a selective, context-aware signal system that filters noise and highlights high-probability setups.
This is not a "buy the arrow" indicator. It's a decision support framework that teaches you how to read market state, evaluate divergence quality, and make informed trading decisions based on quantified intelligence rather than hope.
What Sets BZ-CAE Apart: Technical Architecture
The Problem With Traditional Divergence Indicators
Most divergence indicators operate on a simple rule: if price makes a higher high and RSI makes a lower high, show a bearish signal. If price makes a lower low and RSI makes a higher low, show a bullish signal. This creates several critical problems:
Context Blindness : They show counter-trend signals in powerful trends that rarely reverse, leading to repeated losses as you fade momentum.
Signal Spam : Every minor price-oscillator disagreement generates an alert, overwhelming you with low-quality setups and creating analysis paralysis.
No Quality Ranking : All signals are treated identically. A marginal divergence in choppy conditions receives the same visual treatment as a high-conviction setup at a major exhaustion point.
Single-Sided Evaluation : They ask "Is this a good long?" without checking if the short case is overwhelmingly stronger, leading you into obvious bad trades.
Static Configuration : You manually choose RSI 14 or Stochastic 14 and hope it works, with no systematic way to validate if that's optimal for your instrument.
BZ-CAE's Solution: Cognitive Adversarial Intelligence
BZ-CAE solves these problems through an integrated five-layer intelligence architecture:
1. Trend Conviction Score (TCS) — 0 to 1 Scale
Most indicators check if ADX is above 25 to determine "trending" conditions. This binary approach misses nuance. TCS is a weighted composite metric:
Formula : 0.35 × normalize(ADX, 10, 35) + 0.35 × structural_strength + 0.30 × htf_alignment
Structural Strength : 10-bar SMA of consecutive directional bars. Captures persistence — are bulls or bears consistently winning?
HTF Alignment : Multi-timeframe EMA stacking (20/50/100/200). When all EMAs align in the same direction, you're in institutional trend territory.
Purpose : Quantifies how "locked in" the trend is. When TCS exceeds your threshold (default 0.80), the system knows to avoid counter-trend trades unless other factors override.
Interpretation :
TCS > 0.85: Very strong trend — counter-trading is extremely high risk
TCS 0.70-0.85: Strong trend — favor continuation, require exhaustion for reversals
TCS 0.50-0.70: Moderate trend — context matters, both directions viable
TCS < 0.50: Weak/choppy — reversals more viable, range-bound conditions
2. Directional Momentum Alignment (DMA) — ATR-Normalized
Formula : (EMA21 - EMA55) / ATR14
This isn't just "price above EMA" — it's a regime-aware momentum gauge. The same $100 price movement reads completely differently in high-volatility crypto versus low-volatility forex. By normalizing with ATR, DMA adapts its interpretation to current market conditions.
Purpose : Quantifies the directional "force" behind current price action. Positive = bullish push, negative = bearish push. Magnitude = strength.
Interpretation :
DMA > 0.7: Strong bullish momentum — bearish divergences risky
DMA 0.3 to 0.7: Moderate bullish bias
DMA -0.3 to 0.3: Balanced/choppy conditions
DMA -0.7 to -0.3: Moderate bearish bias
DMA < -0.7: Strong bearish momentum — bullish divergences risky
3. Multi-Factor Exhaustion Modeling — 0 to 1 Probability
Single-metric exhaustion detection (like "RSI > 80") misses complex market states. BZ-CAE aggregates five independent exhaustion signals:
Volume Spikes : Current volume versus 50-bar average
2.5x average: 0.25 weight
2.0x average: 0.15 weight
1.5x average: 0.10 weight
Divergence Present : The fact that a divergence exists contributes 0.30 weight — structural momentum disagreement is itself an exhaustion signal.
RSI Extremes : Captures oscillator climax zones
RSI > 80 or < 20: 0.25 weight
RSI > 75 or < 25: 0.15 weight
Pin Bar Detection : Identifies rejection candles (2:1 wick-to-body ratio, indicating failed breakout attempts): 0.15 weight
Extended Runs : Consecutive bars above/below EMA20 without pullback
30+ bars: 0.15 weight (market hasn't paused to consolidate)
Total exhaustion score is the sum of all applicable weights, capped at 1.0.
Purpose : Detects when strong trends become vulnerable to reversal. High exhaustion can override trend filters, allowing counter-trend trades at genuine turning points that basic indicators would miss.
Interpretation :
Exhaustion > 0.75: High probability of climax — yellow background shading alerts you visually
Exhaustion 0.50-0.75: Moderate overextension — watch for confirmation
Exhaustion < 0.50: Fresh move — trend can continue, counter-trend trades higher risk
4. Adversarial Validation — Game Theory Applied to Trading
This is BZ-CAE's signature innovation. Before approving any signal, the engine quantifies BOTH sides of the trade simultaneously:
For Bullish Divergences , it calculates:
Bull Case Score (0-1+) :
Distance below EMA20 (pullback quality): up to 0.25
Bullish EMA alignment (close > EMA20 > EMA50): 0.25
Oversold RSI (< 40): 0.25
Volume confirmation (> 1.2x average): 0.25
Bear Case Score (0-1+) :
Price below EMA50 (structural weakness): 0.30
Very oversold RSI (< 30, indicating knife-catching): 0.20
Differential = Bull Case - Bear Case
If differential < -0.10 (default threshold), the bear case is dominating — signal is BLOCKED or ANNOTATED.
For Bearish Divergences , the logic inverts (Bear Case vs Bull Case).
Purpose : Prevents trades where you're fighting obvious strength in the opposite direction. This is institutional-grade risk management — don't just evaluate your trade, evaluate the counter-trade simultaneously.
Why This Matters : You might see a bullish divergence at a local low, but if price is deeply below major support EMAs with strong bearish momentum, you're catching a falling knife. The adversarial check catches this and blocks the signal.
5. Confidence Scoring — 0 to 1 Quality Assessment
Every signal that passes initial filters receives a comprehensive quality score:
Formula :
0.30 × normalize(TCS) // Trend context
+ 0.25 × normalize(|DMA|) // Momentum magnitude
+ 0.20 × pullback_quality // Entry distance from EMA20
+ 0.15 × state_quality // ADX + alignment + structure
+ 0.10 × divergence_strength // Slope separation magnitude
+ adversarial_bonus (0-0.30) // Your side's advantage
Purpose : Ranks setup quality for filtering and position sizing decisions. You can set a minimum confidence threshold (default 0.35) to ensure only quality setups reach your chart.
Interpretation :
Confidence > 0.70: Premium setup — consider increased position size
Confidence 0.50-0.70: Good quality — standard size
Confidence 0.35-0.50: Acceptable — reduced size or skip if conservative
Confidence < 0.35: Marginal — blocked in Filtering mode, annotated in Advisory mode
CAE Operating Modes: Learning vs Enforcement
Off : Disables all CAE logic. Raw divergence pipeline only. Use for baseline comparison.
Advisory : Shows ALL signals regardless of CAE evaluation, but annotates signals that WOULD be blocked with specific warnings (e.g., "Bull: strong downtrend (TCS=0.87)" or "Adversarial bearish"). This is your learning mode — see CAE's decision logic in action without missing educational opportunities.
Filtering : Actively blocks low-quality signals. Only setups that pass all enabled gates (Trend Filter, Adversarial Validation, Confidence Gating) reach your chart. This is your live trading mode — trust the system to enforce discipline.
CAE Filter Gates: Three-Layer Protection
When CAE is enabled, signals must pass through three independent gates (each can be toggled on/off):
Gate 1: Strong Trend Filter
If TCS ≥ tcs_threshold (default 0.80)
And signal is counter-trend (bullish in downtrend or bearish in uptrend)
And exhaustion < exhaustion_required (default 0.50)
Then: BLOCK signal
Logic: Don't fade strong trends unless the move is clearly overextended
Gate 2: Adversarial Validation
Calculate both bull case and bear case scores
If opposing case dominates by more than adv_threshold (default 0.10)
Then: BLOCK signal
Logic: Avoid trades where you're fighting obvious strength in the opposite direction
Gate 3: Confidence Gating
Calculate composite confidence score (0-1)
If confidence < min_confidence (default 0.35)
Then: In Filtering mode, BLOCK signal; in Advisory mode, ANNOTATE with warning
Logic: Only take setups with minimum quality threshold
All three gates work together. A signal must pass ALL enabled gates to fire.
Visual Intelligence System
Bifurcation Zones (Supply/Demand Blocks)
When a divergence signal fires, BZ-CAE draws a semi-transparent box extending 15 bars forward from the signal pivot:
Demand Zones (Bullish) : Theme-colored box (cyan in Cyberpunk, blue in Professional, etc.) labeled "Demand" — marks where smart money likely placed buy orders as price diverged at the low.
Supply Zones (Bearish) : Theme-colored box (magenta in Cyberpunk, orange in Professional) labeled "Supply" — marks where smart money likely placed sell orders as price diverged at the high.
Theory : Divergences represent institutional disagreement with the crowd. The crowd pushed price to an extreme (new high or low), but momentum (oscillator) is waning, indicating smart money is taking the opposite side. These zones mark order placement areas that become future support/resistance.
Use Cases :
Exit targets: Take profit when price returns to opposite-side zone
Re-entry levels: If price returns to your entry zone, consider adding
Stop placement: Place stops just beyond your zone (below demand, above supply)
Auto-Cleanup : System keeps the last 20 zones to prevent chart clutter.
Adversarial Bar Coloring — Real-Time Market Debate Heatmap
Each bar is colored based on the Bull Case vs Bear Case differential:
Strong Bull Advantage (diff > 0.3): Full theme bull color (e.g., cyan)
Moderate Bull Advantage (diff > 0.1): 50% transparency bull
Neutral (diff -0.1 to 0.1): Gray/neutral theme
Moderate Bear Advantage (diff < -0.1): 50% transparency bear
Strong Bear Advantage (diff < -0.3): Full theme bear color (e.g., magenta)
This creates a real-time visual heatmap showing which side is "winning" the market debate. When bars flip from cyan to magenta (or vice versa), you're witnessing a shift in adversarial advantage — a leading indicator of potential momentum changes.
Exhaustion Shading
When exhaustion score exceeds 0.75, the chart background displays a semi-transparent yellow highlight. This immediate visual warning alerts you that the current move is at high risk of reversal, even if trend indicators remain strong.
Visual Themes — Six Aesthetic Options
Cyberpunk : Cyan/Magenta/Yellow — High contrast, neon aesthetic, excellent for dark-themed trading environments
Professional : Blue/Orange/Green — Corporate color palette, suitable for presentations and professional documentation
Ocean : Teal/Red/Cyan — Aquatic palette, calming for extended monitoring sessions
Fire : Orange/Red/Coral — Warm aggressive colors, high energy
Matrix : Green/Red/Lime — Code aesthetic, homage to classic hacker visuals
Monochrome : White/Gray — Minimal distraction, maximum focus on price action
All visual elements (signal markers, zones, bar colors, dashboard) adapt to your selected theme.
Divergence Engine — Core Detection System
What Are Divergences?
Divergences occur when price action and momentum indicators disagree, creating structural tension that often resolves in a change of direction:
Regular Divergence (Reversal Signal) :
Bearish Regular : Price makes higher high, oscillator makes lower high → Potential trend reversal down
Bullish Regular : Price makes lower low, oscillator makes higher low → Potential trend reversal up
Hidden Divergence (Continuation Signal) :
Bearish Hidden : Price makes lower high, oscillator makes higher high → Downtrend continuation
Bullish Hidden : Price makes higher low, oscillator makes lower low → Uptrend continuation
Both types can be enabled/disabled independently in settings.
Pivot Detection Methods
BZ-CAE uses symmetric pivot detection with separate lookback and lookforward periods (default 5/5):
Pivot High : Bar where high > all highs within lookback range AND high > all highs within lookforward range
Pivot Low : Bar where low < all lows within lookback range AND low < all lows within lookforward range
This ensures structural validity — the pivot must be a clear local extreme, not just a minor wiggle.
Divergence Validation Requirements
For a divergence to be confirmed, it must satisfy:
Slope Disagreement : Price slope and oscillator slope must move in opposite directions (for regular divs) or same direction with inverted highs/lows (for hidden divs)
Minimum Slope Change : |osc_slope| > min_slope_change / 100 (default 1.0) — filters weak, marginal divergences
Maximum Lookback Range : Pivots must be within max_lookback bars (default 60) — prevents ancient, irrelevant divergences
ATR-Normalized Strength : Divergence strength = min(|price_slope| × |osc_slope| × 10, 1.0) — quantifies the magnitude of disagreement in volatility context
Regular divergences receive 1.0× weight; hidden divergences receive 0.8× weight (slightly less reliable historically).
Oscillator Options — Five Professional Indicators
RSI (Relative Strength Index) : Classic overbought/oversold momentum indicator. Best for: General purpose divergence detection across all instruments.
Stochastic : Range-bound %K momentum comparing close to high-low range. Best for: Mean reversion strategies and range-bound markets.
CCI (Commodity Channel Index) : Measures deviation from statistical mean, auto-normalized to 0-100 scale. Best for: Cyclical instruments and commodities.
MFI (Money Flow Index) : Volume-weighted RSI incorporating money flow. Best for: Volume-driven markets like stocks and crypto.
Williams %R : Inverse stochastic looking back over period, auto-adjusted to 0-100. Best for: Reversal detection at extremes.
Each oscillator has adjustable length (2-200, default 14) and smoothing (1-20, default 1). You also set overbought (50-100, default 70) and oversold (0-50, default 30) thresholds.
Signal Timing Modes — Understanding Repainting
BZ-CAE offers two timing policies with complete transparency about repainting behavior:
Realtime (1-bar, peak-anchored)
How It Works :
Detects peaks 1 bar ago using pattern: high > high AND high > high
Signal prints on the NEXT bar after peak detection (bar_index)
Visual marker anchors to the actual PEAK bar (bar_index - 1, offset -1)
Signal locks in when bar CONFIRMS (closes)
Repainting Behavior :
On the FORMING bar (before close), the peak condition may change as new prices arrive
Once bar CLOSES (barstate.isconfirmed), signal is locked permanently
This is preview/early warning behavior by design
Best For :
Active monitoring and immediate alerts
Learning the system (seeing signals develop in real-time)
Responsive entry if you're watching the chart live
Confirmed (lookforward)
How It Works :
Uses Pine Script's built-in ta.pivothigh() and ta.pivotlow() functions
Requires full pivot validation period (lookback + lookforward bars)
Signal prints pivot_lookforward bars after the actual peak (default 5-bar delay)
Visual marker anchors to the actual peak bar (offset -pivot_lookforward)
No Repainting Behavior
Best For :
Backtesting and historical analysis
Conservative entries requiring full confirmation
Automated trading systems
Swing trading with larger timeframes
Tradeoff :
Delayed entry by pivot_lookforward bars (typically 5 bars)
On a 5-minute chart, this is a 25-minute delay
On a 4-hour chart, this is a 20-hour delay
Recommendation : Use Confirmed for backtesting to verify system performance honestly. Use Realtime for live monitoring only if you're actively watching the chart and understand pre-confirmation repainting behavior.
Signal Spacing System — Anti-Spam Architecture
Even after CAE filtering, raw divergences can cluster. The spacing system enforces separation:
Three Independent Filters
1. Min Bars Between ANY Signals (default 12):
Prevents rapid-fire clustering across both directions
If last signal (bull or bear) was within N bars, block new signal
Ensures breathing room between all setups
2. Min Bars Between SAME-SIDE Signals (default 24, optional enforcement):
Prevents bull-bull or bear-bear spam
Separate tracking for bullish and bearish signal timelines
Toggle enforcement on/off
3. Min ATR Distance From Last Signal (default 0, optional):
Requires price to move N × ATR from last signal location
Ensures meaningful price movement between setups
0 = disabled, 0.5-2.0 = typical range for enabled
All three filters work independently. A signal must pass ALL enabled filters to proceed.
Practical Guidance :
Scalping (1-5m) : Any 6-10, Same-side 12-20, ATR 0-0.5
Day Trading (15m-1H) : Any 12, Same-side 24, ATR 0-1.0
Swing Trading (4H-D) : Any 20-30, Same-side 40-60, ATR 1.0-2.0
Dashboard — Real-Time Control Center
The dashboard (toggleable, four corner positions, three sizes) provides comprehensive system intelligence:
Oscillator Section
Current oscillator type and value
State: OVERBOUGHT / OVERSOLD / NEUTRAL (color-coded)
Length parameter
Cognitive Engine Section
TCS (Trend Conviction Score) :
Current value with emoji state indicator
🔥 = Strong trend (>0.75)
📊 = Moderate trend (0.50-0.75)
〰️ = Weak/choppy (<0.50)
Color: Red if above threshold (trend filter active), yellow if moderate, green if weak
DMA (Directional Momentum Alignment) :
Current value with emoji direction indicator
🐂 = Bullish momentum (>0.5)
⚖️ = Balanced (-0.5 to 0.5)
🐻 = Bearish momentum (<-0.5)
Color: Green if bullish, red if bearish
Exhaustion :
Current value with emoji warning indicator
⚠️ = High exhaustion (>0.75)
🟡 = Moderate (0.50-0.75)
✓ = Low (<0.50)
Color: Red if high, yellow if moderate, green if low
Pullback :
Quality of current distance from EMA20
Values >0.6 are ideal entry zones (not too close, not too far)
Bull Case / Bear Case (if Adversarial enabled):
Current scores for both sides of the market debate
Differential with emoji indicator:
📈 = Bull advantage (>0.2)
➡️ = Balanced (-0.2 to 0.2)
📉 = Bear advantage (<-0.2)
Last Signal Metrics Section (New Feature)
When a signal fires, this section captures and displays:
Signal type (BULL or BEAR)
Bars elapsed since signal
Confidence % at time of signal
TCS value at signal time
DMA value at signal time
Purpose : Provides a historical reference for learning. You can see what the market state looked like when the last signal fired, helping you correlate outcomes with conditions.
Statistics Section
Total Signals : Lifetime count across session
Blocked Signals : Count and percentage (filter effectiveness metric)
Bull Signals : Total bullish divergences
Bear Signals : Total bearish divergences
Purpose : System health monitoring. If blocked % is very high (>60%), filters may be too strict. If very low (<10%), filters may be too loose.
Advisory Annotations
When CAE Mode = Advisory, this section displays warnings for signals that would be blocked in Filtering mode:
Examples:
"Bull spacing: wait 8 bars"
"Bear: strong uptrend (TCS=0.87)"
"Adversarial bearish"
"Low confidence 32%"
Multiple warnings can stack, separated by " | ". This teaches you CAE's decision logic transparently.
How to Use BZ-CAE — Complete Workflow
Phase 1: Initial Setup (First Session)
Apply BZ-CAE to your chart
Select your preferred Visual Theme (Cyberpunk recommended for visibility)
Set Signal Timing to "Confirmed (lookforward)" for learning
Choose your Oscillator Type (RSI recommended for general use, length 14)
Set Overbought/Oversold to 70/30 (standard)
Enable both Regular Divergence and Hidden Divergence
Set Pivot Lookback/Lookforward to 5/5 (balanced structure)
Enable CAE Intelligence
Set CAE Mode to "Advisory" (learning mode)
Enable all three CAE filters: Strong Trend Filter , Adversarial Validation , Confidence Gating
Enable Show Dashboard , position Top Right, size Normal
Enable Draw Bifurcation Zones and Adversarial Bar Coloring
Phase 2: Learning Period (Weeks 1-2)
Goal : Understand how CAE evaluates market state and filters signals.
Activities :
Watch the dashboard during signals :
Note TCS values when counter-trend signals fail — this teaches you the trend strength threshold for your instrument
Observe exhaustion patterns at actual turning points — learn when overextension truly matters
Study adversarial differential at signal times — see when opposing cases dominate
Review blocked signals (orange X-crosses):
In Advisory mode, you see everything — signals that would pass AND signals that would be blocked
Check the advisory annotations to understand why CAE would block
Track outcomes: Were the blocks correct? Did those signals fail?
Use Last Signal Metrics :
After each signal, check the dashboard capture of confidence, TCS, and DMA
Journal these values alongside trade outcomes
Identify patterns: Do confidence >0.70 signals work better? Does your instrument respect TCS >0.85?
Understand your instrument's "personality" :
Trending instruments (indices, major forex) may need TCS threshold 0.85-0.90
Choppy instruments (low-cap stocks, exotic pairs) may work best with TCS 0.70-0.75
High-volatility instruments (crypto) may need wider spacing
Low-volatility instruments may need tighter spacing
Phase 3: Calibration (Weeks 3-4)
Goal : Optimize settings for your specific instrument, timeframe, and style.
Calibration Checklist :
Min Confidence Threshold :
Review confidence distribution in your signal journal
Identify the confidence level below which signals consistently fail
Set min_confidence slightly above that level
Day trading : 0.35-0.45
Swing trading : 0.40-0.55
Scalping : 0.30-0.40
TCS Threshold :
Find the TCS level where counter-trend signals consistently get stopped out
Set tcs_threshold at or slightly below that level
Trending instruments : 0.85-0.90
Mixed instruments : 0.80-0.85
Choppy instruments : 0.75-0.80
Exhaustion Override Level :
Identify exhaustion readings that marked genuine reversals
Set exhaustion_required just below the average
Typical range : 0.45-0.55
Adversarial Threshold :
Default 0.10 works for most instruments
If you find CAE is too conservative (blocking good trades), raise to 0.15-0.20
If signals are still getting caught in opposing momentum, lower to 0.07-0.09
Spacing Parameters :
Count bars between quality signals in your journal
Set min bars ANY to ~60% of that average
Set min bars SAME-SIDE to ~120% of that average
Scalping : Any 6-10, Same 12-20
Day trading : Any 12, Same 24
Swing : Any 20-30, Same 40-60
Oscillator Selection :
Try different oscillators for 1-2 weeks each
Track win rate and average winner/loser by oscillator type
RSI : Best for general use, clear OB/OS
Stochastic : Best for range-bound, mean reversion
MFI : Best for volume-driven markets
CCI : Best for cyclical instruments
Williams %R : Best for reversal detection
Phase 4: Live Deployment
Goal : Disciplined execution with proven, calibrated system.
Settings Changes :
Switch CAE Mode from Advisory to Filtering
System now actively blocks low-quality signals
Only setups passing all gates reach your chart
Keep Signal Timing on Confirmed for conservative entries
OR switch to Realtime if you're actively monitoring and want faster entries (accept pre-confirmation repaint risk)
Use your calibrated thresholds from Phase 3
Enable high-confidence alerts: "⭐ High Confidence Bullish/Bearish" (>0.70)
Trading Discipline Rules :
Respect Blocked Signals :
If CAE blocks a trade you wanted to take, TRUST THE SYSTEM
Don't manually override — if you consistently disagree, return to Phase 2/3 calibration
The block exists because market state failed intelligence checks
Confidence-Based Position Sizing :
Confidence >0.70: Standard or increased size (e.g., 1.5-2.0% risk)
Confidence 0.50-0.70: Standard size (e.g., 1.0% risk)
Confidence 0.35-0.50: Reduced size (e.g., 0.5% risk) or skip if conservative
TCS-Based Management :
High TCS + counter-trend signal: Use tight stops, quick exits (you're fading momentum)
Low TCS + reversal signal: Use wider stops, trail aggressively (genuine reversal potential)
Exhaustion Awareness :
Exhaustion >0.75 (yellow shading): Market is overextended, reversal risk is elevated — consider early exit or tighter trailing stops even on winning trades
Exhaustion <0.30: Continuation bias — hold for larger move, wide trailing stops
Adversarial Context :
Strong differential against you (e.g., bullish signal with bear diff <-0.2): Use very tight stops, consider skipping
Strong differential with you (e.g., bullish signal with bull diff >0.2): Trail aggressively, this is your tailwind
Practical Settings by Timeframe & Style
Scalping (1-5 Minute Charts)
Objective : High frequency, tight stops, quick reversals in fast-moving markets.
Oscillator :
Type: RSI or Stochastic (fast response to quick moves)
Length: 9-11 (more responsive than standard 14)
Smoothing: 1 (no lag)
OB/OS: 65/35 (looser thresholds ensure frequent crossings in fast conditions)
Divergence :
Pivot Lookback/Lookforward: 3/3 (tight structure, catch small swings)
Max Lookback: 40-50 bars (recent structure only)
Min Slope Change: 0.8-1.0 (don't be overly strict)
CAE :
Mode: Advisory first (learn), then Filtering
Min Confidence: 0.30-0.35 (lower bar for speed, accept more signals)
TCS Threshold: 0.70-0.75 (allow more counter-trend opportunities)
Exhaustion Required: 0.45-0.50 (moderate override)
Strong Trend Filter: ON (still respect major intraday trends)
Adversarial: ON (critical for scalping protection — catches bad entries quickly)
Spacing :
Min Bars ANY: 6-10 (fast pace, many setups)
Min Bars SAME-SIDE: 12-20 (prevent clustering)
Min ATR Distance: 0 or 0.5 (loose)
Timing : Realtime (speed over precision, but understand repaint risk)
Visuals :
Signal Size: Tiny (chart clarity in busy conditions)
Show Zones: Optional (can clutter on low timeframes)
Bar Coloring: ON (helps read momentum shifts quickly)
Dashboard: Small size (corner reference, not main focus)
Key Consideration : Scalping generates noise. Even with CAE, expect lower win rate (45-55%) but aim for favorable R:R (2:1 or better). Size conservatively.
Day Trading (15-Minute to 1-Hour Charts)
Objective : Balance quality and frequency. Standard divergence trading approach.
Oscillator :
Type: RSI or MFI (proven reliability, volume confirmation with MFI)
Length: 14 (industry standard, well-studied)
Smoothing: 1-2
OB/OS: 70/30 (classic levels)
Divergence :
Pivot Lookback/Lookforward: 5/5 (balanced structure)
Max Lookback: 60 bars
Min Slope Change: 1.0 (standard strictness)
CAE :
Mode: Filtering (enforce discipline from the start after brief Advisory learning)
Min Confidence: 0.35-0.45 (quality filter without being too restrictive)
TCS Threshold: 0.80-0.85 (respect strong trends)
Exhaustion Required: 0.50 (balanced override threshold)
Strong Trend Filter: ON
Adversarial: ON
Confidence Gating: ON (all three filters active)
Spacing :
Min Bars ANY: 12 (breathing room between all setups)
Min Bars SAME-SIDE: 24 (prevent bull/bear clusters)
Min ATR Distance: 0-1.0 (optional refinement, typically 0.5-1.0)
Timing : Confirmed (1-bar delay for reliability, no repainting)
Visuals :
Signal Size: Tiny or Small
Show Zones: ON (useful reference for exits/re-entries)
Bar Coloring: ON (context awareness)
Dashboard: Normal size (full visibility)
Key Consideration : This is the "sweet spot" timeframe for BZ-CAE. Market structure is clear, CAE has sufficient data, and signal frequency is manageable. Expect 55-65% win rate with proper execution.
Swing Trading (4-Hour to Daily Charts)
Objective : Quality over quantity. High conviction only. Larger stops and targets.
Oscillator :
Type: RSI or CCI (robust on higher timeframes, smooth longer waves)
Length: 14-21 (capture larger momentum swings)
Smoothing: 1-3
OB/OS: 70/30 or 75/25 (strict extremes)
Divergence :
Pivot Lookback/Lookforward: 5/5 or 7/7 (structural purity, major swings only)
Max Lookback: 80-100 bars (broader historical context)
Min Slope Change: 1.2-1.5 (require strong, undeniable divergence)
CAE :
Mode: Filtering (strict enforcement, premium setups only)
Min Confidence: 0.40-0.55 (high bar for entry)
TCS Threshold: 0.85-0.95 (very strong trend protection — don't fade established HTF trends)
Exhaustion Required: 0.50-0.60 (higher bar for override — only extreme exhaustion justifies counter-trend)
Strong Trend Filter: ON (critical on HTF)
Adversarial: ON (avoid obvious bad trades)
Confidence Gating: ON (quality gate essential)
Spacing :
Min Bars ANY: 20-30 (substantial separation)
Min Bars SAME-SIDE: 40-60 (significant breathing room)
Min ATR Distance: 1.0-2.0 (require meaningful price movement)
Timing : Confirmed (purity over speed, zero repaint for swing accuracy)
Visuals :
Signal Size: Small or Normal (clear markers on zoomed-out view)
Show Zones: ON (important HTF levels)
Bar Coloring: ON (long-term trend awareness)
Dashboard: Normal or Large (comprehensive analysis)
Key Consideration : Swing signals are rare but powerful. Expect 2-5 signals per month per instrument. Win rate should be 60-70%+ due to stringent filtering. Position size can be larger given confidence.
Dashboard Interpretation Reference
TCS (Trend Conviction Score) States
0.00-0.50: Weak/Choppy
Emoji: 〰️
Color: Green/cyan
Meaning: No established trend. Range-bound or consolidating. Both reversal and continuation signals viable.
Action: Reversals (regular divs) are safer. Use wider profit targets (market has room to move). Consider mean reversion strategies.
0.50-0.75: Moderate Trend
Emoji: 📊
Color: Yellow/neutral
Meaning: Developing trend but not locked in. Context matters significantly.
Action: Check DMA and exhaustion. If DMA confirms trend and exhaustion is low, favor continuation (hidden divs). If exhaustion is high, reversals are viable.
0.75-0.85: Strong Trend
Emoji: 🔥
Color: Orange/warning
Meaning: Well-established trend with persistence. Counter-trend is high risk.
Action: Require exhaustion >0.50 for counter-trend entries. Favor continuation signals. Use tight stops on counter-trend attempts.
0.85-1.00: Very Strong Trend
Emoji: 🔥🔥
Color: Red/danger (if counter-trading)
Meaning: Locked-in institutional trend. Extremely high risk to fade.
Action: Avoid counter-trend unless exhaustion >0.75 (yellow shading). Focus exclusively on continuation opportunities. Momentum is king here.
DMA (Directional Momentum Alignment) Zones
-2.0 to -1.0: Strong Bearish Momentum
Emoji: 🐻🐻
Color: Dark red
Meaning: Powerful downside force. Sellers are in control.
Action: Bullish divergences are counter-momentum (high risk). Bearish divergences are with-momentum (lower risk). Size down on longs.
-0.5 to 0.5: Neutral/Balanced
Emoji: ⚖️
Color: Gray/neutral
Meaning: No strong directional bias. Choppy or consolidating.
Action: Both directions have similar probability. Focus on confidence score and adversarial differential for edge.
1.0 to 2.0: Strong Bullish Momentum
Emoji: 🐂🐂
Color: Bright green/cyan
Meaning: Powerful upside force. Buyers are in control.
Action: Bearish divergences are counter-momentum (high risk). Bullish divergences are with-momentum (lower risk). Size down on shorts.
Exhaustion States
0.00-0.50: Fresh Move
Emoji: ✓
Color: Green
Meaning: Trend is healthy, not overextended. Room to run.
Action: Counter-trend trades are premature. Favor continuation. Hold winners for larger moves. Avoid early exits.
0.50-0.75: Mature Move
Emoji: 🟡
Color: Yellow
Meaning: Move is aging. Watch for signs of climax.
Action: Tighten trailing stops on winning trades. Be ready for reversals. Don't add to positions aggressively.
0.75-0.85: High Exhaustion
Emoji: ⚠️
Color: Orange
Background: Yellow shading appears
Meaning: Move is overextended. Reversal risk elevated significantly.
Action: Counter-trend reversals are higher probability. Consider early exits on with-trend positions. Size up on reversal divergences (if CAE allows).
0.85-1.00: Critical Exhaustion
Emoji: ⚠️⚠️
Color: Red
Background: Yellow shading intensifies
Meaning: Climax conditions. Reversal imminent or underway.
Action: Aggressive reversal trades justified. Exit all with-trend positions. This is where major turns occur.
Confidence Score Tiers
0.00-0.30: Low Quality
Color: Red
Status: Blocked in Filtering mode
Action: Skip entirely. Setup lacks fundamental quality across multiple factors.
0.30-0.50: Moderate Quality
Color: Yellow/orange
Status: Marginal — passes in Filtering only if >min_confidence
Action: Reduced position size (0.5-0.75% risk). Tight stops. Conservative profit targets. Skip if you're selective.
0.50-0.70: High Quality
Color: Green/cyan
Status: Good setup across most quality factors
Action: Standard position size (1.0-1.5% risk). Normal stops and targets. This is your bread-and-butter trade.
0.70-1.00: Premium Quality
Color: Bright green/gold
Status: Exceptional setup — all factors aligned
Visual: Double confidence ring appears
Action: Consider increased position size (1.5-2.0% risk, maximum). Wider stops. Larger targets. High probability of success. These are rare — capitalize when they appear.
Adversarial Differential Interpretation
Bull Differential > 0.3 :
Visual: Strong cyan/green bar colors
Meaning: Bull case strongly dominates. Buyers have clear advantage.
Action: Bullish divergences favored (with-advantage). Bearish divergences face headwind (reduce size or skip). Momentum is bullish.
Bull Differential 0.1 to 0.3 :
Visual: Moderate cyan/green transparency
Meaning: Moderate bull advantage. Buyers have edge but not overwhelming.
Action: Both directions viable. Slight bias toward longs.
Differential -0.1 to 0.1 :
Visual: Gray/neutral bars
Meaning: Balanced debate. No clear advantage either side.
Action: Rely on other factors (confidence, TCS, exhaustion) for direction. Adversarial is neutral.
Bear Differential -0.3 to -0.1 :
Visual: Moderate red/magenta transparency
Meaning: Moderate bear advantage. Sellers have edge but not overwhelming.
Action: Both directions viable. Slight bias toward shorts.
Bear Differential < -0.3 :
Visual: Strong red/magenta bar colors
Meaning: Bear case strongly dominates. Sellers have clear advantage.
Action: Bearish divergences favored (with-advantage). Bullish divergences face headwind (reduce size or skip). Momentum is bearish.
Last Signal Metrics — Post-Trade Analysis
After a signal fires, dashboard captures:
Type : BULL or BEAR
Bars Ago : How long since signal (updates every bar)
Confidence : What was the quality score at signal time
TCS : What was trend conviction at signal time
DMA : What was momentum alignment at signal time
Use Case : Post-trade journaling and learning.
Example: "BULL signal 12 bars ago. Confidence: 68%, TCS: 0.42, DMA: -0.85"
Analysis : This was a bullish reversal (regular div) with good confidence, weak trend (TCS), but strong bearish momentum (DMA). The bet was that momentum would reverse — a counter-momentum play requiring exhaustion confirmation. Check if exhaustion was high at that time to justify the entry.
Track patterns:
Do your best trades have confidence >0.65?
Do low-TCS signals (<0.50) work better for you?
Are you more successful with-momentum (DMA aligned with signal) or counter-momentum?
Troubleshooting Guide
Problem: No Signals Appearing
Symptoms : Chart loads, dashboard shows metrics, but no divergence signals fire.
Diagnosis Checklist :
Check dashboard oscillator value : Is it crossing OB/OS levels (70/30)? If oscillator stays in 40-60 range constantly, it can't reach extremes needed for divergence detection.
Are pivots forming? : Look for local swing highs/lows on your chart. If price is in tight consolidation, pivots may not meet lookback/lookforward requirements.
Is spacing too tight? : Check "Last Signal" metrics — how many bars since last signal? If <12 and your min_bars_ANY is 12, spacing filter is blocking.
Is CAE blocking everything? : Check dashboard Statistics section — what's the blocked signal count? High blocks indicate overly strict filters.
Solutions :
Loosen OB/OS Temporarily :
Try 65/35 to verify divergence detection works
If signals appear, the issue was threshold strictness
Gradually tighten back to 67/33, then 70/30 as appropriate
Lower Min Confidence :
Try 0.25-0.30 (diagnostic level)
If signals appear, filter was too strict
Raise gradually to find sweet spot (0.35-0.45 typical)
Disable Strong Trend Filter Temporarily :
Turn off in CAE settings
If signals appear, TCS threshold was blocking everything
Re-enable and lower TCS_threshold to 0.70-0.75
Reduce Min Slope Change :
Try 0.7-0.8 (from default 1.0)
Allows weaker divergences through
Helpful on low-volatility instruments
Widen Spacing :
Set min_bars_ANY to 6-8
Set min_bars_SAME_SIDE to 12-16
Reduces time between allowed signals
Check Timing Mode :
If using Confirmed, remember there's a pivot_lookforward delay (5+ bars)
Switch to Realtime temporarily to verify system is working
Realtime has no delay but repaints
Verify Oscillator Settings :
Length 14 is standard but might not fit all instruments
Try length 9-11 for faster response
Try length 18-21 for slower, smoother response
Problem: Too Many Signals (Signal Spam)
Symptoms : Dashboard shows 50+ signals in Statistics, confidence scores mostly <0.40, signals clustering close together.
Solutions :
Raise Min Confidence :
Try 0.40-0.50 (quality filter)
Blocks bottom-tier setups
Targets top 50-60% of divergences only
Tighten OB/OS :
Use 70/30 or 75/25
Requires more extreme oscillator readings
Reduces false divergences in mid-range
Increase Min Slope Change :
Try 1.2-1.5 (from default 1.0)
Requires stronger, more obvious divergences
Filters marginal slope disagreements
Raise TCS Threshold :
Try 0.85-0.90 (from default 0.80)
Stricter trend filter blocks more counter-trend attempts
Favors only strongest trend alignment
Enable ALL CAE Gates :
Turn on Trend Filter + Adversarial + Confidence
Triple-layer protection
Blocks aggressively — expect 20-40% reduction in signals
Widen Spacing :
min_bars_ANY: 15-20 (from 12)
min_bars_SAME_SIDE: 30-40 (from 24)
Creates substantial breathing room
Switch to Confirmed Timing :
Removes realtime preview noise
Ensures full pivot validation
5-bar delay filters many false starts
Problem: Signals in Strong Trends Get Stopped Out
Symptoms : You take a bullish divergence in a downtrend (or bearish in uptrend), and it immediately fails. Dashboard showed high TCS at the time.
Analysis : This is INTENDED behavior — CAE is protecting you from low-probability counter-trend trades.
Understanding :
Check Last Signal Metrics in dashboard — what was TCS when signal fired?
If TCS was >0.85 and signal was counter-trend, CAE correctly identified it as high risk
Strong trends rarely reverse cleanly without major exhaustion
Your losses here are the system working as designed (blocking bad odds)
If You Want to Override (Not Recommended) :
Lower TCS_threshold to 0.70-0.75 (allows more counter-trend)
Lower exhaustion_required to 0.40 (easier override)
Disable Strong Trend Filter entirely (very risky)
Better Approach :
TRUST THE FILTER — it's preventing costly mistakes
Wait for exhaustion >0.75 (yellow shading) before counter-trending strong TCS
Focus on continuation signals (hidden divs) in high-TCS environments
Use Advisory mode to see what CAE is blocking and learn from outcomes
Problem: Adversarial Blocking Seems Wrong
Symptoms : You see a divergence that "looks good" visually, but CAE blocks with "Adversarial bearish/bullish" warning.
Diagnosis :
Check dashboard Bull Case and Bear Case scores at that moment
Look at Differential value
Check adversarial bar colors — was there strong coloring against your intended direction?
Understanding :
Adversarial catches "obvious" opposing momentum that's easy to miss
Example: Bullish divergence at a local low, BUT price is deeply below EMA50, bearish momentum is strong, and RSI shows knife-catching conditions
Bull Case might be 0.20 while Bear Case is 0.55
Differential = -0.35, far beyond threshold
Block is CORRECT — you'd be fighting overwhelming opposing flow
If You Disagree Consistently
Review blocked signals on chart — scroll back and check outcomes
Did those blocked signals actually work, or did they fail as adversarial predicted?
Raise adv_threshold to 0.15-0.20 (more permissive, allows closer battles)
Disable Adversarial Validation temporarily (diagnostic) to isolate its effect
Use Advisory mode to learn adversarial patterns over 50-100 signals
Remember : Adversarial is conservative BY DESIGN. It prevents "obvious" bad trades where you're fighting strong strength the other way.
Problem: Dashboard Not Showing or Incomplete
Solutions :
Toggle "Show Dashboard" to ON in settings
Try different dashboard sizes (Small/Normal/Large)
Try different positions (Top Left/Right, Bottom Left/Right) — might be off-screen
Some sections require CAE Enable = ON (Cognitive Engine section won't appear if CAE is disabled)
Statistics section requires at least 1 lifetime signal to populate
Check that visual theme is set (dashboard colors adapt to theme)
Problem: Performance Lag, Chart Freezing
Symptoms : Chart loading is slow, indicator calculations cause delays, pinch-to-zoom lags.
Diagnosis : Visual features are computationally expensive, especially adversarial bar coloring (recalculates every bar).
Solutions (In Order of Impact) :
Disable Adversarial Bar Coloring (MOST EXPENSIVE):
Turn OFF "Adversarial Bar Coloring" in settings
This is the single biggest performance drain
Immediate improvement
Reduce Vertical Lines :
Lower "Keep last N vertical lines" to 20-30
Or set to 0 to disable entirely
Moderate improvement
Disable Bifurcation Zones :
Turn OFF "Draw Bifurcation Zones"
Reduces box drawing calculations
Moderate improvement
Set Dashboard Size to Small :
Smaller dashboard = fewer cells = less rendering
Minor improvement
Use Shorter Max Lookback :
Reduce max_lookback to 40-50 (from 60+)
Fewer bars to scan for divergences
Minor improvement
Disable Exhaustion Shading :
Turn OFF "Show Market State"
Removes background coloring calculations
Minor improvement
Extreme Performance Mode :
Disable ALL visual enhancements
Keep only triangle markers
Dashboard Small or OFF
Use Minimal theme if available
Problem: Realtime Signals Repainting
Symptoms : You see a signal appear, but on next bar it disappears or moves.
Explanation :
Realtime mode detects peaks 1 bar ago: high > high AND high > high
On the FORMING bar (before close), this condition can change as new prices arrive
Example: At 10:05, high (10:04 bar) was 100, current high is 99 → peak detected
At 10:05:30, new high of 101 arrives → peak condition breaks → signal disappears
At 10:06 (bar close), final high is 101 → no peak at 10:04 anymore → signal gone permanently
This is expected behavior for realtime responsiveness. You get preview/early warning, but it's not locked until bar confirms.
Solutions :
Use Confirmed Timing :
Switch to "Confirmed (lookforward)" mode
ZERO repainting — pivot must be fully validated
5-bar delay (pivot_lookforward)
What you see in history is exactly what would have appeared live
Accept Realtime Repaint as Tradeoff :
Keep Realtime mode for speed and alerts
Understand that pre-confirmation signals may vanish
Only trade signals that CONFIRM at bar close (check barstate.isconfirmed)
Use for live monitoring, NOT for backtesting
Trade Only After Confirmation :
In Realtime mode, wait 1 full bar after signal appears before entering
If signal survives that bar close, it's locked
This adds 1-bar delay but removes repaint risk
Recommendation : Use Confirmed for backtesting and conservative trading. Use Realtime only for active monitoring with full understanding of preview behavior.
Risk Management Integration
BZ-CAE is a signal generation system, not a complete trading strategy. You must integrate proper risk management:
Position Sizing by Confidence
Confidence 0.70-1.00 (Premium) :
Risk: 1.5-2.0% of account (MAXIMUM)
Reasoning: High-quality setup across all factors
Still cap at 2% — even premium setups can fail
Confidence 0.50-0.70 (High Quality) :
Risk: 1.0-1.5% of account
Reasoning: Standard good setup
Your bread-and-butter risk level
Confidence 0.35-0.50 (Moderate Quality) :
Risk: 0.5-1.0% of account
Reasoning: Marginal setup, passes minimum threshold
Reduce size or skip if you're selective
Confidence <0.35 (Low Quality) :
Risk: 0% (blocked in Filtering mode)
Reasoning: Insufficient quality factors
System protects you by not showing these
Stop Placement Strategies
For Reversal Signals (Regular Divergences) :
Place stop beyond the divergence pivot plus buffer
Bullish : Stop below the divergence low - 1.0-1.5 × ATR
Bearish : Stop above the divergence high + 1.0-1.5 × ATR
Reasoning: If price breaks the pivot, divergence structure is invalidated
For Continuation Signals (Hidden Divergences) :
Place stop beyond recent swing in opposite direction
Bullish continuation : Stop below recent swing low (not the divergence pivot itself)
Bearish continuation : Stop above recent swing high
Reasoning: You're trading with trend, allow more breathing room
ATR-Based Stops :
1.5-2.0 × ATR is standard
Scale by timeframe:
Scalping (1-5m): 1.0-1.5 × ATR (tight)
Day trading (15m-1H): 1.5-2.0 × ATR (balanced)
Swing (4H-D): 2.0-3.0 × ATR (wide)
Never Use Fixed Dollar/Pip Stops :
Markets have different volatility
50-pip stop on EUR/USD ≠ 50-pip stop on GBP/JPY
Always normalize by ATR or pivot structure
Profit Targets and Scaling
Primary Target :
2-3 × ATR from entry (minimum 2:1 reward-risk)
Example : Entry at 100, ATR = 2, stop at 97 (1.5 × ATR) → target at 106 (3 × ATR) = 2:1 R:R
Scaling Out Strategy :
Take 50% off at 1.5 × ATR (secure partial profit)
Move stop to breakeven
Trail remaining 50% with 1.0 × ATR trailing stop
Let winners run if trend persists
Targets by Confidence :
High Confidence (>0.70) : Aggressive targets (3-4 × ATR), trail wider (1.5 × ATR)
Standard Confidence (0.50-0.70) : Normal targets (2-3 × ATR), standard trail (1.0 × ATR)
Low Confidence (0.35-0.50) : Conservative targets (1.5-2 × ATR), tight trail (0.75 × ATR)
Use Bifurcation Zones :
If opposite-side zone is visible on chart (from previous signal), use it as target
Example : Bullish signal at 100, prior supply zone at 110 → use 110 as target
Zones mark institutional resistance/support
Exhaustion-Based Exits :
If you're in a trade and exhaustion >0.75 develops (yellow shading), consider early exit
Market is overextended — reversal risk is high
Take profit even if target not reached
Trade Management by TCS
High TCS + Counter-Trend Trade (Risky) :
Use very tight stops (1.0-1.5 × ATR)
Conservative targets (1.5-2 × ATR)
Quick exit if trade doesn't work immediately
You're fading momentum — respect it
Low TCS + Reversal Trade (Safer) :
Use wider stops (2.0-2.5 × ATR)
Aggressive targets (3-4 × ATR)
Trail with patience
Genuine reversal potential in weak trend
High TCS + Continuation Trade (Safest) :
Standard stops (1.5-2.0 × ATR)
Very aggressive targets (4-5 × ATR)
Trail wide (1.5-2.0 × ATR)
You're with institutional momentum — let it run
Educational Value — Learning Machine Intelligence
BZ-CAE is designed as a learning platform, not just a tool:
Advisory Mode as Teacher
Most indicators are binary: signal or no signal. You don't learn WHY certain setups are better.
BZ-CAE's Advisory mode shows you EVERY potential divergence, then annotates the ones that would be blocked in Filtering mode with specific reasons:
"Bull: strong downtrend (TCS=0.87)" teaches you that TCS >0.85 makes counter-trend very risky
"Adversarial bearish" teaches you that the opposing case was dominating
"Low confidence 32%" teaches you that the setup lacked quality across multiple factors
"Bull spacing: wait 8 bars" teaches you that signals need breathing room
After 50-100 signals in Advisory mode, you internalize the CAE's decision logic. You start seeing these factors yourself BEFORE the indicator does.
Dashboard Transparency
Most "intelligent" indicators are black boxes — you don't know how they make decisions.
BZ-CAE shows you ALL metrics in real-time:
TCS tells you trend strength
DMA tells you momentum alignment
Exhaustion tells you overextension
Adversarial shows both sides of the debate
Confidence shows composite quality
You learn to interpret market state holistically, a skill applicable to ANY trading system beyond this indicator.
Divergence Quality Education
Not all divergences are equal. BZ-CAE teaches you which conditions produce high-probability setups:
Quality divergence : Regular bullish div at a low, TCS <0.50 (weak trend), exhaustion >0.75 (overextended), positive adversarial differential, confidence >0.70
Low-quality divergence : Regular bearish div at a high, TCS >0.85 (strong uptrend), exhaustion <0.30 (not overextended), negative adversarial differential, confidence <0.40
After using the system, you can evaluate divergences manually with similar intelligence.
Risk Management Discipline
Confidence-based position sizing teaches you to adjust risk based on setup quality, not emotions:
Beginners often size all trades identically
Or worse, size UP on marginal setups to "make up" for losses
BZ-CAE forces systematic sizing: premium setups get larger size, marginal setups get smaller size
This creates a probabilistic approach where your edge compounds over time.
What This Indicator Is NOT
Complete transparency about limitations and positioning:
Not a Prediction System
BZ-CAE does not predict future prices. It identifies structural divergences (price-momentum disagreements) and assesses current market state (trend, exhaustion, adversarial conditions). It tells you WHEN conditions favor a potential reversal or continuation, not WHAT WILL HAPPEN.
Markets are probabilistic. Even premium-confidence setups fail ~30-40% of the time. The system improves your probability distribution over many trades — it doesn't eliminate risk.
Not Fully Automated
This is a decision support tool, not a trading robot. You must:
Execute trades manually based on signals
Manage positions (stops, targets, trailing)
Apply discretionary judgment (news events, liquidity, context)
Integrate with your broader strategy and risk rules
The confidence scores guide position sizing, but YOU determine final risk allocation based on your account size, risk tolerance, and portfolio context.
Not Beginner-Friendly
BZ-CAE requires understanding of:
Divergence trading concepts (regular vs hidden, reversal vs continuation)
Market state interpretation (trend vs range, momentum, exhaustion)
Basic technical analysis (pivots, support/resistance, EMAs)
Risk management fundamentals (position sizing, stops, R:R)
This is designed for intermediate to advanced traders willing to invest time learning the system. If you want "buy the arrow" simplicity, this isn't the tool.
Not a Holy Grail
There is no perfect indicator. BZ-CAE filters noise and improves signal quality significantly, but:
Losing trades are inevitable (even at 70% win rate, 30% still fail)
Market conditions change rapidly (yesterday's strong trend becomes today's chop)
Black swan events occur (fundamentals override technicals)
Execution matters (slippage, fees, emotional discipline)
The system provides an EDGE, not a guarantee. Your job is to execute that edge consistently with proper risk management over hundreds of trades.
Not Financial Advice
BZ-CAE is an educational and analytical tool. All trading decisions are your responsibility. Past performance (backtested or live) does not guarantee future results. Only risk capital you can afford to lose. Consult a licensed financial advisor for investment advice specific to your situation.
Ideal Market Conditions
Best Performance Characteristics
Liquid Instruments :
Major forex pairs (EUR/USD, GBP/USD, USD/JPY)
Large-cap stocks and index ETFs (SPY, QQQ, AAPL, MSFT)
High-volume crypto (BTC, ETH)
Major commodities (Gold, Oil, Natural Gas)
Reasoning: Clean price structure, clear pivots, meaningful oscillator behavior
Trending with Consolidations :
Markets that trend for 20-40 bars, then consolidate 10-20 bars, repeat
Creates divergences at consolidation boundaries (reversals) and within trends (continuations)
Both regular and hidden divs find opportunities
5-Minute to Daily Timeframes :
Below 5m: too much noise, false pivots, CAE metrics unstable
Above daily: too few signals, edge diminishes (fundamentals dominate)
Sweet spot: 15m to 4H for most traders
Consistent Volume and Participation :
Regular trading sessions (not holidays or thin markets)
Predictable volatility patterns
Avoid instruments with sudden gaps or circuit breakers
Challenging Conditions
Extremely Low Liquidity :
Penny stocks, exotic forex pairs, low-volume crypto
Erratic pivots, unreliable oscillator readings
CAE metrics can't assess market state properly
Very Low Timeframes (1-Minute or Below) :
Dominated by market microstructure noise
Divergences are everywhere but meaningless
CAE filtering helps but still unreliable
Extended Sideways Consolidation :
100+ bars of tight range with no clear pivots
Oscillator hugs midpoint (45-55 range)
No divergences to detect
Fundamentally-Driven Gap Markets :
Earnings releases, economic data, geopolitical events
Price gaps over stops and targets
Technical structure breaks down
Recommendation: Disable trading around known events
Calculation Methodology — Technical Depth
For users who want to understand the math:
Oscillator Computation
Each oscillator type calculates differently, but all normalize to 0-100:
RSI : ta.rsi(close, length) — Standard Relative Strength Index
Stochastic : ta.stoch(high, low, close, length) — %K calculation
CCI : (ta.cci(hlc3, length) + 100) / 2 — Normalized from -100/+100 to 0-100
MFI : ta.mfi(hlc3, length) — Volume-weighted RSI equivalent
Williams %R : ta.wpr(length) + 100 — Inverted stochastic adjusted to 0-100
Smoothing: If smoothing > 1, apply ta.sma(oscillator, smoothing)
Divergence Detection Algorithm
Identify Pivots :
Price high pivot: ta.pivothigh(high, lookback, lookforward)
Price low pivot: ta.pivotlow(low, lookback, lookforward)
Oscillator high pivot: ta.pivothigh(osc, lookback, lookforward)
Oscillator low pivot: ta.pivotlow(osc, lookback, lookforward)
Store Recent Pivots :
Maintain arrays of last 10 pivots with bar indices
When new pivot confirmed, unshift to array, pop oldest if >10
Scan for Slope Disagreements :
Loop through last 5 pivots
For each pair (current pivot, historical pivot):
Check if within max_lookback bars
Calculate slopes: (current - historical) / bars_between
Regular bearish: price_slope > 0, osc_slope < 0, |osc_slope| > min_threshold
Regular bullish: price_slope < 0, osc_slope > 0, |osc_slope| > min_threshold
Hidden bearish: price_slope < 0, osc_slope > 0, osc_slope > min_threshold
Hidden bullish: price_slope > 0, osc_slope < 0, |osc_slope| > min_threshold
Important Disclaimers and Terms
Performance Disclosure
Past performance, whether backtested or live-traded, does not guarantee future results. Markets change. What works today may not work tomorrow. Hypothetical or simulated performance results have inherent limitations and do not represent actual trading.
Risk of Loss
Trading involves substantial risk of loss. Only trade with risk capital you can afford to lose entirely. The high degree of leverage often available in trading can work against you as well as for you. Leveraged trading may result in losses exceeding your initial deposit.
Not Financial Advice
BZ-CAE is an educational and analytical tool for technical analysis. It is not financial advice, investment advice, or a recommendation to buy or sell any security or instrument. All trading decisions are your sole responsibility. Consult a licensed financial advisor for advice specific to your circumstances.
Technical Indicator Limitations
BZ-CAE is a technical analysis tool based on price and volume data. It does not account for:
Fundamental analysis (earnings, economic data, financial health)
Market sentiment and positioning
Geopolitical events and news
Liquidity conditions and market microstructure changes
Regulatory changes or exchange rules
Integrate with broader analysis and strategy. Do not rely solely on technical indicators for trading decisions.
Repainting Acknowledgment
As disclosed throughout this documentation:
Realtime mode may repaint on forming bars before confirmation (by design for preview functionality)
Confirmed mode has zero repainting (fully validated pivots only)
Choose timing mode appropriate for your use case. Understand the tradeoffs.
Testing Recommendation
ALWAYS test on demo/paper accounts before committing real capital. Validate the indicator's behavior on your specific instruments and timeframes. Learn the system thoroughly in Advisory mode before using Filtering mode.
Learning Resources :
In-indicator tooltips (hover over setting names for detailed explanations)
This comprehensive publishing statement (save for reference)
User guide in script comments (top of code)
Final Word — Philosophy of BZ-CAE
BZ-CAE is not designed to replace your judgment — it's designed to enhance it.
The indicator identifies structural inflection points (bifurcations) where price and momentum disagree. The Cognitive Engine evaluates market state to determine if this disagreement is meaningful or noise. The Adversarial model debates both sides of the trade to catch obvious bad setups. The Confidence system ranks quality so you can choose your risk appetite.
But YOU still execute. YOU still manage risk. YOU still learn from outcomes.
This is intelligence amplification, not intelligence replacement.
Use Advisory mode to learn how expert traders evaluate market state. Use Filtering mode to enforce discipline when emotions run high. Use the dashboard to develop a systematic approach to reading markets. Use confidence scores to size positions probabilistically.
The system provides an edge. Your job is to execute that edge with discipline, patience, and proper risk management over hundreds of trades.
Markets are probabilistic. No system wins every trade. But a systematic edge + disciplined execution + proper risk management compounds over time. That's the path to consistent profitability. BZ-CAE gives you the edge. The discipline and risk management are on you.
Taking you to school. — Dskyz, Trade with insight. Trade with anticipation.
Hash Momentum IndicatorHash Momentum Indicator
Overview
The Hash Momentum Indicator provides real-time momentum-based trading signals with visual entry/exit markers and automatic risk management levels. This is the indicator version of the popular Hash Momentum Strategy, designed for traders who want signal alerts without backtesting functionality.
Perfect for: Live trading, automation via alerts, multi-indicator setups, and clean chart visualization.
What Makes This Indicator Special
1. Pure Momentum-Based Signals
Captures price acceleration in real-time - not lagging moving average crossovers. Enters when momentum exceeds a dynamic ATR-based threshold, catching moves as they begin accelerating.
2. Automatic Risk Management Visualization
Every signal automatically displays:
Entry level (white dashed line)
Stop loss level (red line)
Take profit target (green line)
Partial TP levels (dotted green lines)
3. Smart Trade Management
Trade Cooldown: Prevents overtrading by enforcing waiting period between signals
EMA Trend Filter: Only trades with the trend (optional)
Session Filters: Trade only during Tokyo/London/New York sessions (optional)
Weekend Toggle: Avoid low-liquidity weekend periods (optional)
4. Clean Visual Design
🟢 Tiny green dot = Long entry signal
🔴 Tiny red dot = Short entry signal
🔵 Blue X = Long exit
🟠 Orange X = Short exit
No cluttered labels or dashboard - just clean signals
5. Professional Alerts Ready
Set up TradingView alerts for:
Long signals
Short signals
Long exits
Short exits
How It Works
Step 1: Calculate Momentum
Momentum = Current Price - Price
Normalized by standard deviation for consistency
Must exceed ATR × Threshold to trigger
Step 2: Confirm Acceleration
Momentum must be increasing (positive momentum change)
Price must be moving in signal direction
Step 3: Apply Filters
EMA Filter: Long only above EMA, short only below EMA (if enabled)
Session Filter: Check if in allowed trading session (if enabled)
Weekend Filter: Block signals on Sat/Sun (if enabled)
Cooldown: Ensure minimum bars passed since last signal
Step 4: Generate Signal
All conditions met = Entry signal fires
Lines automatically drawn for entry, stop, and targets
Step 5: Exit Detection
Opposite momentum detected = Exit signal
Stop loss or take profit hit = Exit signal
Lines removed from chart
⚙️ Settings Guide
Core Strategy
Momentum Length (Default: 13)
Number of bars for momentum calculation. Higher values = stronger signals but fewer trades.
Aggressive: 10
Balanced: 13
Conservative: 18-24
Momentum Threshold (Default: 2.25)
ATR multiplier for signal generation. Higher values = only trade the biggest momentum moves.
Aggressive: 2.0
Balanced: 2.25
Conservative: 2.5-3.0
Risk:Reward Ratio (Default: 2.5)
Your target profit as a multiple of your risk. With 2.2% stop and 2.5 R:R, your target is 5.5% profit.
Conservative: 3.0+ (need 25% win rate to profit)
Balanced: 2.5 (need 29% win rate to profit)
Aggressive: 2.0 (need 33% win rate to profit)
Time-Decay Liquidity Zones [BackQuant]Time-Decay Liquidity Zones
A dynamic liquidity map that turns single-bar exhaustion events into fading, color-graded zones, so you can see where trapped traders and unfinished business still matter, and when those areas have finally stopped pulling price.
What this is
This indicator detects unusually strong impulsive moves into wicks, converts them into supply or demand “zones,” then lets those zones decay over time. Each zone carries a strength score that fades bar by bar. Zones that stop attracting or rejecting price are gradually de-emphasized and eventually removed, while the most relevant areas stay bright and obvious.
Instead of static rectangles that live forever, you get a living liquidity map where:
Zones are born from objective criteria: volatility, wick size, and optional volume spikes.
Zones “age” using a configurable decay factor and maximum lifetime.
Zone color and opacity reflect current relative strength on a unified clear → green → red gradient.
Zones freeze when broken, so you can distinguish “active reaction areas” from “historical levels that have already given way”.
Conceptual idea
Large wicks with strong volatility often mark areas where aggressive orders met hidden liquidity and got absorbed. Price may revisit these areas to test leftover interest or to relieve trapped positions. However, not every wick matters for long. As time passes and more bars print, the market “forgets” some areas.
Time-Decay Liquidity Zones turns that idea into a rule-based system:
Find bars that likely reflect strong aggressive flows into liquidity.
Mark a zone around the wick using ATR-based thickness.
Assign a strength score of 1.0 at birth.
Each bar, reduce that score by a decay factor and remove zones that fall below a threshold or live too long.
Color all surviving zones from weak to strong using a single gradient scale and a visual legend.
How events are detected
Detection lives in the Event Detection group. The script combines range, wick size, and optional volume filters into simple rules.
Volatility filter
ATR Length — computes a rolling ATR over your chosen window. This is the volatility baseline.
Min range in ATRs — bar range (High–Low) must exceed this multiple of ATR for an event to be considered. This avoids tiny bars triggering zones.
Wick filters
For each bar, the script splits the candle into body and wicks:
Upper wick = High minus the max(Open, Close).
Lower wick = min(Open, Close) minus Low.
Then it tests:
Upper wick condition — upper wick must be larger than Min wick size in ATRs × ATR.
Lower wick condition — lower wick must be larger than Min wick size in ATRs × ATR.
Only bars with a sufficiently long wick relative to volatility qualify as candidate “liquidity events”.
Volume filter
Optionally, the script requires a volume spike:
Use volume filter — if enabled, volume must exceed a rolling volume SMA by a configurable multiplier.
Volume SMA length — period for the volume average.
Volume spike multiplier — how many times above the SMA current volume needs to be.
This lets you focus only on “heavy” tests of liquidity and ignore quiet bars.
Event types
Putting it together:
Upper event (potential supply / long liquidation, etc.)
Occurs when:
Upper wick is large in ATR terms.
Full bar range is large in ATR terms.
Volume is above the spike threshold (if enabled).
Lower event (potential demand / short liquidation, etc.)
Symmetric conditions using the lower wick.
How zones are constructed
Zone geometry lives in Zone Geometry .
When an event is detected, the script builds a rectangular box that anchors to the wick and extends in the appropriate direction by an ATR-based thickness.
For upper (supply-type) zones
Bottom of the zone = event bar high.
Top of the zone = event bar high + Zone thickness in ATRs × ATR.
The zone initially spans only the event bar on the x-axis, but is extended to the right as new bars appear while the zone is active.
For lower (demand-type) zones
Top of the zone = event bar low.
Bottom of the zone = event bar low − Zone thickness in ATRs × ATR.
Same extension logic: box starts on the event bar and grows rightward while alive.
The result is a band around the wick that scales with volatility. On high-ATR charts, zones are thicker. On calm charts, they are narrower and more precise.
Zone lifecycle, decay, and removal
All lifecycle logic is controlled by the Decay & Lifetime group.
Each zone carries:
Score — a floating-point “importance” measure, starting at 1.0 when created.
Direction — +1 for upper zones, −1 for lower zones.
Birth index — bar index at creation time.
Active flag — whether the zone is still considered unbroken and extendable.
1) Active vs broken
Each confirmed bar, the script checks:
For an upper zone , the zone is counted as “broken” when the close moves above the top of the zone.
For a lower zone , the zone is counted as “broken” when the close moves below the bottom of the zone.
When a zone breaks:
Its right edge is frozen at the previous bar (no further extension).
The zone remains on the chart, but is no longer updated by price interaction. It still decays in score until removal.
This lets you see where a major level was overrun, while naturally fading its influence over time.
2) Time decay
At each confirmed bar:
Score := Score × Score decay per bar .
A decay value close to 1.0 means very slow decay and long-lived zones.
Lower values (closer to 0.9) mean faster forgetting and more current-focused zones.
You are controlling how quickly the market “forgets” past events.
3) Age and score-based removal
Zones are removed when either:
Age in bars exceeds Max bars a zone can live .
This is a hard lifetime cap.
Score falls below Minimum score before removal .
This trims zones that have decayed into irrelevance even if their age is still within bounds.
When a zone is removed, its box is deleted and all associated state is freed to keep performance and visuals clean.
Unified gradient and color logic
Color control lives in Gradient & Color . The indicator uses a single continuous gradient for all zones, above and below price, so you can read strength at a glance without guessing what palette means what.
Base colors
You set:
Mid strength color (green) — used for mid-level strength zones and as the “anchor” in the gradient.
High strength color (red) — used for the strongest zones.
Max opacity — the maximum visual opacity for the solid part of the gradient. Lower values here mean more solid; higher values mean more transparent.
The script then defines three internal points:
Clear end — same as mid color, but with a high alpha (close to transparent).
Mid end — mid color at the strongest allowed opacity.
High end — high color at the strongest allowed opacity.
Strength normalization
Within each update:
The script finds the maximum score among all existing zones.
Each zone’s strength is computed as its score divided by this maximum.
Strength is clamped into .
This means a zone with strength 1.0 is currently the strongest zone on the chart. Other zones are colored relative to that.
Piecewise gradient
Color is assigned in two stages:
For strength between 0.0 and 0.5: interpolate from “clear” green to solid green.
Weak zones are barely visible, mid-strength zones appear as solid green.
For strength between 0.5 and 1.0: interpolate from solid green to solid red.
The strongest zones shift toward the red anchor, clearly separating them from everything else.
Strength scale legend
To make the gradient readable, the indicator draws a vertical legend on the right side of the chart:
About 15 cells from top (Strong) to bottom (Weak).
Each cell uses the same gradient function as the zones themselves.
Top cell is labeled “Strong”; bottom cell is labeled “Weak”.
This legend acts as a fixed reference so you can instantly map a zone’s color to its approximate strength rank.
What it plots
At a glance, the indicator produces:
Upper liquidity zones above price, built from large upper wick events.
Lower liquidity zones below price, built from large lower wick events.
All zones colored by relative strength using the same gradient.
Zones that freeze when price breaks them, then fade out via decay and removal.
A strength scale legend on the right to interpret the gradient.
There are no extra lines, labels, or clutter. The focus is the evolving structure of liquidity zones and their visual strength.
How to read the zones
Bright red / bright green zones
These are your current “major” liquidity areas. They have high scores relative to other zones and have not yet decayed. Expect meaningful reactions, absorption attempts, or spillover moves when price interacts with them.
Faded zones
Pale, nearly transparent zones are either old, decayed, or minor. They can still matter, but priority is lower. If these are in the middle of a long consolidation, they often become background noise.
Broken but still visible zones
Zones whose extension has stopped have been overrun by closing price. They show where a key level gave way. You can use them as context for regime shifts or failed attempts.
Absence of zones
A chart with few or no zones means that, under your current thresholds, there have not been strong enough liquidity events recently. Either tighten the filters or accept that recent price action has been relatively balanced.
Use cases
1) Intraday liquidity hunting
Run the indicator on lower timeframes (e.g., 1–15 minute) with moderately fast decay.
Use the upper zones as potential sell reaction areas, the lower zones as potential buy reaction areas.
Combine with order flow, CVD, or footprint tools to see whether price is absorbing or rejecting at each zone.
2) Swing trading context
Increase ATR length and range/wick multipliers to focus only on major spikes.
Set slower decay and higher max lifetime so zones persist across multiple sessions.
Use these zones as swing inflection areas for larger setups, for example anticipating re-tests after breakouts.
3) Stop placement and invalidation
For longs, place invalidation beyond a decaying lower zone rather than in the middle of noise.
For shorts, place invalidation beyond strong upper zones.
If price closes through a strong zone and it freezes, treat that as additional evidence your prior bias may be wrong.
4) Identifying trapped flows
Upper zones formed after violent spikes up that quickly fail can mark trapped longs.
Lower zones formed after violent spikes down that quickly reverse can mark trapped shorts.
Watching how price behaves on the next touch of those zones can hint at whether those participants are being rescued or squeezed.
Settings overview
Event Detection
Use volume filter — enable or disable the volume spike requirement.
Volume SMA length — rolling window for average volume.
Volume spike multiplier — how aggressive the volume spike filter is.
ATR length — period for ATR, used in all size comparisons.
Min wick size in ATRs — minimum wick size threshold.
Min range in ATRs — minimum bar range threshold.
Zone Geometry
Zone thickness in ATRs — vertical size of each liquidity zone, scaled by ATR.
Decay & Lifetime
Score decay per bar — multiplicative decay factor for each zone score per bar.
Max bars a zone can live — hard cap on lifetime.
Minimum score before removal — score cut-off at which zones are deleted.
Gradient & Color
Mid strength color (green) — base color for mid-level zones and the lower half of the gradient.
High strength color (red) — target color for the strongest zones.
Max opacity — controls the most solid end of the gradient (0 = fully solid, 100 = fully invisible).
Tuning guidance
Fast, session-only liquidity
Shorter ATR length (e.g., 20–50).
Higher wick and range multipliers to focus only on extreme events.
Decay per bar closer to 0.95–0.98 and moderate max lifetime.
Volume filter enabled with a decent multiplier (e.g., 1.5–2.0).
Slow, structural zones
Longer ATR length (e.g., 100+).
Moderate wick and range thresholds.
Decay per bar very close to 1.0 for slow fading.
Higher max lifetime and slightly higher min score threshold so only very weak zones disappear.
Noisy, high-volatility instruments
Increase wick and range ATR multipliers to avoid over-triggering.
Consider enabling the volume filter with stronger settings.
Keep decay moderate to avoid the chart getting overloaded with old zones.
Notes
This is a structural and contextual tool, not a complete trading system. It does not account for transaction costs, execution slippage, or your specific strategy rules. Use it to:
Highlight where liquidity has recently been tested hard.
Rank these areas by decaying strength.
Guide your attention when layering in separate entry signals, risk management, and higher-timeframe context.
Time-Decay Liquidity Zones is designed to keep your chart focused on where the market has most recently “cared” about price, and to gradually forget what no longer matters. Adjust the detection, geometry, decay, and gradient to fit your product and timeframe, and let the zones show you which parts of the tape still have unfinished business.
PyraTime™ Lite
PyraTime™ Lite Indicator: Precision Time Analysis for Day Trading
The PyraTime™ Lite indicator is a free, high-utility Pine Script tool designed to introduce day traders to the power of time and frequency analysis, specifically on high-velocity charts.
Built around a unique Great Pyramid/Sacred Sequence pivot methodology, PyraTime™ Lite helps you visualize key temporal harmonics projected from a user-defined Origin Pivot (Golden Anchor). This allows for superior chart context and timing analysis.
📈 Key Features and Benefits (Lite Version)
This free version is explicitly configured for the most popular and volatile day-trading timeframes, helping you target short-term moves with precision:
⚡️ Focus on High-Activity Timeframes: The indicator is unlocked and optimized exclusively for the 15-minute and 1-hour charts. This focus ensures clean, relevant data for intra-day and swing trading strategies.
🎯 Identify Precise "Kill Zones": By mapping vertical time bands (up to 22 segments of the sacred sequence) across the chart, PyraTime™ Lite helps you identify high-probability Kill Zones—areas in time where market turning points or reversals are statistically more likely.
🕰️ Time the Market with Precision: Instead of relying solely on price, this indicator gives you a temporal edge, allowing you to anticipate market changes based on the recurring, cyclical nature of time itself.
📚 Educational Foundation: Experience the core functionality of advanced time-based analysis without any cost or obligation, offering a clear path to understanding cyclical trading methodologies.
👑 Unlock the Full Power: PyraTime™ Master
The PyraTime™ Lite is a powerful teaser, but it only scratches the surface of this proprietary system.
Upgrade to the PyraTime™ Master indicator for complete, unrestricted access to the full power of the PyraTime methodology:
🔓 All Timeframes Unlocked: Gain access to all Standard and Esoteric Timeframes (including 4m, 7m, 11m, 22m, 44m, Daily, and Weekly), essential for multi-timeframe confirmation and deeper analysis.
🌌 Full Sacred Sequence: Unlock the complete 108-line Sacred Sequence, providing full temporal projection into the future for long-term swing trading planning and macro cycle forecasting.
🎨 Full Customization: Unlock all settings, allowing you to fully customize colors, line styles, and all other input parameters.
Ready to master market timing?
Get PyraTime™ Master Lifetime Access Here: whop.com
Divergence Channels Indicator — JudasBulletUnique Buy/Sell Indicator. Place stoploss above/below 18 EMA. Low risk/high reward. My No.1 indicator on every chart.
ICT Macro Slot Algo Event📊 Overview
A powerful multi-timeframe trading indicator that combines Institutional Macro Session Tracking to identify optimal trading windows throughout the day. This tool helps traders align with institutional flow patterns and algorithmic activity across major sessions.
🎯 Key Features
1. Macro Algo Event Sessions
Tracks 6 key institutional time windows during NY Session:
NY Sweep (08:50-09:10) - Opening balance flows
Silver Bullet #1 (09:50-10:10) - First major macro move
Silver Bullet #2 (10:50-11:10) - Second chance/retest opportunity
Lunch Macro (11:50-12:10) - Mid-day repositioning
Post-Lunch Rebalance (13:10-13:40) - Post-lunch adjustments
NY Closing Macros (15:15-15:45) - End-of-day flows
ParabolicSAR+EMA[TS_Indie]🚀 EMA + Parabolic SAR Reversal Trading Strategy
This trading system effectively combines the use of Exponential Moving Averages (EMA) with the Parabolic SAR to identify both price trends and key reversal points. The EMA Fast is used to signal the primary short-term trend, while the EMA Slow acts as a filter for the long-term trend direction. The Parabolic SAR then helps to confirm the reversal signals.
🛠️ Tools Used
1. EMA Fast – Primary Short-Term Trend
2. EMA Slow – Long-Term Trend Filter
3. Parabolic SAR – Reversal Confirmation
🎯 Entry Rules
📈 Buy Setup
1. Trend Filter: EMA Fast > EMA Slow → Uptrend
2. Pullback: Price pulls back and closes below the EMA Fast line.
3. Reversal: Price reverses/pulls back up and closes above the EMA Fast line.
4. SAR Confirmation: The previous Parabolic SAR dot is above the high, and the dot in the current candle is below the low → Reversal signal confirmed.
5. Entry: Enter Buy immediately.
📉 Sell Setup
1. Trend Filter: EMA Fast < EMA Slow → Downtrend
2. Pullback: Price pulls back and closes above the EMA Fast line.
3. Reversal: Price reverses/pulls back down and closes below the EMA Fast line.
4. SAR Confirmation: The previous Parabolic SAR dot is below the low, and the dot in the current candle is above the high → Reversal signal confirmed.
5. Entry: Enter Sell immediately.
💰 Exit Management (Entry, Stop Loss, Take Profit)
1. Entry: Enter the order at the closing price of the signal candle.
2. Stop Loss (SL): Set the Stop Loss at the Parabolic SAR dot.
3. Take Profit (TP): Calculated from the Entry and Stop Loss points, multiplied by the Risk Reward Ratio.
⚙️ Optional Parameters
➭ Custom Risk/Reward Ratio for Take Profit.
➭ Option to add an ATR buffer to the Stop Loss.
➭ Adjustable EMA Fast period.
➭ Adjustable EMA Slow period.
➭ Adjustable Parabolic SAR parameters.
➭ Option to enable Long-only / Short-only positions.
➭ Customizable Backtest start and end date.
➭ Customizable trading session time.
🔔 Alert Function
Alerts display:
➭ Entry Price
➭ Stop Loss Price
➭ Take Profit Price
💡 This strategy allows for many parameter adjustments, such as the MA type, adding/subtracting from the Stop Loss using ATR, and selecting specific sessions for backtesting. If you find interesting or profitable results after adjusting the parameters, please share your comments with other traders!
⚠️ Disclaimer
This indicator is designed for educational and research purposes only. It does not guarantee profits and should not be considered financial advice. Trading in financial markets involves significant risk , including the potential loss of capital.
Flux-Tensor Singularity [FTS]Flux-Tensor Singularity - Multi-Factor Market Pressure Indicator
The Flux-Tensor Singularity (FTS) is an advanced multi-factor oscillator that combines volume analysis, momentum tracking, and volatility-weighted normalization to identify critical market inflection points. Unlike traditional single-factor indicators, FTS synthesizes price velocity, volume mass, and volatility context into a unified framework that adapts to changing market regimes.
This indicator identifies extreme market conditions (termed "singularities") where multiple confirming factors converge, then uses a sophisticated scoring system to determine directional bias. It is designed for traders seeking high-probability setups with built-in confluence requirements.
THEORETICAL FOUNDATION
The indicator is built on the premise that market time is not constant - different market conditions contain varying levels of information density. A 1-minute bar during a major news event contains far more actionable information than a 1-minute bar during overnight low-volume trading. Traditional indicators treat all bars equally; FTS does not.
The theoretical framework draws conceptual parallels to physics (purely as a mental model, not literal physics):
Volume as Mass: Large volume represents significant market participation and "weight" behind price moves. Just as massive objects have stronger gravitational effects, high-volume moves carry more significance.
Price Change as Velocity: The rate of price movement through price space represents momentum and directional force.
Volatility as Time Dilation: When volatility is high relative to its historical norm, the "information density" of each bar increases. The indicator weights these periods more heavily, similar to how time dilates near massive objects in physics.
This is a pedagogical metaphor to create a coherent mental model - the underlying mathematics are standard financial calculations combined in a novel way.
MATHEMATICAL FRAMEWORK
The indicator calculates a composite singularity value through four distinct steps:
Step 1: Raw Singularity Calculation
S_raw = (ΔP × V) × γ²
Where:
ΔP = Price Velocity = close - close
V = Volume Mass = log(volume + 1)
γ² = Time Dilation Factor = (ATR_local / ATR_global)²
Volume Transformation: Volume is log-transformed because raw volume can have extreme outliers (10x-100x normal). The logarithm compresses these spikes while preserving their significance. This is standard practice in volume analysis.
Volatility Weighting: The ratio of short-term ATR (5 periods) to long-term ATR (user-defined lookback) is squared to create a volatility amplification factor. When local volatility exceeds global volatility, this ratio increases, amplifying the raw singularity value. This makes the indicator regime-aware.
Step 2: Normalization
The raw singularity values are normalized to a 0-100 scale using a stochastic-style calculation:
S_normalized = ((S_raw - S_min) / (S_max - S_min)) × 100
Where S_min and S_max are the lowest and highest raw singularity values over the lookback period.
Step 3: Epsilon Compression
S_compressed = 50 + ((S_normalized - 50) / ε)
This is the critical innovation that makes the sensitivity control functional. By applying compression AFTER normalization, the epsilon parameter actually affects the final output:
ε < 1.0: Expands range (more signals)
ε = 1.0: No change (default)
ε > 1.0: Compresses toward 50 (fewer, higher-quality signals)
For example, with ε = 2.0, a normalized value of 90 becomes 70, making threshold breaches rarer and more significant.
Step 4: Smoothing
S_final = EMA(S_compressed, smoothing_period)
An exponential moving average removes high-frequency noise while preserving trend.
SIGNAL GENERATION LOGIC
When the tensor crosses above the upper threshold (default 90) or below the lower threshold (default 10), an extreme event is detected. However, the indicator does NOT immediately generate a buy or sell signal. Instead, it analyzes market context through a multi-factor scoring system:
Scoring Components:
Price Structure (+1 point): Current bar bullish/bearish
Momentum (+1 point): Price higher/lower than N bars ago
Trend Context (+2 points): Fast EMA above/below slow EMA (weighted heavier)
Acceleration (+1 point): Rate of change increasing/decreasing
Volume Multiplier (×1.5): If volume > average, multiply score
The highest score (bullish vs bearish) determines signal direction. This prevents the common indicator failure mode of "overbought can stay overbought" by requiring directional confirmation.
Signal Conditions:
A BUY signal requires:
Extreme event detection (tensor crosses threshold)
Bullish score > Bearish score
Price confirmation: Bullish candle (optional, user-controlled)
Volume confirmation: Volume > average (optional, user-controlled)
Momentum confirmation: Positive momentum (optional, user-controlled)
A SELL signal requires the inverse conditions.
INPUTS EXPLAINED - Core Parameters:
Global Horizon (Context): Default 20. Lookback period for normalization and volatility comparison. Higher values = smoother but less responsive. Lower values = more signals but potentially more noise.
Tensor Smoothing: Default 3. EMA period applied to final output. Removes "quantum foam" (high-frequency noise). Range 1-20.
Singularity Threshold: Default 90. Values above this (or below 100-threshold) trigger extreme event detection. Higher = rarer, stronger signals.
Signal Sensitivity (Epsilon): Default 1.0. Post-normalization compression factor. This is the key innovation - it actually works because it's applied AFTER normalization. Range 0.1-5.0.
Signal Interpreter Toggles:
Require Price Confirmation: Default ON. Only generates buy signals on bullish candles, sell signals on bearish candles. Reduces false signals but may delay entry.
Require Volume Confirmation: Default ON. Only signals when volume > average. Critical for stocks/crypto, less important for forex (unreliable volume data).
Use Momentum Filter: Default ON. Requires momentum agreement with signal direction. Prevents counter-trend signals.
Momentum Lookback: Default 5. Number of bars for momentum calculation. Shorter = more responsive, longer = trend-following bias.
Visual Controls:
Colors: Customizable colors for bullish flux, bearish flux, background, and event horizon.
Visual Transparency: Default 85. Master control for all visual elements (accretion disk, field lines, particles, etc.). Range 50-99. Signals and dashboard have separate controls.
Visibility Toggles: Individual on/off switches for:
Gravitational field lines (trend EMAs)
Field reversals (trend crossovers)
Accretion disk (background gradient)
Singularity diamonds (neutral extreme events)
Energy particles (volume bursts)
Event horizon flash (extreme event background)
Signal background flash
Signal Size: Tiny/Small/Normal triangle size
Signal Offsets: Separate controls for buy and sell signal vertical positioning (percentage of price)
Dashboard Settings:
Show Dashboard: Toggle on/off
Position: 9 placement options (all corners, centers, middles)
Text Size: Tiny/Small/Normal/Large
Background Transparency: 0-50, separate from visual transparency
VISUAL ELEMENTS EXPLAINED
1. Accretion Disk (Background Gradient):
A three-layer gradient background that intensifies as the tensor approaches extremes. The outer disk appears at any non-neutral reading, the inner disk activates above 70 or below 30, and the core layer appears above 85 or below 15. Color indicates direction (cyan = bullish, red = bearish). This provides instant visual feedback on market pressure intensity.
2. Gravitational Field Lines (EMAs):
Two trend-following EMAs (10 and 30 period) visualized as colored lines. These represent the "curvature" of market trend - when they diverge, trend is strong; when they converge, trend is weakening. Crossovers mark potential trend reversals.
3. Field Reversals (Circles):
Small circles appear when the fast EMA crosses the slow EMA, indicating a potential trend change. These are distinct from extreme events and appear at normal market structure shifts.
4. Singularity Diamonds:
Small diamond shapes appear when the tensor reaches extreme levels (>90 or <10) but doesn't meet the full signal criteria. These are "watch" events - extreme pressure exists but directional confirmation is lacking.
5. Energy Particles (Dots):
Tiny dots appear when volume exceeds 2× average, indicating significant participation. Color matches bar direction. These highlight genuine high-conviction moves versus low-volume drifts.
6. Event Horizon Flash:
A golden background flash appears the instant any extreme threshold is breached, before directional analysis. This alerts you to pay attention.
7. Signal Background Flash:
When a full buy/sell signal is confirmed, the background flashes cyan (buy) or red (sell). This is your primary alert that all conditions are met.
8. Signal Triangles:
The actual buy (▲) and sell (▼) markers. These only appear when ALL selected confirmation criteria are satisfied. Position is offset from bars to avoid overlap with other indicators.
DASHBOARD METRICS EXPLAINED
The dashboard displays real-time calculated values:
Event Density: Current tensor value (0-100). Above 90 or below 10 = critical. Icon changes: 🔥 (extreme high), ❄️ (extreme low), ○ (neutral).
Time Dilation (γ): Current volatility ratio squared. Values >2.0 indicate extreme volatility environments. >1.5 = elevated, >1.0 = above average. Icon: ⚡ (extreme), ⚠ (elevated), ○ (normal).
Mass (Vol): Log-transformed volume value. Compared to volume ratio (current/average). Icon: ● (>2× avg), ◐ (>1× avg), ○ (below avg).
Velocity (ΔP): Raw price change. Direction arrow indicates momentum direction. Shows the actual price delta value.
Bullish Flux: Current bullish context score. Displayed as both a bar chart (visual) and numeric value. Brighter when bullish score dominates.
Bearish Flux: Current bearish context score. Same visualization as bullish flux. These scores compete - the winner determines signal direction.
Field: Trend direction based on EMA relationship. "Repulsive" (uptrend), "Attractive" (downtrend), "Neutral" (ranging). Icon: ⬆⬇↔
State: Current market condition:
🚀 EJECTION: Buy signal active
💥 COLLAPSE: Sell signal active
⚠ CRITICAL: Extreme event, no directional confirmation
● STABLE: Normal market conditions
HOW TO USE THE INDICATOR
1. Wait for Extreme Events:
The indicator is designed to be selective. Don't trade every fluctuation - wait for tensor to reach >90 or <10. This alone is not a signal.
2. Check Context Scores:
Look at the Bullish Flux vs Bearish Flux in the dashboard. If scores are close (within 1-2 points), the market is indecisive - skip the trade.
3. Confirm with Signals:
Only act when a full triangle signal appears (▲ or ▼). This means ALL your selected confirmation criteria have been met.
4. Use with Price Structure:
Combine with support/resistance levels. A buy signal AT support is higher probability than a buy signal in the middle of nowhere.
5. Respect the Dashboard State:
When State shows "CRITICAL" (⚠), it means extreme pressure exists but direction is unclear. These are the most dangerous moments - wait for resolution.
6. Volume Matters:
Energy particles (dots) and the Mass metric tell you if institutions are participating. Signals without volume confirmation are lower probability.
MARKET AND TIMEFRAME RECOMMENDATIONS
Scalping (1m-5m):
Lookback: 10-14
Smoothing: 5-7
Threshold: 85
Epsilon: 0.5-0.7
Note: Expect more noise. Confirm with Level 2 data. Best on highly liquid instruments.
Intraday (15m-1h):
Lookback: 20-30 (default settings work well)
Smoothing: 3-5
Threshold: 90
Epsilon: 1.0
Note: Sweet spot for the indicator. High win rate on liquid stocks, forex majors, and crypto.
Swing Trading (4h-1D):
Lookback: 30-50
Smoothing: 3
Threshold: 90-95
Epsilon: 1.5-2.0
Note: Signals are rare but high conviction. Combine with higher timeframe trend analysis.
Position Trading (1D-1W):
Lookback: 50-100
Smoothing: 5-7
Threshold: 95
Epsilon: 2.0-3.0
Note: Extremely rare signals. Only trade the most extreme events. Expect massive moves.
Market-Specific Settings:
Forex (EUR/USD, GBP/USD, etc.):
Volume data is unreliable (spot forex has no centralized volume)
Disable "Require Volume Confirmation"
Focus on momentum and trend filters
News events create extreme singularities
Best on 15m-1h timeframes
Stocks (High-Volume Equities):
Volume confirmation is CRITICAL - keep it ON
Works excellently on AAPL, TSLA, SPY, etc.
Morning session (9:30-11:00 ET) shows highest event density
Earnings announcements create guaranteed extreme events
Best on 5m-1h for day trading, 1D for swing trading
Crypto (BTC, ETH, major alts):
Reduce threshold to 85 (crypto has constant high volatility)
Volume spikes are THE primary signal - keep volume confirmation ON
Works exceptionally well due to 24/7 trading and high volatility
Epsilon can be reduced to 0.7-0.8 for more signals
Best on 15m-4h timeframes
Commodities (Gold, Oil, etc.):
Gold responds to macro events (Fed announcements, geopolitical events)
Oil responds to supply shocks
Use daily timeframe minimum
Increase lookback to 50+
These are slow-moving markets - be patient
Indices (SPX, NDX, etc.):
Institutional volume matters - keep volume confirmation ON
Opening hour (9:30-10:30 ET) = highest singularity probability
Strong correlation with VIX - high VIX = more extreme events
Best on 15m-1h for day trading
WHAT MAKES THIS INDICATOR UNIQUE
1. Post-Normalization Sensitivity Control:
Unlike most oscillators where sensitivity controls don't actually work (they're applied before normalization, which then rescales everything), FTS applies epsilon compression AFTER normalization. This means the sensitivity parameter genuinely affects signal frequency. This is a novel implementation not found in standard oscillators.
2. Multi-Factor Confluence Requirement:
The indicator doesn't just detect "overbought" or "oversold" - it detects extreme conditions AND THEN analyzes context through five separate factors (price structure, momentum, trend, acceleration, volume). Most indicators are single-factor; FTS requires confluence.
3. Volatility-Weighted Normalization:
By squaring the ATR ratio (local/global), the indicator adapts to changing market regimes. A 1% move in a low-volatility environment is treated differently than a 1% move in a high-volatility environment. Traditional indicators treat all moves equally regardless of context.
4. Volume Integration at the Core:
Volume isn't an afterthought or optional filter - it's baked into the fundamental equation as "mass." The log transformation handles outliers elegantly while preserving significance. Most price-based indicators completely ignore volume.
5. Adaptive Scoring System:
Rather than fixed buy/sell rules ("RSI >70 = sell"), FTS uses competitive scoring where bullish and bearish evidence compete. The winner determines direction. This solves the classic problem of "overbought markets can stay overbought during strong uptrends."
6. Comprehensive Visual Feedback:
The multi-layer visualization system (accretion disk, field lines, particles, flashes) provides instant intuitive feedback on market state without requiring dashboard reading. You can see pressure building before extreme thresholds are hit.
7. Separate Extreme Detection and Signal Generation:
"Singularity diamonds" show extreme events that don't meet full criteria, while "signal triangles" only appear when ALL conditions are met. This distinction helps traders understand when pressure exists versus when it's actionable.
COMPARISON TO EXISTING INDICATORS
vs. RSI/Stochastic:
These normalize price relative to recent range. FTS normalizes (price change × log volume × volatility ratio) - a composite metric, not just price position.
vs. Chaikin Money Flow:
CMF combines price and volume but lacks volatility context and doesn't use adaptive normalization or post-normalization compression.
vs. Bollinger Bands + Volume:
Bollinger Bands show volatility but don't integrate volume or create a unified oscillator. They're separate components, not synthesized.
vs. MACD:
MACD is pure momentum. FTS combines momentum with volume weighting and volatility context, plus provides a normalized 0-100 scale.
The specific combination of log-volume weighting, squared volatility amplification, post-normalization epsilon compression, and multi-factor directional scoring is unique to this indicator.
LIMITATIONS AND PROPER DISCLOSURE
Not a Holy Grail:
No indicator is perfect. This tool identifies high-probability setups but cannot predict the future. Losses will occur. Use proper risk management.
Requires Confirmation:
Best used in conjunction with price action analysis, support/resistance levels, and higher timeframe trend. Don't trade signals blindly.
Volume Data Dependency:
On forex (spot) and some low-volume instruments, volume data is unreliable or tick-volume only. Disable volume confirmation in these cases.
Lagging Components:
The EMA smoothing and trend filters are inherently lagging. In extremely fast moves, signals may appear after the initial thrust.
Extreme Event Rarity:
With conservative settings (high threshold, high epsilon), signals can be rare. This is by design - quality over quantity. If you need more frequent signals, reduce threshold to 85 and epsilon to 0.7.
Not Financial Advice:
This indicator is an analytical tool. All trading decisions and their consequences are solely your responsibility. Past performance does not guarantee future results.
BEST PRACTICES
Don't trade every singularity - wait for context confirmation
Higher timeframes = higher reliability
Combine with support/resistance for entry refinement
Volume confirmation is CRITICAL for stocks/crypto (toggle off only for forex)
During major news events, singularities are inevitable but direction may be uncertain - use wider stops
When bullish and bearish flux scores are close, skip the trade
Test settings on your specific instrument/timeframe before live trading
Use the dashboard actively - it contains critical diagnostic information
Taking you to school. — Dskyz, Trade with insight. Trade with anticipation.
Supply and Demand Zones [Clean v6]Supply and Demand Zones
Overview
The Supply and Demand Zones indicator is an automated market structure tool designed to identify high-probability Points of Interest (POI) on any asset or timeframe. Built using Pine Script v6, this script focuses on clarity and performance, providing traders with a clutter-free view of where institutional buying and selling pressure has previously occurred.
Unlike crowded indicators that overwhelm the chart, this script dynamically manages zones—drawing new ones as structure forms and automatically removing invalid zones as price breaks through them.
Key Features
Automated Zone Detection: Automatically identifies Supply (Resistance) and Demand (Support) zones based on Swing Highs and Swing Lows.
Dynamic Zone Management: Active zones extend to the right until price interacts with them.
Break of Structure (BOS) Logic: When price violates a zone (closes beyond the invalidation level), the zone is automatically removed and marked as "Broken" to keep the chart clean.
Zig Zag Structure: Includes an optional Zig Zag overlay to visualize market flow, Higher Highs, and Lower Lows.
ATR-Based Sizing: Zone width is calculated using the Average True Range (ATR), ensuring zones adapt to the asset's current volatility.
Pine Script v6: Optimized using the latest array and method functions for speed and stability.
How It Works
Zone Creation: The script looks for Pivot Highs and Lows based on your defined Swing Length.
Supply Zones (Red): Created at Swing Highs.
Demand Zones (Blue): Created at Swing Lows.
Zone Width: The height of the box is determined by the ATR multiplied by your Zone Width setting. This ensures the zone covers the "wick" area or the volatility range of the pivot.
Invalidation: If the price closes past the outer edge of a zone (the top of a Supply zone or bottom of a Demand zone), the script detects a break, removes the filled box, and leaves a subtle trace of the broken structure.
How to Use
Trend Following: Use the Zig Zag lines to identify the trend direction. Look for Long entries in Demand zones during an uptrend, and Short entries in Supply zones during a downtrend.
Reversals: Watch for price to react at older, unfilled zones (POIs) that align with major support/resistance levels.
Stop Loss Placement: The outer edge of the zone acts as a natural invalidation point. If price closes beyond it, the setup is typically invalidated.
Settings Guide
Swing Length: Determines the sensitivity of the pivot detection. Lower numbers find more local zones (scalping); higher numbers find major structural zones (swing trading).
Max Zones to Keep: Limits the number of historic zones displayed to prevent chart clutter.
Zone Width (ATR): Adjusts how thick the zones are. Increase this value if you want to capture wider wicks.
Visual Settings: Fully customizable colors for Supply, Demand, Borders, and Zig Zag lines.
Disclaimer
This tool is for informational and educational purposes only. It visualizes past price action and does not guarantee future performance. Always manage your risk appropriately.
Momentum Tide [Alpha Extract]A sophisticated momentum-based trend identification system that measures normalized price deviation from an EMA baseline using ATR scaling and hyperbolic tangent smoothing for precise trend state classification. Utilizing advanced signal processing with configurable neutral bands and slope sensitivity adjustments, this indicator delivers institutional-grade momentum analysis with continuous strength measurement and visual trend confirmation. The system's three-state classification (bullish, bearish, neutral) combined with dynamic color intensity scaling provides comprehensive market momentum assessment across varying volatility conditions.
🔶 Advanced Baseline Deviation Framework
Implements EMA-based baseline calculation with ATR-normalized deviation measurement to create volatility-adjusted momentum signals. The system calculates raw price deviation from the baseline, scales by ATR and slope sensitivity factor, then applies exponential smoothing for stable signal generation with reduced noise and false transitions.
// Core Momentum Calculation
Baseline = ta.ema(close, Baseline_Length)
ATR_Value = ta.atr(ATR_Length)
Raw_Deviation = (close - Baseline) / (ATR_Value * Slope_Scaler)
Signal = ta.ema(Raw_Deviation, Signal_Smoothing)
🔶 Hyperbolic Tangent Normalization Engine
Features sophisticated tanh transformation that clamps raw deviation signals into normalized -1 to +1 range for consistent interpretation across all market conditions. The system applies safe exponential calculations with value capping to prevent overflow while maintaining signal sensitivity, creating bounded momentum readings suitable for systematic threshold analysis.
// Tanh Normalization
Clamped_Signal = tanh(Signal) // Bounded to
Strength = abs(Clamped_Signal) // Momentum intensity
🔶 Three-State Classification System
Implements intelligent trend state determination using configurable neutral band thresholds to reduce whipsaw signals during ranging conditions. The system classifies market as bullish (+1) when momentum exceeds upper neutral band, bearish (-1) below lower neutral band, and neutral (0) within the band, providing clear directional bias with built-in consolidation recognition.
🔶 Dynamic Color Intensity Architecture
Provides advanced visual feedback through momentum strength-based color intensity modulation, where stronger trends display more opaque colors and weaker trends show increased transparency. The system dynamically adjusts color alpha values based on absolute momentum strength, creating intuitive visual representation of trend conviction across baseline, candles, and bars.
🔶 Trend Strength Meter Visualization
Features innovative horizontal gradient meter displaying real-time momentum position across bear-to-bull spectrum with 24-segment resolution. The system creates smooth color transitions from bearish red through neutral gray to bullish green, with arrow indicator showing precise momentum location for instant trend strength assessment without cluttering the price chart.
🔶 Intelligent Flip Detection System
Generates transition markers when trend state changes from neutral/bearish to bullish or neutral/bullish to bearish, with duplicate signal suppression to prevent marker clustering. The system tracks previous signal states and only plots new markers on genuine trend reversals, providing clean entry signal visualization for systematic trading approaches.
snapshot
🔶 Configurable Neutral Band Framework
Implements adjustable neutral zone width using ATR percentage parameters to optimize signal frequency for different trading styles and market conditions. Wider bands reduce flip frequency for position trading while tighter bands increase sensitivity for active trading strategies, enabling customization without code modification.
🔶 Slope Sensitivity Adjustment
Features slope scaler parameter that modulates ATR normalization factor, controlling signal smoothness versus responsiveness trade-off. Higher values create smoother momentum readings with fewer transitions while lower values increase snappiness for faster reaction to price changes, allowing optimization across different volatility regimes and timeframes.
🔶 Comprehensive Visual Integration
Provides multi-dimensional trend visualization through color-coded baseline overlay, momentum-synchronized candle coloring, and bar color modification with configurable display toggles. The system includes optional flip markers and strength meter with position control for complete chart integration without visual overload.
🔶 Performance Optimization Framework
Utilizes efficient calculation methods with optimized table management for strength meter updates and minimal computational overhead for real-time momentum processing. The system includes intelligent state tracking and safe mathematical operations to prevent errors during extreme market conditions while maintaining consistent performance.
🔶 Why Choose Momentum Tide ?
This indicator delivers sophisticated momentum-based trend analysis through normalized deviation measurement and intelligent three-state classification. Unlike traditional momentum oscillators that operate in separate windows, Momentum Tide integrates directly with price action through baseline overlay and candle coloring while providing the analytical depth of bounded momentum measurement. The system's combination of tanh normalization, configurable neutral bands, dynamic color intensity, and innovative strength meter makes it essential for traders seeking adaptive trend-following approaches with clear visual feedback across cryptocurrency, forex, and equity markets. The three-state system naturally filters ranging periods while the momentum strength measurement enables position sizing and confidence assessment for systematic trading strategies.
Coin Jin Multi SMA+ BB+ SMA forecast Ver2.02This script provides a complete trend-analysis system based on the
5 / 20 / 60 / 112 / 224 / 448 / 896 SMAs.
It precisely detects bullish/bearish alignment and automatically identifies
12 advanced trend-shift signals (Start, End, and Reversal).
Key Features:
● 9 SMA lines (including custom X1 & X2)
Each SMA supports custom color, width, and style (Line/Step/Circles).
● Bollinger Bands with customizable options
Fully adjustable length, source, width, style, fill transparency, and more.
● SMA Forecast (curved projection)
– Slope computed via linear regression
– Predicts up to 30 future bars
– Forced dotted style ensures visibility at all zoom levels
● 12 Advanced Trend Signals (alertcondition)
Automatically detects:
Start of full alignment (with/without SMA 896)
End of alignment
Bull ↔ Bear transitions
Perfect for momentum trading, trend-following, reversal detection, or automated alert systems.
● Labeling last value of each SMA
Each SMA prints a label such as "5", “20”, “60”, “896”, or custom lengths at the latest bar.
이 스크립트는 5 / 20 / 60 / 112 / 224 / 448 / 896 이동평균선을 기반으로
정배열·역배열 상태를 정밀하게 분석하고,
총 12가지 고급 추세 신호(시작·종료·전환) 를 자동으로 감지하는 통합 추세 분석 도구입니다.
주요 기능:
● 9개의 SMA 표시 (커스텀 X1, X2 포함)
각 SMA는 색상·굵기·형태(Line/Step/Circle)를 개별 설정할 수 있습니다.
● 볼린저밴드 표시 및 채우기 옵션
BB 길이, 소스, 타입, 두께, 투명도 등을 자유롭게 조절 가능.
● SMA Forecast (미래 방향 곡선 예측)
– 기울기 기반 선형회귀 슬로프 계산
– 곡선 형태로 미래 30봉까지 예측
– 점선(Dotted) 강제 적용으로 어떤 배율에서도 선명하게 표시
● 12가지 고급 추세 신호(alertcondition)
정배열·역배열의
Start (처음 완성될 때)
End (깨질 때)
Switch (전환)
을 모두 자동 탐지하여 트레이딩뷰 알림으로 받을 수 있음.
● SMA 마지막 가격 라벨 표시
각 SMA 끝 지점에 “5 / 20 / 60 / ... / 896” 식으로 라벨 표시.






















