AlphaTrend Momentum Matrix [MarkitTick]💡 The AlphaTrend Momentum Matrix is an advanced, comprehensive trend-following architecture designed to dynamically track market momentum, manage dynamic trade states, and seamlessly bridge the gap between technical charting and automated execution. Far from a simple overlay, this script acts as a multi-layered analytical suite. It evaluates primary trend direction using volatility and volume-weighted money flow, filters out market noise with a custom state-matrix, and projects actionable higher-timeframe data onto the active chart. Furthermore, it incorporates an internal mathematical framework capable of dynamically calculating strict risk-to-reward targets and dispatching meticulously formatted JSON payloads for external webhook execution.
✨ Originality and Utility
● The Momentum Matrix Advantage
While traditional trend indicators rigidly lock onto moving averages or standard price bands, the AlphaTrend Momentum Matrix thrives on market dynamism. Its true utility lies in its multifaceted approach to trend validation. It introduces an exclusive "ATR Breakout Override" system—a custom logic module that forces a trend recalibration if an explosive price movement severely disrupts the standard deviation envelope, regardless of standard trailing conditions. This ensures the indicator remains highly responsive to sudden, high-impact market events without waiting for lagging conditions to catch up.
● Automated Payload and State Management
A standout feature of this tool is its embedded Trade State system. It does not merely paint a signal on the chart; it internalizes the exact entry price, computes a precise stop-loss based on the active AlphaTrend baseline, and mathematically projects a 1:2 risk-to-reward Take Profit target. This localized tracking seamlessly interfaces with the built-in Alert Engine, dynamically injecting these critical metrics into formatted JSON templates ready for third-party automated execution systems.
🔬 Methodology and Concepts
● AlphaTrend Core Engine
The primary directional engine relies on the interplay between the Average True Range (ATR) and the Money Flow Index (MFI). A trailing upper band (Support) and lower band (Resistance) are calculated using a user-defined ATR coefficient. The script interrogates the 14-period MFI; if the MFI reads above 50, indicating positive money flow momentum, the algorithm biases toward the Support band, updating it only when the price makes higher lows. Conversely, an MFI below 50 shifts the bias to the Resistance band.
● Breakout Override Protocol
To counteract the inherent lag of volume-weighted smoothing, the indicator employs a momentum breakout scanner. By measuring the absolute distance between the previous two closing prices and comparing it against the prior ATR multiplied by a sensitivity factor, the script can definitively detect volatility shocks. If a shock occurs concurrently with a directional price cross over the active AlphaTrend line, the system immediately forces a directional shift, bypassing the standard MFI requirements.
● Signal Filtering and Matrix Constraints
Raw signal crossovers are notoriously noisy during consolidation. To mitigate whipsaw trades, this script implements a continuous loop counter (the K and O matrices). It tracks the consecutive bars since the last primary buy or sell condition. A signal is only declared "valid" if it successfully breaks the historical sequence of the opposing trend counter, ensuring that localized micro-fluctuations do not trigger premature trade entries.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Volatility and the Average True Range
Developed by J. Welles Wilder Jr. in 1978, the Average True Range is a foundational pillar of this indicator. The ATR scientifically quantifies absolute market volatility by decomposing the entire range of an asset's periodic price action, factoring in gaps and limit moves. By applying a multiplier to the ATR, this script establishes a statistically significant standard deviation envelope, distinguishing between normal market "breathing" and definitive structural shifts.
● Volume-Weighted Momentum via Money Flow Index
The MFI, created by Gene Quigley and Colin Dysart, represents an evolution of the Relative Strength Index (RSI). From an academic standpoint, the MFI incorporates volume into its momentum calculation, producing a more robust metric of buying and selling pressure. It uses the Typical Price (High + Low + Close / 3) multiplied by volume to calculate raw money flow. The 50-level threshold serves as the equilibrium point; sustaining above this level empirically signifies net accumulation, providing the mathematical justification for the indicator's bullish bias.
● Algorithmic State Machines
The signal filtering mechanism and the internal Trade State tracker are practical applications of Finite State Machines (FSM) commonly used in quantitative algorithmic design. The script holds memory of its current operational state (Long, Short, Neutral) and refuses state transitions unless specifically validated mathematical conditions (boolean logic gates) are met, significantly reducing error rates inherent in purely reactive, memory-less indicators.
● Repainting and Lookahead Warning
This script utilizes the request component to pull Higher Timeframe (HTF) context into the primary chart. Crucially, it employs the barmerge.lookahead_on parameter. While this creates a visually perfect, non-lagging representation of higher timeframe trends when analyzing historical data, it introduces lookahead bias. Traders must understand that historical HTF visuals and signals may appear with perfect precision on past bars, but real-time execution will lack this future data context, potentially resulting in different localized behavior in live markets.
🎨 Visual Guide
● The AlphaTrend Trailing Line
Up Trend (Bullish): A bold, solid step-line tracking below the price, rendered in a distinctive golden-yellow (#F0D080).
Down Trend (Bearish): A bold, solid step-line tracking above the price, colored in a deep crimson (#7A2010).
● The Cloud Fill
Dynamic Channel: A semi-transparent shaded area connecting the active AlphaTrend line to a central Cloud Reference Line (a smoothing of the typical price). This cloud visually represents the buffer zone of the current trend.
Color Coding: The cloud dynamically changes color to match the dominant trend (Gold for bullish, Crimson for bearish), allowing for rapid peripheral analysis of market conditions.
● Price Action Overrides
Colored Candles: The bodies and wicks of the actual price candles are uniformly colored to reflect the AlphaTrend matrix state, instantly identifying periods of alignment or divergence.
● Execution Elements
Signal Labels: Distinct "BUY" and "SELL" textual shapes appear precisely on the chart at the moment the state matrix validates a trend shift.
HTF Stepline: When enabled, a secondary, smoothed step-line appears to show the overarching macro trend, colored accordingly to dictate the broader market regime.
📖 How to Use
● Trend Riding and Context
The most effective way to utilize this tool is to align the primary chart timeframe with the HTF AlphaTrend line. If the HTF line is Gold, you should strictly look for "BUY" signals generated by the primary indicator to trade in the direction of the macro trend, ignoring temporary bearish signals as minor pullbacks.
● Momentum Breakout Confirmation
When you observe a sudden color change accompanied by an unusually large price bar, this is often the Breakout Override triggering. These scenarios represent high-momentum events. Instead of waiting for a retest, aggressive traders may use these specific signals to capture immediate volatility expansions, placing their stop-loss strictly on the opposite side of the newly formed AlphaTrend line.
● Automating Your Strategy
For quantitative traders, the indicator handles the heavy lifting of trade logic. Ensure you configure the exact JSON payload strings required by your third-party execution platform (like 3Commas, PineConnector, etc.) in the settings. The indicator will autonomously calculate your risk/reward parameters upon every valid signal and fire a perfectly formatted JSON alert.
⚙️ Inputs and Settings
• ⚙️ Core Calculations
ATR Multiplier: Defines the sensitivity of the trailing line. Lower values (e.g., 0.5) track price closely for scalping; higher values (e.g., 2.0) provide wide breathing room for swing trades.
ATR & MFI Lookback Period: The standard window (default 14) for calculating both volatility and volume momentum.
Display Signals: Toggles the visibility of the "BUY" and "SELL" chart labels.
• 🛡️ Breakout Override
Enable ATR Breakout Override: Turns the momentum-shock detection system on or off.
Breakout Sensitivity: Determines how large a price jump must be (relative to the ATR) to force a trend change. Lower values trigger more aggressively.
• 🕐 Higher Timeframe
Show HTF AlphaTrend: Projects the higher timeframe data onto the current chart.
HTF Timeframe: The specific macro timeframe to monitor (e.g., Daily "D" when trading on the 1-Hour chart).
• ☁️ Cloud Fill
Show Cloud Fill: Toggles the visual buffer zone on the chart.
Cloud Reference Length: Adjusts the smoothing period of the central reference line.
Color Candles: Enables or disables the overriding of standard chart candle colors based on trend direction.
• 🔌 Webhook Execution Config
Payload Actions: Four distinct text fields where you can define the exact syntax your external bot requires for entering longs, entering shorts, closing longs, and closing shorts. These values are automatically injected into the dynamic JSON alert string.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. 指标

MACD Slope & Swing MonitorThis script is not just another MACD. It is a highly specialized momentum engine designed to quantify trend exhaustion and visualize structural pivots, making it the perfect tool for trading advanced concepts like the "Anti-Setup" (popularized by Linda Raschke) and Hidden Divergences.
While standard MACD shows you the current momentum, it often lags during complex corrections (like Elliott Wave 4th waves or Flat corrections). This indicator solves this by introducing real-time Slope Quantification and past Swing Pivot Detection.
Key Features & The Logic Behind the Mashup:
Dynamic Slope Quantification: Calculates the exact rate of change (Slope) for both the MACD and Signal lines over a user-defined lookback period. This allows traders to spot momentum decay before an actual crossover occurs. The exact values are displayed on a clean, dynamic label that tracks the current bar.
Structural Swing Detection (Pivots): Uses a 5-bar left/right lookback to plot Swing Highs and Lows directly on the oscillator. By locking these markers to the top and bottom of the pane, the script keeps the MACD lines perfectly clean. This is crucial for instantly identifying Hidden Divergences against previous structural peaks.
Custom MA Engine: Unlike standard built-in MACD, this script allows you to independently change the Moving Average type (SMA, EMA, WMA, RMA) for both the Oscillator and the Signal line. (e.g., using EMA for the oscillator and SMA for the signal to refine trade timing).
How to Use:
Trend Continuation (Hidden Divergence): Look for price to make a Lower High / Higher Low, while the MACD Swing markers show a Higher High / Lower Low.
The "Anti" Trigger: Wait for the MACD Slope to sharply reverse back toward the Signal line in the direction of the primary trend. The real-time label will confirm the momentum shift mathematically before the visual hook forms. 指标

指标

指标

Momentum Matrix [LIVE]### Introduction
Welcome to Momentum Matrix , a multi-dimensional momentum and volatility confluence engine. This indicator combines Linear Geometry (Moving Average Slope) with Derivative Volatility Breakouts (Bollinger Bands applied to a custom MACD line) to create a rigorous, two-step verification system designed to identify high-probability trend expansions while filtering out low-volume market noise and chop.
### How It Works
1. **The Core Trend (MA Angle):** The script normalizes a moving average using an Average True Range (ATR) calculation to determine its precise geometric angle. It flags the trend as bullish or bearish only when the moving average breaks past a user-defined threshold (e.g., 6°), turning flat ranges grey (**No Trade Zone**).
2. **The Volatility Trigger (MACD BB):** A custom MACD line is tracked natively against standard deviation Bollinger Bands. When momentum expands, the MACD line punches outside the bands.
3. **The Confluence Signal:** When **both** systems simultaneously turn bright green or bright red, the script prints a distinct **Confluence Dot** on the zero line, signaling an institutional momentum breakout.
---
### Key Use Cases
*🚀 **Squeeze Play & Volatility Breakout Entries***
Entering the trade on the first Confluence Dot catches the absolute beginning of a macro trend expansion.
*📈 **High-Probability Trend Following***
As long as the lines and histograms stay locked in solid green or red, it proves that the velocity of the move is being actively sustained by volume.
*⚠️ **False Breakout Filter (Staying Out of Chop)***
Many traders lose money by buying a breakout on the price chart, only for it to immediately reverse. This indicator acts as a gatekeeper. If price makes a sudden spike upward, the MACD might briefly flash green. However, if the broader Moving Average Angle remains flat and stuck in the "No Trade Zone," the indicator refuses to print a buy dot, preventing FOMO entries.
*⏱️ **Scalping with the Live Delta Dashboard***
If an asset is moving up but the live angle change starts decaying (e.g., dropping from +2.5° down to +0.2°), it signals a hidden momentum loss—alerting you to take profits before the price action actually stalls out.
---
### Key Features
* **Adaptive MA Selection:** Swap between EMA, SMA, HMA, LSMA, ALMA, and McGinley.
* **Built-in Volatility Filter:** Bollinger Bands track the MACD line directly to confirm momentum expansion.
* **Live Statistics Table:** View current trend angles and live changes on every tick.
* **Strict Non-Repainting Signals:** Confluence triggers confirm at the close of the bar to ensure historical data accuracy.
---
### Credits & Acknowledgments
This script is a customized confluence engine built upon the excellent open-source work of two brilliant developers in the TradingView community. Special thanks to:
* ** @Mango2Juice ** for the foundational logic behind the *Angle of Moving Averages* script.
* ** @Algokid ** for the original concept and design of the *AK MACD BB indicator*.
This version modernizes the calculations into Pine Script v5 , introduces a dynamic real-time tracking dashboard, and establishes a strict non-repainting mathematical handshake between both metrics. 指标

指标

指标

Harbor Reversal Ledger [JOAT]Harbor Reversal Ledger
Introduction
Harbor Reversal Ledger is an open-source reversal timing indicator that combines completed higher-timeframe candle context with confirmed local RSI divergence.
The objective is not to predict turning points early.
The objective is to wait for enough evidence that a reversal thesis is becoming structurally credible.
Many reversal tools repaint because they depend on unfinished higher-timeframe candles or unconfirmed pivot comparisons.
Harbor Reversal Ledger avoids that by:
requesting completed higher-timeframe candles only
confirming RSI pivots before evaluating divergence
scoring confluence from multiple independent ingredients
projecting higher-timeframe structure onto the execution chart
rendering a timing ledger in its own pane
Core Concepts
1. Completed Higher-Timeframe Context
The script requests prior higher-timeframe candles rather than reading the currently forming candle.
This keeps the higher-timeframe pattern engine stable and non-repainting.
2. Candle Pattern Recognition
Bullish and bearish engulfing patterns can be enabled, and pin-bar style rejection patterns can also be used.
These patterns contribute directional context, not automatic entries.
3. Confirmed RSI Divergence
Local price and RSI pivots are both confirmed using left/right pivot logic.
Only after the pivots are locked does the script compare price progression against RSI progression to determine bullish or bearish divergence.
4. Distance-to-Extreme Scoring
Reversal evidence becomes more meaningful when price is still close to a recent extreme.
The confluence engine therefore includes distance-based scoring relative to a configurable lookback.
5. Projection and Confluence Zones
Completed higher-timeframe candles can be projected forward on the execution chart, while divergence events can create local confluence zones when the evidence stack is strong enough.
Features
Completed HTF candle projection: prior higher-timeframe range and body projected onto the chart
HTF pattern engine: bullish and bearish engulfing and pin-bar style patterns
Confirmed RSI divergence: bullish and bearish divergence using pivot confirmation
Dual-pane logic: overlay objects explain price context while the pane acts as a reversal timing ledger
Confluence scoring: combines HTF pattern, local divergence, and distance-to-extreme logic
Premium/discount context: position of price relative to the HTF midpoint is plotted
Confluence zones: optional chart zones highlight stronger bullish or bearish reversal regions
State-based RSI coloring: RSI line color reflects the current net confluence
Top-right dashboard: summarizes pattern state, divergence state, confluence, and location context
Non-repainting design: no unfinished HTF candles and no unconfirmed pivot divergence
Input Parameters
Higher Timeframe Context
HTF Candle Source
Enable Engulfing Patterns
Enable Pin Bar Patterns
Project Completed HTF Candle
Projection Offset Bars
Projection Width Bars
Execution Divergence
RSI Length
Pivot Left
Pivot Right
Show Divergence Lines
Show Confluence Zones
Confluence Engine
Distance Lookback
Distance Weight
Pattern Weight
Divergence Weight
Display
Show RSI State Fill
Dashboard Position
Dashboard Size
How to Use This Indicator
Step 1: Start With the Higher-Timeframe Projection
Use the projected completed candle to understand whether the larger reference bar is signaling rejection, acceptance, or neutrality.
Step 2: Wait for Local Divergence Confirmation
The script intentionally waits for confirmed pivots.
That delay is a feature, not a flaw.
Step 3: Read the Net Confluence, Not Just RSI
The pane is not meant to be treated like a normal RSI oscillator.
Its color and context matter because they reflect the broader reversal evidence stack.
Step 4: Use Confluence Zones as Areas of Interest
Zones identify places where the higher-timeframe context and local divergence align.
They are not guaranteed turning points.
Step 5: Respect the Directional Imbalance
If the higher-timeframe candle context is strongly bearish, a minor bullish divergence alone may not be enough to justify a reversal thesis, and vice versa.
Indicator Limitations
Confirmed divergence necessarily appears after the pivot forms, which introduces intentional timing delay
Higher-timeframe pattern quality depends on the selected timeframe and instrument behavior
RSI divergence can persist without immediate reversal in strong directional markets
Projection objects are context tools, not price targets
Originality Statement
Harbor Reversal Ledger is designed as a confluence ledger rather than a single-pattern reversal marker.
Its distinguishing structure comes from pairing completed higher-timeframe candle analysis, confirmed divergence, distance scoring, projected context, and pane-based confluence visualization into one disciplined, non-repainting timing framework.
Disclaimer
This indicator is provided for educational and informational purposes only.
It is not financial advice and should not be used as a standalone reason to enter or exit a market.
All reversal readings are based on historical chart data and can fail, especially in strongly trending or event-driven conditions.
Use proper risk management and independent judgment.
指标

$crooge's - A.R.C. [Final]Overview
The A.R.C. Master (Adaptive Ratchet Channel) is a comprehensive trend-following and risk management engine designed for traders who demand precision across different asset classes. Unlike static indicators that fail when volatility spikes, the A.R.C. Master uses a dynamic "Ratchet" logic that recalibrates in real-time based on the specific Character of the asset you are trading.
Whether you are scalping NASDAQ:SNDK on the 1-minute chart or swing trading the S&P 500, this script provides a clear, institutional-grade "line in the sand" for every trade.
Key Features
1. ⏱️ Modular Strategy Horizons
No more changing settings every time you switch timeframes. The A.R.C. Master features four hard-coded modes that automatically adjust the engine’s sensitivity:
SCALP MODE (1m-2m): Ultra-tight tracking for momentum bursts.
INTRADAY MODE (5m-15m): Balanced smoothing for the "daily grind."
SWING MODE (1h-4h): Filters out intraday noise to capture multi-day trends.
TREND MODE (Daily): Focuses on major structural market shifts.
2. 💎 Asset Character Calibration
Different assets breathe differently. This script includes 10 pre-tuned presets to match the unique volatility profiles of:
INDICES: SPY, QQQ, SPX (Uses close for structural stability).
CHIPS / SEMIS: NASDAQ:SNDK , NASDAQ:NVDA , NASDAQ:MU (Optimized for high-velocity gaps).
EV SECTOR: NASDAQ:TSLA , NASDAQ:RIVN (Handles aggressive retail sentiment).
CRYPTO / BTC: Optimized for 24/7 high-beta volatility.
Also includes: Energy, Growth, Leveraged 3x, Forex, Retail, and Biotech.
3. 🏦 Institutional Volume Detection
Stop guessing where "Big Money" is entering. The script monitors volume relative to a 20-period average:
White Bar (Inst. Buy): High-volume absorption at support.
Orange Bar (Inst. Sell): Heavy distribution at resistance.
Visuals can be toggled on/off to keep your charts clean.
4. ⚙️ The "Zero-Reset" Override (New)
For specialized tickers or extreme market events, you can manually override the Volume Threshold or Scalar sensitivity.
The Power of Zero: Simply set the override to 0 to instantly revert to the optimized sector presets.
How to Use the A.R.C. Master
The Entry: Look for the Ratchet Line to flip Cyan (Bullish). Entry is highest conviction when a White Institutional Bar appears right as the price touches the Ratchet Line.
The Hold: As long as the price stays above the Cyan line, the trend is intact. The "Ratchet" will move up with the price, locking in unrealized gains.
The Exit: A candle close below the Ratchet Line (turning the line Pink) is a signal of a structural trend break. Exit or flip bias immediately.
Technical Breakdown
Core Engine: Adaptive ATR-based volatility buffer combined with dual-EMA smoothing.
Source Logic: Intelligently switches between hlcc4 (for volatile sectors) and close (for indices) to ensure you aren't stopped out by rogue wicks.
Disclaimer: Trading involves significant risk. The A.R.C. Master is a tool to assist in decision-making and does not guarantee profits. Use proper stop-losses and risk management at all times. 指标

Pan Sniper Hybrid V12.7.6 CompleteTitle: Pan Sniper Hybrid V12.8 - Multi-Strategy SMC & Volumetric Signals
Description:
Pan Sniper Hybrid V12.8 is a comprehensive trading tool designed for professional scalpers and day traders. It combines Market Structure Analysis (SMC), Volumetric Delta Analysis, and FX Market Sessions into a single, high-performance indicator.
This script is optimized for lower timeframes (1m, 5m, 15m) to identify high-probability reversal and trend-following setups.
Key Features:
Automatic Market Structure: Real-time labeling of HH, HL, LL, LH to help you identify trend shifts and institutional order flow.
Volumetric Delta Signals: Includes Bull (🐂) and Bear (🐻) signals based on real-time Volume Delta calculations from lower timeframe data.
Shark SFP (Swing Failure Pattern): The Shark (🦈) signal identifies liquidity sweeps at key structural highs and lows—perfect for catching sharp reversals.
AMD Session Boxes: Automatically plots Asia, London, and New York sessions with visual boxes (Accumulation, Manipulation, Distribution) to help you trade session highs and lows.
Dynamic Fibo Zones: Features upper and lower Fibonacci-based bands to identify overextended price levels (Overbought/Oversold).
Gaussian Trend Filter: A smooth trend-following baseline that changes color based on market momentum.
How to use:
For Scalping (1m/5m): Increase the Shark % and Pivot Lookback in settings to filter out minor price noise.
Trend Confirmation: Look for Bull/Bear signals that align with the Gaussian Filter color.
Session Trading: Use the Opening Range (Yellow/Pink lines) as a breakout or mean-reversion boundary during major market opens.
Settings Highlights:
Signal Sensitivity: Fully customizable thresholds for Bull, Bear, and Shark signals to match your risk appetite.
MACD Customization: Adjustable Fast/Slow lengths to fine-tune signal entry timing.
Disclaimer: This indicator is for educational and analytical purposes only. It does not constitute financial advice. Past performance does not guarantee future results. 指标

GS Signal Indicator Final## GS Signal Indicator — Beginner Description
* **GS Signal Indicator** helps you know when a stock is ready, still active, risky, or invalidated.
* It is best used on the **30-minute** and **1-hour** charts.
* The indicator combines trend, momentum, volume, candle strength, and risk into simple signals.
* The system now uses simple signal names:
```text
A = strongest setup
B = main buy setup
```
---
## Main Signals
* **A**
Strongest signal. Best-quality setup.
* **B**
Main buy signal. Structure and timing are both aligned.
* **A↑**
The stock was already in a trade and later upgraded to **A**.
This is usually a confirmation/hold signal, not automatically a new entry.
* **Warn**
Risk is increasing. Be careful, tighten risk, or monitor the trade.
* **Exit**
Exit or avoid. The setup is invalidated.
---
## Screener Status
* **Top A + 1H**
Best condition. 30m has **A** and 1H supports it.
* **Top B + 1H**
Strong condition. 30m has **B** and 1H supports it.
* **30m Only**
30m has **A** or **B**, but 1H is not supporting yet.
* **1H Only**
1H has **A** or **B**, but 30m is not ready yet.
* **Active**
An old **A/B** signal is still valid because no **Warn** or **Exit** appeared after it.
* **Warn**
A warning appeared after the last **A/B** signal. Do not chase.
* **Exit**
An exit appeared after the last **A/B** signal. Ignore the old signal.
The screener version you uploaded is designed to detect actionable states, keep old A/B-type signals visible while no later risk or exit appears, and mark risk/exit status after the last signal.
---
## How to Use It
* Use **30m** for entry timing.
* Use **1H** for confirmation.
* Focus mainly on:
```text
A = strongest setup
B = main buy setup
```
* Best alerts:
```text
Top A + 1H
Top B + 1H
```
* If status is **Active**, the old signal may still be valid, but do not chase if price is already far from the signal area.
* If status is **Warn**, avoid new buying unless a fresh **A** or **B** appears later.
* If status is **Exit**, the old setup is no longer valid.
---
## Simple Trading Rule
```text
Buy / Focus: A or B
Best Quality: Top A + 1H or Top B + 1H
Still Review: Active
Be Careful: Warn
Avoid / Exit: Exit
```
---
## Best Settings
* **Timeframe:** 30m or 1H
* **Display Mode:** Clean
* **Show Dashboard:** ON
* **Show Entry / Stop / Targets:** ON
* **Confirm Candle Close:** ON
Disclaimer
* This indicator is for education and analysis only.
* It does not guarantee profits.
* Always use proper risk management.
指标

RSI Predictive DivergenceRSI Predictive Divergence — Forming Divergence Detector
OVERVIEW
This indicator detects RSI divergences in two stages: a forming stage (early warning) and a confirmed stage (classic pivot-based). The forming stage is the unique component — it uses linear regression slope analysis to identify divergence conditions building up in real time, before a pivot is confirmed.
HOW IT WORKS
1. Slope Calculation
The indicator computes linear regression slopes for both RSI and price over a user-defined lookback period (default 5 bars). The price slope is ATR-normalized so that the comparison works consistently across different instruments and timeframes.
2. Slope Angles
Both slopes are converted to angles in degrees using the arctangent function. This gives a normalized way to compare RSI direction against price direction.
3. Opposition Counter
A counter tracks how many consecutive closed bars show opposing slopes (price down + RSI up = potential bullish divergence; price up + RSI down = potential bearish divergence). When the counter reaches the user-defined threshold (default 5 bars), a forming divergence is flagged.
4. Strength Score (0-100)
A composite score is calculated using three factors:
- Angle difference between RSI and price slopes (50% weight)
- Duration of slope opposition (30% weight)
- RSI zone context — oversold/overbought adds weight (20% weight)
Users can set a minimum strength threshold to filter low-quality signals.
5. Confirmed Divergence
Classic pivot-based divergence detection runs in parallel using RSI pivot highs and lows compared against price pivots. An anti-overlap gate prevents same-type labels from clustering too closely (default 8 bars minimum spacing).
NON-REPAINTING DESIGN
- All slope counters update only on confirmed bars (barstate.isconfirmed)
- Forming signals trigger only after bar close
- Confirmed divergence labels are drawn at the pivot bar, naturally
lagging by the pivot lookback period
- No lookahead_on, no future data access
INPUTS
- RSI Length, Source, Overbought/Oversold levels
- Slope lookback bars and minimum opposite-slope bars
- Minimum strength threshold for forming signals
- Pivot lookback for confirmed divergence
- Anti-overlap spacing between confirmed labels
- Label style: Compact, Icon Only, or Full
- Dashboard position, size, and compact/full mode
- Color customization for bullish, bearish, forming, and neutral states
DASHBOARD
A status table shows RSI value, RSI zone, slope angle difference, and live forming-divergence status with strength meters for both directions. Two display modes: Compact (7 rows) for minimal footprint or Full (10 rows) with detailed slope angles.
ALERTS
Four alert conditions available:
- Forming Bullish Divergence
- Forming Bearish Divergence
- Confirmed Bullish Divergence
- Confirmed Bearish Divergence
HOW TO USE
Forming divergences are early-warning signals — they indicate that divergence conditions are building. Wait for higher strength readings (60+) before acting, and combine with price-action context such as support/resistance, trend, and volume. Confirmed divergences provide
classical pivot-based signals after pivot formation. This indicator works across all timeframes.
NOTES
This is a technical analysis tool intended for educational and informational purposes. Past performance of any divergence signal does not guarantee future results. Always apply proper risk management and combine with your own trading methodology.
CREDITS
Original implementation. Uses standard RSI and pivot logic from TradingView's built-in functions combined with original slope-angle analysis methodology. 指标

Structure Bias OscillatorThis is a rebranding of the Trend Bias Oscillator in order to add clarity to the logic and intent of this indicator.
**Structure Bias Oscillator (SBO)**
**What It Does**
The Structure Bias Oscillator tells you which side of the market has structural control — and how committed price is to that direction. It watches for moments when price breaks through a recent swing high or swing low. When that happens, it locks in a directional bias and tracks where price sits within that structure's range until the opposite break occurs. It's a bias meter, not a prediction tool. It reflects what the market has already confirmed through price action.
---
**How to Read It**
The oscillator displays as a histogram running from –100 to +100, centered on a zero line.
+50 to +100 means price is deep into bullish structure. +50 and below means bullish bias is confirmed but price hasn't pushed far into the range yet. Zero means no structural break has occurred or the market is at equilibrium. –50 and above means bearish bias is confirmed but price hasn't pressed far into the range yet. –100 to –50 means price is deep into bearish structure.
Color reinforces this — bright lime at bullish extremes fading to softer green in the mild zone, bright red at bearish extremes fading to softer red, and gray when there's no active bias.
A signal line runs over the histogram to smooth out bar-to-bar noise. When the histogram crosses above the signal line, structural bias is building to the upside. When it crosses below, bearish pressure is growing.
---
**Controls**
**Bars Left** — How many bars to the left the indicator looks when identifying a swing high or low. Higher values mean only more significant, widely-spaced pivots are recognized. Lower values make it more reactive to recent swings. Default is 20.
**Bars Right** — How many bars to the right must close before a swing is confirmed. Higher values produce cleaner, more reliable pivots but add lag. Default is 5.
**Non-Repaint Mode** — When on, signals only trigger on fully closed bars. This prevents the indicator from changing its read mid-candle, which is critical for reliable alerts and backreference. Leave this on unless you have a specific reason not to. Default is on.
**Show Signal Line** — Toggles the smoothing line on or off. Turn it off for a clean histogram-only view.
**Signal Type** — How the signal line is calculated. EMA reacts fastest to recent changes. SMA weights all bars equally. WMA gives more weight to recent bars in a linear way. RMA is the smoothest and slowest, best suited for higher timeframes. Default is EMA.
**Signal Length** — How many bars go into the signal line calculation. Shorter values keep it close to the histogram. Longer values produce a smoother, slower line that filters more noise. Default is 5.
**Signal Color and Width** — Visual only. Adjust to match your chart theme and preferred line thickness.
---
**Alerts**
Two alert conditions are built in and available directly from TradingView's alert panel.
Buy Signal fires when price breaks above the most recent confirmed swing high for the first time, shifting structure to bullish. Sell Signal fires when price breaks below the most recent confirmed swing low for the first time, shifting structure to bearish.
---
**What Makes This Indicator Unique**
Most oscillators — RSI, MACD, Stochastic, and their derivatives — are momentum tools. They measure the speed or magnitude of price movement. They don't know or care about market structure. They can read bullish while price is collapsing inside a bearish structure, and bearish while price is grinding higher inside a bullish one. You're constantly having to mentally reconcile the oscillator against the chart context yourself.
The SBO skips momentum entirely. It is built exclusively around structure — specifically, breaks of confirmed swing highs and lows. It doesn't fire until structure actually changes. Once it does, the bias is locked and held until the opposite structural event occurs. This means the oscillator and the chart are always in agreement by design, not by coincidence.
The closest existing tools are the Market Structure Oscillator by LuxAlgo and the Structural Range Oscillator on TradingView. Both incorporate structure in some form. But the LuxAlgo version blends multiple timeframes with weighted period logic, making it more of a composite trend tool than a pure structural read. The Structural Range Oscillator measures price position within a range but doesn't anchor itself to confirmed break events — it adapts continuously rather than locking in on a structural shift.
The SBO does one thing the others don't: it treats a break of structure as a state change, not a score. The bias either flipped or it didn't. And once it has, every subsequent bar is measured against the range that break defined — giving you a normalized, bounded read of how far price has moved into that structural territory. That combination of event-driven bias locking and range-normalized positioning is what separates it from every other structure-adjacent tool currently available.
It also ships with a non-repaint mode on by default, which is not a given on TradingView. Most public indicators that claim non-repainting behavior bury the logic or leave it optional and off. Here it's the default — because a structural bias tool that repaints on you mid-candle is useless for anything other than chart decoration.
---
**What This Indicator Is — and Isn't**
The SBO is a structural state indicator, not a momentum oscillator. It doesn't measure how fast price is moving — it measures what structure has committed to. Once a structural break occurs, the bias holds until the opposite break happens. With non-repaint mode on, it won't change its read mid-candle.
Use it as a bias filter alongside your existing entries and exits. Confirm you're trading in the direction of active structural bias before taking a position. 指标

策略

策略

Schmitt Hysteresis Momentum [forexobroker]Schmitt Hysteresis Momentum applies a textbook control-theory Schmitt trigger to rate of change. Two ATR-scaled thresholds (one positive, one negative) form a hysteresis band: state flips up only when RoC clears the upper threshold, flips down only when RoC clears the lower. Within a held state, EMA crosses provide entry timing — multiple entries per state without flip-flop.
🔶 ALGORITHM
1. RoC = (close - close ) / close .
2. Adaptive thresholds: upper = +k * (atr / close); lower = -k * (atr / close).
3. State machine: state := +1 if RoC > upper, -1 if RoC < lower, hold previous otherwise.
4. EMA cross within state direction provides the entry trigger.
🔶 SIGNAL LOGIC
- Buy: state == +1 AND close crosses EMA up AND not already long AND cooldown elapsed AND barstate.isconfirmed.
- Sell: state == -1 AND close crosses EMA down.
- Position-lock state machine.
🔶 INPUTS
- RoC Lookback (default 10)
- Pullback EMA Length (default 8)
- Threshold k x ATR Pct (default 0.30)
- Cooldown Bars (default 4)
- Visual: dashboard, glow, EMA toggle, buy / sell colors
🔶 ALERTS
SHM Buy, SHM Sell, SHM Any Signal, SHM Bull Lock, SHM Bear Lock, SHM Upper Cross, SHM Lower Cross, SHM EMA Up, SHM Webhook JSON.
🔶 LIMITATIONS
- Hysteresis prevents flip-flop but slightly lags one-shot regime changes vs single-threshold logic.
- ATR-scaled thresholds are stationarised by atr_pct; very low-volatility periods can leave the state stuck for many bars without entries.
- RoC lookback length affects responsiveness; defaults assume 5m to 1H bars.
- This is a momentum-state engine, not a trend-strength meter; it tells you what regime you are in, not how strong it is.
指标

Trend Maturity Ladder [AGPro Series]Trend Maturity Ladder
🧠 Core Idea
Is the trend still early, healthy, mature, stretched, or vulnerable to exhaustion?
📌 Overview / What it does
Trend Maturity Ladder is a trend lifecycle visualization tool built to classify the stage of an active trend.
The script builds a staged trend ladder, maps a healthy pullback shelf, marks an invalidation shelf, tracks maturity score, evaluates extension, identifies exhaustion risk, and summarizes the current lifecycle state in an AG Pro panel.
It does not predict price direction, automate trades, or claim that a mature trend must reverse. It is a structured decision-support tool for reading trend stage, pullback quality, and late-trend risk.
🎯 Purpose & Design Philosophy
Many trend tools answer only one question:
Is price trending?
This script was built to answer a more useful question:
Where is the trend in its lifecycle?
The design goal is to help traders separate early trend development, healthy continuation, mature structure, stretched extension, and invalidation pressure.
⚡ Why This Script Is Different
Most trend tools focus on moving average direction, ribbon color, or generic trend strength.
This script does NOT act as another trend-strength meter or moving-average ribbon.
Instead, it models the trend as a ladder with stages: early trend, active trend, mature trend, stretched trend, exhaustion watch, and invalidation pressure. It combines trend alignment, slope, ADX, distance from the slow trend reference, trend age, pullback depth, and momentum risk into one visual lifecycle map.
⚙️ Methodology
1. Context Detection
The script checks fast, slow, and anchor trend alignment to determine whether the market has a bullish trend, bearish trend, or mixed structure.
2. Maturity Scoring
It scores trend age, ATR-adjusted extension, slope, ADX, and moving-average alignment to estimate how mature the trend is.
3. Pullback Evaluation
It builds a healthy pullback shelf around the trend references and checks whether price is pulling back without breaking the broader ladder.
4. Exhaustion and Invalidation Review
It identifies late-trend extension risk and invalidation pressure when price closes through the trend shelf.
5. Visual Output
The chart displays maturity ladder zones, pullback shelves, invalidation shelves, trend rails, event labels, right-side tags, alerts, and a compact AG Pro panel.
🗺️ How to Read the Chart
Trend Maturity Ladder = the active lifecycle zone around the current trend.
Healthy Pullback Shelf = the area where pullbacks can remain structurally constructive.
Invalidation Shelf = the area where the trend ladder becomes vulnerable.
Trend Rails = fast, slow, and anchor trend references.
EARLY TREND = trend alignment is fresh.
ACTIVE TREND = trend structure is aligned and still developing.
MATURE TREND = trend has aged and expanded meaningfully.
STRETCHED TREND = the trend is extended relative to its slow reference.
EXHAUSTION WATCH = maturity, extension, and momentum conditions suggest late-trend risk.
INVALIDATION PRESSURE = price has closed through the invalidation shelf.
Panel = summarizes trend stage, maturity score, direction, pullback health, exhaustion risk, age, extension, and next context.
🚦 Signals & States
• EARLY TREND → trend alignment is fresh and still developing.
• ACTIVE TREND → trend is aligned and not yet deeply mature.
• MATURE TREND → trend has aged and expanded.
• STRETCHED TREND → price is extended from the slow trend reference.
• HEALTHY PULLBACK → price has pulled into the trend shelf without invalidating it.
• EXHAUSTION RISK → maturity, extension, and momentum risk are aligned.
• INVALIDATION PRESSURE → price has closed through the invalidation shelf.
• NO CLEAR TREND → fast, slow, and anchor references are not aligned.
🔔 Alerts Logic
Alerts trigger when a major trend lifecycle state appears.
• Trend Maturity Transition → the active trend stage changes.
• Healthy Trend Pullback → price pulls into the healthy trend shelf without invalidating the ladder.
• Trend Exhaustion Risk → maturity, extension, and momentum conditions align.
• Trend Invalidation Pressure → price closes through the invalidation shelf.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The context becomes stronger when:
• Fast, slow, and anchor trend references align
• The slow reference has directional slope
• ADX supports directional structure
• Pullbacks respect the healthy shelf
• Extension is not excessively stretched
• The panel state agrees with the chart label
Late-trend caution increases when maturity, extension, and RSI pressure align.
📊 When to Use
• Trend-following review
• Pullback continuation planning
• Late-trend risk monitoring
• Crypto, stocks, futures, forex, and liquid markets
• 30m, 1H, 4H, 1D, and 1W charts
• Markets where trend structure is visible
⚠️ When NOT to Use
• Very choppy, non-directional markets
• Low-liquidity assets
• Extremely noisy micro timeframes
• Markets with frequent gaps that distort trend references
• Situations where a single trend score should not be over-interpreted
• When the user wants guaranteed entries or exits
🎛️ Key Inputs
• Fast Trend Length → controls short-term trend pressure.
• Slow Trend Length → controls the main maturity reference.
• Anchor Trend Length → filters weak or mixed trend regimes.
• ATR Length → controls ladder spacing, extension scoring, and label offsets.
• Early Trend Max Age → defines how long a fresh trend can remain early.
• Mature Trend Age → defines when age contributes strongly to maturity.
• Stretched Distance ATR → defines when trend extension becomes stretched.
• Healthy Pullback Width ATR → controls the pullback shelf thickness.
• Invalidation Shelf ATR → controls the distance of the invalidation shelf.
• Exhaustion RSI Level → adds momentum pressure to exhaustion-risk logic.
🖥️ Interface & Visual Design
The visual hierarchy is built around the trend lifecycle:
The ladder shows the active maturity zone.
The pullback shelf shows where continuation can be evaluated.
The invalidation shelf shows where the trend becomes vulnerable.
Event labels mark lifecycle transitions and risk states.
Right-side tags keep the current trend stage visible.
The AG Pro panel compresses the current trend lifecycle into a fast, readable summary.
🧪 Practical Usage Workflow
1. Read the panel trend stage.
2. Check whether trend direction is aligned.
3. Locate the healthy pullback shelf.
4. Watch whether price respects or breaks the shelf.
5. Check maturity score and exhaustion risk.
6. Confirm with market structure, liquidity, volume, and risk planning.
🔍 Interpretation Guidelines
An early trend does not guarantee continuation.
A mature trend does not guarantee reversal.
Exhaustion risk does not mean price must immediately turn.
Invalidation pressure means the current ladder structure has weakened.
The script is best used to understand trend lifecycle context, not to replace independent analysis.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not financial advice.
It is not an auto-trading system.
It does not provide guaranteed entry or exit signals.
It is not a moving-average ribbon or a simple trend-strength meter.
⚠️ Limitations & Transparency
Trend stages depend on timeframe.
Choppy markets can create frequent stage changes.
Strong news moves can stretch trend references quickly.
Low-liquidity markets may create unreliable trend readings.
Different assets may require different trend lengths.
🧠 Market Context Notes
Trends often move through recognizable phases:
alignment → expansion → maturity → extension → pullback or invalidation.
This script visualizes that sequence so the user can avoid treating every trend as equally fresh.
🧾 Use Case Examples
If trend references align shortly after a transition, the script may classify EARLY TREND.
If price pulls into the shelf while the ladder remains intact, the script may mark HEALTHY PULLBACK.
If the trend becomes aged and extended while RSI is stretched, the script may mark EXHAUSTION RISK.
If price closes through the invalidation shelf, the script may mark INVALIDATION PRESSURE.
🧱 System Philosophy
The goal is not to chase trend strength.
The goal is to understand trend timing.
This script treats trend as a lifecycle:
early → active → mature → stretched → vulnerable.
🔐 Non-Promise Statement
No trend stage guarantees future price direction.
No pullback shelf guarantees continuation.
No exhaustion label guarantees reversal.
All outputs should be interpreted as analytical context.
📉 Risk Disclosure
Trading involves risk.
This script is for educational and analytical purposes only.
It does not provide financial advice, investment advice, or guaranteed trading outcomes.
Users are fully responsible for their own decisions, risk management, and trade execution.
📚 Educational Note
Use the script to study where trends tend to age, stretch, reset, or fail.
The most important question is not only whether a market is trending.
The better question is whether the trend is still fresh enough to deserve attention.
指标

AI SMC Pro v2AI SMC Order Flow Pro v2.0 is an advanced Smart Money Concepts indicator combining ICT methodology, multi-timeframe analysis, Bayesian AI scoring, and order flow estimation — all in a single non-repainting overlay.
Core Features:
BOS & CHoCH structure detection
Bullish & Bearish Order Blocks (auto-invalidation)
Fair Value Gaps (auto-fill detection)
Liquidity levels (LQH / LQL)
Premium & Discount zones
Session High/Low (Asia, London, New York)
Support & Resistance (50-bar dynamic)
AI Engine:
Bayesian confidence score (0–100%) combining trend, momentum, MACD, volume, structure, order flow, MTF bias, session and zone
Three modes: Conservative / Balanced / Aggressive
Order Flow Module:
Estimated buy/sell pressure
Estimated delta & cumulative delta
Volume spike detection
Signals:
LONG / SHORT entries with SL, TP1, TP2
ATR-based risk management (customizable multipliers)
Minimum R:R filter (1:2 / 1:3 / 1:4)
Session filter (London & New York only)
MTF confirmation required
Built-in Backtest:
Win rate, Profit Factor, Expectancy
Max win/loss streak
Trailing stop & Break-even options
Best used on: EUR/USD · GBP/USD · 15m timeframe during London or New York session. 指标

[3Commas] Trail Hunter - Indicator Trail Hunter - Indicator
🔷 What it does:
This indicator visualizes a long-only mean-reversion signal framework on liquid instruments. It marks dual-confluence entry signals (MA cross-under + CCI oversold), tracks a virtual deal lifecycle on the chart with trailing take-profit and hard stop loss management, and exposes webhook-ready alerts for automated execution through an external DCA Bot. No orders are placed by the indicator itself — it is a pure signal and visualization layer.
Base Order signal: SMA(24) crosses below SMA(31) on 1h (default) AND CCI(11) on 1h crosses below −80
Exit signal: trailing take-profit activated at +1.5% with 0.05% trailing deviation, or hard stop at −3.25%
Single entry per cycle — no averaging, no safety order ladder
On-chart virtual P&L tracker: Net Profit, Max Drawdown, Trades, Win Rate, Profit Factor
🔷 Who is it for:
Bot operators who need a visual confirmation layer for automated mean-reversion execution.
Discretionary traders who use dual-indicator confluence logic manually and want clear on-chart triggers.
Free-tier TradingView users who want access to the same signal logic as the Strategy version without requiring backtest functionality.
Cross-instrument testers who run the same signal framework across crypto perpetuals, spot pairs, and equity tickers.
🔷 How does it work:
Long Entry: A long signal fires when two conditions align within a configurable keep-alive window — SMA(24) crosses below SMA(31) on the signal timeframe AND CCI(11) drops below −80 on the same timeframe. The indicator marks the entry with a green "L" triangle below the bar and stores the entry price as the reference for the trailing exit.
Short Entry: Not used — long-only signal framework by design.
Exit Management: Two exit conditions are armed simultaneously after entry. The trailing exit activates when price reaches Entry × (1 + Take Profit %), then follows the highest price reached with the deviation gap; if price retraces by the deviation amount from peak, the indicator marks the exit with a cyan diamond. The hard stop closes the virtual deal if price drops to Entry × (1 − Stop Loss %). Whichever condition fires first wins. The virtual P&L tracker captures the realized return at the actual fill price (peak − deviation for trail; SL price for stop).
🔷 Why it's unique:
Dual-indicator confluence — neither signal acts alone. The MA cross-under confirms short-term momentum exhaustion against the medium-term trend, and the CCI extreme confirms statistical oversold conditions. Requiring both filters out single-indicator false positives common to either condition during sideways regimes. Configurable keep-alive window (default 3 bars) lets the two confirmations align without requiring exact same-bar synchronization.
Trailing-exit architecture with full peak-tracking — the indicator computes the running peak from entry and triggers exit only when price retraces by the configured deviation from that peak. This is a true trailing simulation, not a fixed take-profit shortcut, and produces stats that match the underlying Strategy version closely.
Bot Integration — entry and exit alerts ship with webhook-ready JSON payloads, enabling direct trigger of a connected DCA Bot. Bot ID, Email Token, and pair label are exposed as inputs and automatically embedded into the alert message format.
🔷 What you'll see on the chart:
Cyan line — Fast MA on the signal timeframe (default SMA 24)
Orange line — Slow MA on the signal timeframe (default SMA 31)
Orange triangle (above bar) — MA cross-under signal fired
Cyan triangle (below bar) — CCI cross-under −80 signal fired
Green "L" triangle (below bar) — Combined entry signal armed; virtual deal opens
Cyan diamond — Trailing TP, fixed TP, or hard SL triggered; virtual deal closes
Cyan line (when in deal) — Entry price reference
Lime line (when in deal) — Trailing TP activation level
Red line (when in deal) — Stop Loss level
Stats card (top-left, configurable) — Live virtual backtest results: Net Profit, Max Drawdown, Total Trades, Win Rate, Profit Factor
🔷 Considerations Before Using the Indicator:
Market & Timeframe: Designed for 1-hour base charts on liquid instruments with frequent MA crossings — major crypto perpetuals (BTC, ETH, SOL), spot pairs on Coinbase and Bybit, and high-volume equities. The signal timeframe is independent of the chart timeframe — you can run on a 15m chart with 1h signals if you want fine-grained visualization with structural signal timing.
Limitations: The indicator does not place orders. It tracks a "virtual deal" state on the chart for visualization purposes only — actual execution must be performed through a connected bot or manually. This is a single-entry framework with no averaging, so a wrong entry caps at the −3.25% hard stop without recovery. The strategy carries no higher-timeframe regime filter, so it can signal long entries during sustained downtrends. For deployment in bearish regimes, consider gating the alerts manually with a higher-timeframe trend filter.
Virtual P&L Accuracy: The on-chart stats card uses a simplified internal accounting model — it does not factor exchange commission or slippage. The trailing exit simulation uses peak-tracking on the chart bar's high, which is an approximation of real intra-bar execution. Use the Strategy version for fee-adjusted backtest results.
Backtesting & Demo Testing: Always validate the signal framework on historical data before connecting to a live bot. The companion Strategy version of this script is available on the same profile for full backtest analysis with realistic commissions and slippage. Demo-trade for at least one month to observe behavior in conditions not represented in historical data. Past performance is not indicative of future results.
Parameter Adjustments: MA lengths, CCI threshold, signal timeframe, take-profit activation, trailing deviation, and stop loss should all be tuned per instrument volatility profile. Lower-volatility instruments work better with tighter MA pair, lower CCI threshold, and smaller trailing deviation. Higher-volatility instruments need wider parameters.
🔷 Backtest Validation:
This indicator shares identical signal logic with the Strategy version of the same framework, available on this profile for full historical performance review with realistic commission and slippage:
Strategy version:
Reference results from the Strategy version on COINBASE:BTCUSD, 1h chart, tested period May 12, 2025 — May 12, 2026:
Net Profit: +13.09 USD (+0.13%) | Max Drawdown: 7.91 USD (0.08%) | Total Trades: 66 | Win Rate: 69.70% (46/66) | Profit Factor: 1.254
The strategy is positioned as a capital-preservation framework — extreme drawdown control (under 0.1% on the tested window) with positive expectancy. Refer to the Strategy publication for the complete equity curve, trade-by-trade breakdown, and Strategy Tester report.
🔷 How to Use It:
🔸 Adjust Settings: Configure the MA lengths, CCI threshold, signal timeframe, and exit parameters for the instrument you intend to trade. Defaults are calibrated for 1-hour BTC Spot on Coinbase. For lower-volatility instruments, tighten the MA pair and lower the trailing deviation; for higher-volatility instruments, do the opposite. The Initial Capital input (default 10,000) is used only for percentage calculations in the stats card — it does not affect signal logic.
🔸 Visual Confirmation: Use the on-chart projections (entry line, TP activation, SL level) to verify that the active virtual deal aligns with your bot's actual position. The indicator's virtual deal state is a 1-to-1 mirror of the Strategy version's signal logic, so any divergence between chart visuals and bot position is a flag for investigation. The MA and CCI signal triangles let you trace exactly when each condition fired in the entry stack.
🔸 Create alerts to trigger the DCA Bot: Two alert events are exposed by the indicator — "Deal Start" fires on each new combined entry signal, and "Deal Close" fires when any of the three exit conditions (trailing TP, fixed TP, or stop loss) triggers. Configure both alerts in TradingView with the webhook URL pointing to your DCA Bot's signal endpoint. The Bot ID, Email Token, and Pair label can be set in the script's inputs and are automatically embedded into the alert JSON payload.
🔷 INDICATOR SETTINGS
MA Type — Moving average type for entry calculation (SMA or EMA).
Fast MA Length — Period of the fast moving average (default 24).
Slow MA Length — Period of the slow moving average (default 31).
MA Cross Timeframe — Timeframe on which the MA cross is computed.
Use MA Cross signal — Toggle the MA condition on or off in the entry stack.
CCI Length — Period for the CCI indicator (default 11).
CCI Oversold Threshold — Value below which CCI must cross to qualify as oversold (default −80).
CCI Timeframe — Timeframe on which the CCI cross is computed.
Use CCI signal — Toggle the CCI condition on or off.
Combine Signals — AND requires both conditions within the keep-alive window; OR fires on either alone.
Signal Keep-Alive (bars) — Number of bars within which both signals must align for AND mode (default 3).
Base Order Volume (USDT, ref) — Reference notional for virtual P&L calculation.
Take Profit % (activation) — Profit level at which the trailing exit arms.
Enable Trailing — Toggle trailing behavior on the take-profit exit.
Trailing Deviation % — Distance from the peak price at which the trailing exit fires.
Enable Stop Loss — Toggle the hard stop loss on or off.
Stop Loss % (from entry) — Maximum acceptable loss from entry price.
Initial Capital (ref for % calc) — Reference capital base for percentage metrics in the stats card.
Visual Layer toggles — Show/hide MA lines, entry line, TP/SL lines, signal triangles.
Stats card / Watermark — Display layer controls for on-chart virtual backtest summary and branding.
Webhook — Bot ID, Email Token, and Pair label for DCA Bot signal routing.
👨🏻💻💭 We hope this tool helps enhance your trading. Your feedback is invaluable, so feel free to share any suggestions for improvements or new features you'd like to see implemented.
__
The information and publications within the 3Commas TradingView account are not meant to be and do not constitute financial, investment, trading, or other types of advice or recommendations supplied or endorsed by 3Commas and any of the parties acting on behalf of 3Commas, including its employees, contractors, ambassadors, etc. 指标

Lempel Ziv Trend Coder [forexobroker]Lempel Ziv Trend Coder encodes the recent sign sequence of price changes into 3-bit (sign , sign , sign ) windows and tracks the frequency distribution of the eight resulting patterns. When one pattern dominates the share, the price sequence is structurally biased — that is the trending regime. Direction comes from the up-bar fraction.
🔶 ALGORITHM
1. For each k in , encode (b0, b1, b2) where bi = close > close .
2. Increment count where p = b0 * 4 + b1 * 2 + b2 (0..7).
3. dominance = max(count) / sum(count). Uniform random = 0.125.
4. Trending regime when dominance >= threshold.
5. Direction bias from up-bar fraction in the same window.
🔶 SIGNAL LOGIC
- Buy: trending AND up-fraction > 0.5 AND close crosses EMA up AND not already long AND cooldown elapsed AND barstate.isconfirmed.
- Sell: trending AND up-fraction < 0.5 AND close crosses EMA down.
- Position-lock state machine.
🔶 INPUTS
- Sign Window (default 40)
- Pullback EMA Length (default 8)
- Min Dominance (default 0.20)
- Cooldown Bars (default 4)
- Visual: dashboard, glow, EMA toggle, buy / sell colors
🔶 ALERTS
LZT Buy, LZT Sell, LZT Any Signal, LZT Trend Start, LZT Chop Start, LZT Very Trendy, LZT Very Choppy, LZT EMA Up, LZT Webhook JSON.
🔶 LIMITATIONS
- 3-bit encoding ignores bar magnitude; a tiny tick contributes the same as a large move.
- "Distinct patterns observed" alone saturates at 8 quickly with N >= 40 bars; dominance is a more discriminative measure but still coarse.
- LZ true complexity is closer to a substring count than a pattern-frequency count; this is a tractable approximation.
- Direction comes from up-fraction, not the LZ measure itself; in true random regimes the direction signal is meaningless and the regime gate correctly mutes signals.
指标

指标

WaveTrend XWaveTrend X (WVTX)
A WaveTrend rebuild from first principles. Where the classic WaveTrend ( LazyBear ) normalizes its Channel Index by an arbitrary 0.015 constant inherited from CCI and smooths the result with double exponential moving averages, WVTX replaces both with components that adapt to the data:
The CI normalization uses rolling standard deviation instead of 0.015.
The smoothing uses a 1-D Kalman filter with ATR-adaptive process noise instead of double-EMA.
The fixed ±60 / ±53 OB/OS bands become adaptive rolling-percentile bands.
Signals are gated by a Hurst regime proxy (mean-reversion vs trending) and a Shannon entropy filter (noise suppression).
Liquidity quality scales line opacity so low-volume readings visually fade.
All markers fire only on confirmed bars — explicitly no-repaint.
The default channel and signal periods are tuned for slower, more structural use than classic WaveTrend — see the Notes section for how to revert to classic intraday WT speeds.
How it works
The oscillator is built in five layers:
1. Channel Index (std-normalized). The standard WaveTrend CI is price's deviation from a moving average, normalized by a hard-coded constant. WVTX uses:
CI = (src − anchor) / stdev × 50
The anchor is VWMA (default) or EMA over the channel period. The stdev is computed over the same window. The constant disappears — the oscillator's amplitude now reflects actual recent volatility, not a one-size-fits-all multiplier.
2. Kalman smoothing. A 1-D Kalman filter replaces the double-EMA that produces the WT1 line in classic WaveTrend. The filter balances two tunable noise terms:
Process noise Q — how much you trust the CI to change between bars. Higher = faster, less smooth.
Measurement noise R — how much measurement error you assume. Higher = smoother, more lag.
With ATR-adaptive Q enabled (default), Q scales with normalized ATR — so the filter responds faster in volatile conditions and smooths harder in calm ones. This addresses classic WaveTrend's weakness of being either too slow during impulsive moves or too noisy during chop, never both right at once.
WT2 is then a longer EMA of WT1 (the signal line, classic WaveTrend convention).
3. Hurst regime proxy. A two-window standard-deviation ratio approximates the Hurst exponent:
H ≈ log₂(stdev(src, n) / stdev(src, n/2))
H > 0.5 = trending (volatility grows faster than √n); H < 0.5 = mean-reverting; H ≈ 0.5 = random walk. The configurable dead-band around 0.5 prevents constant regime-flipping near the boundary.
Signals are gated accordingly: in trending regimes, both cross directions are allowed; in mean-reverting regimes, signals only fire from the extremes (WT1 in the bottom or top 30%) where reversion probability is structurally elevated.
4. Shannon entropy noise gate. The recent return distribution is binned into 8 equal-width bins, and Shannon entropy computed:
H = −Σ pᵢ · log(pᵢ) / log(N_bins)
Bounded . Low entropy = concentrated return distribution (structured market); high entropy = uniform distribution (random/noise). When entropy exceeds the configured maximum (default 0.72), signals are suppressed — the oscillator stops emitting markers in conditions where the return statistics suggest no exploitable structure.
5. Adaptive OB/OS. Instead of fixed thresholds, OB and OS bands are the configurable percentiles (default 82% and 18%) of WT1's distribution over a rolling window. The bands move as the oscillator's range shifts — useful for instruments whose volatility regime changes substantially over time.
How to read it
Three lines and an area:
WT1 (main oscillator) — colored by its rolling percentile rank. Cool teal at the high extreme, slate near the middle, coral at the low extreme.
WT2 (signal line) — light slate, follows WT1 with EMA lag.
Diff = WT1 − WT2 (area) — teal area above zero, coral below. Visualizes the momentum between WT1 and the signal line.
Adaptive OB and OS bands are colored by direction (coral above, teal below), with tinted fills extending to the ±50 boundaries.
Background regime tint:
Teal — trending regime (Hurst above the band)
Purple — mean-reverting regime (Hurst below)
No tint — neutral / random walk
Entropy trace (amber, optional) — recentered around zero and scaled for visibility in the same pane. Above zero = recent returns more random than baseline; below zero = more structured.
Signal markers:
Teal triangle below pane — confirmed bullish cross (WT1 crosses up WT2, entropy structured, regime allows, WT1 in lower half)
Coral triangle above pane — confirmed bearish cross (same gates, opposite direction, WT1 in upper half)
Markers fire only on closed bars. There is no intra-bar signal display, by design.
Inputs
Price source — default hlc3.
Channel period — lookback for the VWMA/EMA anchor and stdev normalization. Default 40.
Signal period — EMA period for the WT2 signal line. Default 16.
VWMA anchor — use VWMA instead of EMA as the price anchor. Default on.
Kalman Q / R — process and measurement noise. Defaults 0.02 / 0.8.
ATR-adaptive Q — scale Q with normalized ATR. Default on.
Hurst regime gate / window / band — toggle, window, dead-band around 0.5. Defaults on / 60 / ±0.05.
Entropy noise gate / window / max — toggle, window, entropy ceiling. Defaults on / 40 / 0.72.
Liquidity quality scale / window — fade line opacity by recent volume rank. Defaults on / 50.
OB/OS rank window / overbought / oversold percentile — sets the adaptive bands. Defaults 100 / 82% / 18%.
Regime background / entropy trace — display toggles.
Built-in alerts
Bull cross — confirmed bullish crossover, gates passed
Bear cross — confirmed bearish crossover, gates passed
Bull cross, deep OS — bull cross from below the 20th percentile (high-quality setup)
Bear cross, deep OB — bear cross from above the 80th percentile (high-quality setup)
Trending regime — Hurst transitions into the trending zone
Mean-rev regime — Hurst transitions into the mean-reverting zone
The two "deep" alerts are the most actionable — a confirmed cross from the extremes of the rolling distribution is structurally more interesting than a cross near the middle.
Notes
The classic LazyBear WaveTrend uses channel period 10 and signal period 21 — fast, oscillator-style behavior suited to intraday momentum trading. WVTX's defaults are 40 and 16, four times slower. This is deliberate: with adaptive smoothing (Kalman + ATR), liquidity scaling, and entropy/regime gating layered on top, fast periods produce too many marginal signals for the gates to filter cleanly. Slower periods produce fewer but more structural crosses, which is where the gates earn their keep. If you want classic intraday WaveTrend behavior, set channel period to 10 and signal period to 21 — the math still works, just with more frequent (and noisier) output.
The Kalman smoother is the most consequential of the rebuilds. Classic WaveTrend's double-EMA introduces predictable lag that traders learn to anticipate; the Kalman filter's adaptive smoothing means the lag isn't constant — it tightens in fast moves and relaxes in chop. For mean-reversion traders, this means signal markers are closer to the actual reversal pivot. For trend-followers, it means the oscillator follows directional moves more responsively.
The Hurst regime gate makes the indicator behave differently in different markets. In a trending instrument (most major indices in their secular uptrends), the gate is permissive — crosses fire freely. In a mean-reverting instrument (ranging FX pairs, sideways equities), the gate restricts crosses to the extremes of the rolling distribution, where reversion probability is highest. The dead-band around 0.5 prevents flickering when the regime is ambiguous.
The entropy gate is the most novel filter. It asks a different question from regime detection: not "what kind of market is this" but "is there any structure in the recent return distribution?" When entropy is high (close to 1.0), the distribution looks essentially uniform — no recurring pattern for an oscillator to exploit. The gate stops signals from firing in those conditions, which historically catches a lot of false WaveTrend crosses during news-driven chop.
The adaptive OB/OS bands are tuned for traders who switch between instruments. Fixed ±60/±53 levels work fine on a single instrument with stable volatility; they're systematically wrong on instruments whose volatility regime changes substantially. Percentile bands self-calibrate, so the same indicator settings work across SPY, BTC, and EURUSD without manual retuning.
The non-repaint design is enforced by barstate.isconfirmed — signals fire only when the bar has closed and won't be revised. Intra-bar, you may see WT1 approaching a cross; the marker only appears once the bar closes with the cross confirmed. The conservative choice: signals you can rely on for backtesting and live execution, at the cost of waiting until the bar ends.
This is a signal generator with multiple filtering layers — but a signal is information, not an instruction.
Five years of work on a trading system left me with dozens of indicators that ultimately didn't earn a place in the final build. They're not failures — they're tools that solved problems I no longer needed solved. So instead of shelving them, I'm publishing the majority of them open-source.
If you're a discretionary trader, take what's useful. If you're a systems builder, the source is yours to dissect, modify, and improve. The best return on five years of work is for it to keep working — for someone.
If you use this script — or part of it — in your own work, please credit the original with a link back to my profile.
Note: these indicators have been updated to Pine Script v6 — some manually, some with AI assistance. 指标

指标
