Jensen's Inequality + Kelly LeverageThis indicator reveals how volatility drag erodes returns through Jensen's Inequality and calculates scientifically optimal leverage levels using the Kelly Criterion. It answers the question: "At what leverage does volatility drag destroy more returns than leverage creates?"
I have created other indicators related to optimal leverage, Kelly Criterion and Jensen's inequality which you can fin in the comments.
Understand Jensen's Inequality
Jensen's Inequality is a theorem stating that for concave functions (like logarithms or sad face), the expected value of the function is less than the function of the expected value:
E ≤ log(1+E )
What this means for investors is that your realized geometric return (what you actually earn through compounding) is always less than your arithmetic average return. This gap is called volatility drag.
The drag formula: Drag = L² × σ² / 2
The quadratic term (L²) is crucial because if you double your leverage, quadruple your drag. This helps us to understand how much leverage we can take during volatile times (for example leveraged ETFs).
Understand Kelly Criterion
The Kelly Criterion, developed by John Kelly at Bell Labs in 1956, calculates the optimal bet size (or leverage) that maximizes long-term logarithmic growth of wealth:
Kelly = (μ - r_f) / σ²
Where:
μ = arithmetic return (expected return)
r_f = risk-free rate
σ² = variance (volatility squared)
Kelly tells you the exact leverage that balances return amplification against volatility drag to maximize your long-term compound growth rate.
Why I Combine Both?
Jensen's Inequality explains why leverage has, after a certain point, diminishing returns and eventually becomes destructive. Volatility drag grows faster than return amplification. The Kelly Criterion tells you exactly where the optimal point is before drag overwhelms your gains.
Together, they provide:
Jensen: How much drag you're experiencing
Kelly: What leverage maximizes your growth
Both: Where leverage becomes dangerous
The Math Behind It
Geometric return formula:
r_geometric = L × r_arithmetic - (L² × σ²) / 2
This shows the tug-of-war between leverage amplification (L × r_arithmetic) and drag (L² × σ²/2).
Maximum survivable leverage:
L_max = 2 × r_arithmetic / σ²
At this point, drag completely cancels out returns (geometric return = 0). Beyond this, you're guaranteed to lose money over time.
How To Read The Chart
Y-axis: Geometric returns (%) - what you actually earn after accounting for drag
Colored lines: Expected returns at different leverage levels over time
Green line (1.0x): Unleveraged baseline
Orange/Red lines (2x/3x): Higher leverage scenarios
Blue circles: Kelly optimal leverage level
Red label at zero: Max survivable leverage (breakeven point)
The Table Breakdown
Jensen's Inequality (1x & 2x): Side-by-side comparison demonstrating:
How drag scales quadratically (1.99% → 7.96% when leverage doubles)
The verification that L×E - Drag = Realized Return
Optimal Leverage: Kelly calculations with fractional variants
Full Kelly: Theoretically optimal but aggressive
0.75x, 0.5x, 0.25x Kelly: Conservative risk management
Sharpe Optimal: Maximizes risk-adjusted returns
Max Leverage: Your "game over" threshold
Leverage Scenarios: Detailed comparison of 1x, 2x, 3x positions showing geometric returns, drag costs, and Sharpe ratios
Practical Insights
Low volatility assets: Higher Kelly → can handle more leverage safely
High volatility assets (crypto for example): Lower Kelly → even 2x can be destructive
Current market regime matters: The indicator adapts to changing volatility conditions
Fractional Kelly is wisdom: Full Kelly assumes perfect parameter estimates (which we never have)
Settings
Risk-free rate: Auto-fetches FRED:DGS3MO (3-month T-Bills) or manual override
Log returns: Enabled by default for mathematically accurate compounding
Display options: Toggle curve/table, adjust positioning and font sizes
Lookback period: Adjustable from 50 to 1500 bars
As you should know by now, leverage is a double-edged sword. This indicator shows you exactly where the edge cuts both ways, helping you find the sweet spot between aggressive growth and mathematical ruin.
Let me know if you have any suggestions.
- Henrique Centieiro Indicator

Indicator

Indicator

Indicator

VWAP Volume Analyzer (Wyckoff) | Capitan-TradingMost traders focus only on price.
But price shows what happened , not necessarily why it happened .
Volume reveals participation.
The Anchored VWAP Volume Analyzer (Wyckoff Concept) is designed to help traders visualize market participation and better contextualize price movements using anchored volume analysis and VWAP-based structure.
Inspired by Wyckoff principles , this indicator focuses on the relationship between price, effort, and participation , helping traders assess whether a move is supported by real market participation or simply driven by short-term volatility.
Instead of relying on traditional volume bars that only color based on the candle close, this tool analyzes the internal structure of each candle to provide a more realistic interpretation of buying and selling pressure.
The objective is simple:
to offer a clearer and more informative way to read market behavior.
---
Key Features
Anchored VWAP with Dynamic Value Ribbon
At the core of the indicator is a user-anchored VWAP .
Around it, the script plots a dynamic ribbon based on standard deviation , representing the value area of the selected range.
The ribbon adapts to price positioning relative to VWAP, helping visualize directional bias and potential reaction zones .
---
Smart Volume Parsing
The script separates dominant buying or selling pressure from minor internal activity using a True Range based proxy calculation .
This provides a clearer view of intrabar participation compared to traditional volume indicators.
---
Reactivity Engine
Beyond historical anchored volume, the indicator measures recent participation momentum using a configurable lookback period .
This helps distinguish fresh market activity from older historical volume.
---
Quantitative Candle Colorization
Chart candles can optionally synchronize with the underlying volume structure, highlighting phases of:
• Accumulation
• Distribution
• Neutral market conditions
---
On-Chart Dashboard
A compact HUD dashboard displays key metrics directly on the chart:
• Net Volume
• Smart Net Volume
• Buy vs Sell pressure
• Distance from the anchored VWAP
This allows traders to quickly evaluate market participation without leaving the chart.
---
How to Use It
Simply anchor the indicator to a meaningful market point, such as:
• a significant swing high or swing low
• the start of a trading session
• the beginning of a structural move
• the start of a range or consolidation phase (Wyckoff Phase A)
From there, observe how price behaves around the VWAP and how participation evolves within the value ribbon.
---
This is the LITE version of the Capitan Trading quantitative suite.
Designed to remain clean, fast and practical while offering a professional perspective on volume-based market context and Wyckoff-style analysis .
Disclaimer: This indicator is a technical analysis tool and does not constitute financial advice.
________________________________________________________________________
# VERSIONE ITALIANA
Descrizione
Molti trader osservano soltanto il prezzo.
Ma il prezzo mostra cosa è successo , non sempre perché è successo .
I volumi rivelano la partecipazione del mercato.
L’ Anchored VWAP Volume Analyzer (Wyckoff Concept) è progettato per aiutare i trader a visualizzare la partecipazione del mercato e a contestualizzare meglio i movimenti del prezzo attraverso un’analisi volumetrica ancorata basata sul VWAP.
Ispirato ai principi di Wyckoff , questo indicatore si concentra sulla relazione tra prezzo, sforzo e partecipazione , aiutando a capire se un movimento è sostenuto da una reale attività di mercato oppure se è semplicemente guidato da volatilità di breve periodo.
Invece di affidarsi alle classiche barre di volume colorate solo in base alla chiusura della candela, questo strumento analizza la struttura interna di ogni candela per fornire una lettura più realistica della pressione di acquisto e vendita.
L’obiettivo è semplice:
offrire un modo più chiaro e informativo per leggere il comportamento del mercato.
---
Caratteristiche principali
VWAP ancorato con Value Ribbon dinamico
Il cuore dell’indicatore è un VWAP ancorabile dall’utente .
Attorno ad esso viene tracciato un ribbon dinamico basato sulla deviazione standard che rappresenta la value area del range selezionato.
Il ribbon si adatta alla posizione del prezzo rispetto al VWAP, aiutando a visualizzare bias direzionale e possibili zone di reazione .
---
Analisi intelligente dei volumi
Lo script separa la pressione dominante di acquisto o vendita dall’attività interna minore utilizzando un proxy basato sul True Range .
Questo consente una lettura più chiara della partecipazione intrabar rispetto ai classici indicatori di volume.
---
Motore di reattività
Oltre al volume storico ancorato, l’indicatore misura anche il momentum recente della partecipazione utilizzando un periodo di lookback configurabile .
Questo aiuta a distinguere l’ attività più recente dal volume storico passato.
---
Colorazione quantitativa delle candele
Le candele del grafico possono essere sincronizzate con la struttura volumetrica sottostante, evidenziando fasi di:
• Accumulo
• Distribuzione
• Neutralità
---
Dashboard sul grafico
Una dashboard compatta mostra direttamente sul grafico alcune metriche chiave:
• Volume netto
• Smart Net Volume
• Pressione Buy vs Sell
• Distanza dal VWAP ancorato
Questo permette di valutare rapidamente la partecipazione del mercato senza lasciare il grafico.
---
Come utilizzarlo
È sufficiente ancorare l’indicatore a un punto rilevante del mercato, ad esempio:
• un massimo o minimo significativo
• l’ inizio di una sessione di trading
• l’ inizio di un movimento strutturale
• l’ inizio di una zona di range o consolidamento (Fase A, Wyckoff)
Da quel momento è possibile osservare come il prezzo reagisce attorno al VWAP e come evolve la partecipazione all’interno del ribbon.
---
Questa è la versione LITE della suite quantitativa Capitan Trading.
Pulita, veloce ed essenziale per offrire una lettura professionale del contesto di mercato attraverso analisi dei volumi e logica Wyckoff .
Disclaimer: Questo indicatore è uno strumento di analisi tecnica e non costituisce consiglio finanziario. Indicator

Weekly Distribution Levels█ OVERVIEW
Weekly Distribution Levels plots standard deviation bands around the weekly open price, showing where the current week's move stands relative to its historical distribution. It answers the question: "How far has price moved this week compared to what's normal?"
Works on any instrument — futures, stocks, forex, crypto. No hardcoded statistics. Everything is computed dynamically from the chart's own price history.
█ HOW IT WORKS
At the start of each trading week, the indicator:
Captures the weekly open price
Retrieves the standard deviation of weekly net moves (close − open) from the previous N weeks
Projects symmetrical levels above and below the open at configurable deviation intervals (±0.5σ, ±1.0σ, ±1.5σ, ±2.0σ, etc.)
These levels represent the statistical boundaries of "normal" weekly price movement. A move beyond ±1σ is getting extended. Beyond ±2σ is rare. The dashboard shows your current deviation reading in real time (e.g., +0.72σ).
█ TWO CALCULATION METHODS
StdDev (Close − Open) — Default. Measures the variability of weekly net moves (where the week closed relative to where it opened). This captures directional tendency and is more useful for gauging how far the current week might travel from open to close.
Avg Weekly Range — Measures the average weekly high-to-low range. This captures total weekly volatility regardless of direction. Produces wider bands since ranges are always larger than net moves.
█ THE TURN ZONE
A shaded area around the ±0.5σ level (configurable). This is the zone where price statistically tends to reverse or consolidate during a typical week. Think of it as the boundary between "normal weekly noise" and "directional commitment."
Inside the zone: Price is doing nothing unusual — wait for direction
Breaking out of the zone: The week is starting to trend — look for continuation
Reaching ±1.5σ or beyond: Extended move — watch for exhaustion or reversal setups
█ FEATURES
Levels & Labels
Weekly open line with customizable color, style, and width
Upper (+) and lower (−) deviation levels with separate colors
Labels show deviation value and actual price (e.g., "+1.0 (21,450)")
Configurable max deviation (0.5 to 5.0) and step size (0.25 to 1.0)
Optional gradient opacity — levels get more intense further from open
Dashboard (info table)
Calculation method and lookback period
Current 1σ value in points
Weekly open price
Live deviation reading (e.g., +0.72σ) with directional color
Dark and Light theme support
Adjustable size (Tiny / Small / Normal / Large) and position
History
Show 1–10 previous weeks of levels on chart for context
Dynamic object-count cap prevents runtime errors at extreme settings
Background Coloring
Optional chart background shading when price exceeds a deviation threshold
Separate colors for above and below threshold
Adjustable threshold (default ±1.5σ) and opacity
Only renders on recent bars — no historical clutter
Alerts
Fires when price reaches a configurable deviation level (default ±1.0σ)
Uses high/low for detection — catches wick touches, not just closes
Once per direction per week — no spam
Dynamic message includes deviation level, price, and ticker
█ HOW TO USE
1. Apply to any instrument — best used on 30-minute or 1-hour charts for a clean weekly overview
2. At the start of each week, levels automatically recalculate from the new weekly open
3. Watch the dashboard for your current σ reading throughout the week
4. Use the turn zone (±0.5σ) as the "normal range" boundary
5. Set alerts at ±1.0σ to get notified when the week is getting extended
6. Enable background coloring at ±1.5σ to visually flag overextended conditions
Suggested workflow:
Monday/Tuesday: Price inside the turn zone is normal — no edge yet
Mid-week: Breaking ±1.0σ signals a directional week — trade with the trend
Late week at ±1.5σ+: Consider fading or tightening stops — the move is statistically stretched
█ SETTINGS
Calculation: Lookback period (10–520 weeks), deviation method
Levels: Max deviation, step size, line style/width/color
Turn Zone: Toggle, center position, width, color
Labels: Show/hide price on labels
Background: Toggle, threshold, colors, opacity
Alerts: Toggle, deviation level trigger
Table: Theme, position, size
History: Number of weeks to display (1–10)
█ WHAT MAKES THIS ORIGINAL
Dynamic, not static — deviation bands recalculate from actual price history, not fixed percentages
Weekly open anchored — levels reset each week from the actual open, not from arbitrary pivots
Universal — works on any instrument without hardcoded values or asset-specific calibration
Turn zone concept — highlights the statistical boundary between noise and trend
Live σ reading — real-time dashboard shows exactly where the current week stands in its distribution
Smart object management — dynamic caps prevent runtime errors even at extreme settings
█ LIMITATIONS
Deviation bands assume roughly normal distribution of weekly moves — fat tails (news events, gaps) are not modeled
Early in the week, the current σ reading is less meaningful since the week hasn't developed
Lookback period matters — too short (10w) adapts fast but is noisy, too long (520w) is stable but slow to react to regime changes
52-week default is a reasonable balance for most instruments
Standard deviation levels are guides, not guaranteed support/resistance
Indicator

Keltner SD SuperTrend | RakoQuantKeltner SD SuperTrend by RakoQuant is a structural trend-following system that replaces ATR volatility with Standard Deviation inside a SuperTrend framework.
Instead of using raw range-based expansion, this model measures statistical dispersion around an EMA baseline, producing cleaner volatility envelopes in both compression and expansion phases.
The result is a SuperTrend variant that reacts to true deviation structure, not just candle range.
RakoQuant Architecture
1. EMA Baseline (Structural Mean)
The core baseline is an EMA:
* Provides directional bias
* Anchors volatility expansion
* Serves as slope reference for momentum gating
This keeps the model responsive without being overly reactive.
2. Standard Deviation Volatility (σ Engine)
Instead of ATR, this system uses:
Upper Band = EMA + (Multiplier × StdDev)
Lower Band = EMA − (Multiplier × StdDev)
This shifts the logic from range volatility to statistical dispersion.
Key effects:
* Compression phases tighten sharply
* Breakouts emerge from structured contraction
* Noise-based volatility spikes are reduced
* Trend shifts become more statistically defined
3. SuperTrend Trailing Logic
Classic trailing band mechanics are applied:
* Bands trail only in trend direction
* Once flipped, they do not reset until structurally broken
* Regime continuity is maintained
This prevents band “repainting” behavior and keeps state transitions clean.
4. Momentum Gate (Structural Confirmation)
An optional slope-based confirmation layer is included:
Momentum = EMA slope normalized by Standard Deviation
This ensures:
* Flips require directional bias
* Weak breaks in flat conditions are filtered
* Volatility expansion aligns with structural movement
It adds discipline without over-complicating the model.
Signal Model (RakoQuant Regime Logic)
The indicator operates using state-based architecture:
* Bullish Regime when SuperTrend flips upward
* Bearish Regime when SuperTrend flips downward
Flip events are:
* Deterministic
* Backtest-ready
* Alert-enabled
No repainting. No hidden smoothing. Clean state transitions.
Visual System
Keltner SD SuperTrend includes modular visual configuration:
* Multiple palette options (RakoQuant Neon, Classic, Gold/Indigo, Ocean/Coral, Mono)
* Line style control (Line Break default to prevent shelf artifacts)
* Dual-layer glow system
* Optional fill (to mid or to price)
* Optional EMA baseline display
* Candle painting toggle
* Optional UP/DN markers
The default Line Break style avoids the “box shelf” effect common in naive SuperTrend implementations.
Practical Use Cases
Trend Continuation
Use flips to capture directional expansion from statistical compression.
Breakout Detection
Watch for SD tightening before regime transition.
Volatility Rotation
Observe how dispersion expands during strong directional phases.
System Integration
Pairs cleanly with:
* Momentum oscillators
* Volume filters
* Higher timeframe bias systems
Design Philosophy (RakoQuant)
This tool reflects the RakoQuant framework:
* Statistical dispersion > raw range volatility
* Structural regime tracking > visual-only overlays
* Deterministic outputs > black-box smoothing
* Strategy-ready architecture
Everything is manual, open-source, and reproducible.
Chart Example
Indicator

TX Ultra Pulse TWH## Overview
TX Ultra Pulse TWH is a normalized momentum oscillator designed to visualize trend strength and identify potential reversal points. Unlike standard oscillators that use fixed ranges (0-100), this script normalizes its output into a standardized histogram (typically fluctuating between -1.5 and +1.5), making it easier to compare volatility across different assets.
## How It Works (The Logic)
The indicator allows users to switch between 4 different calculation "Engines". Each engine processes price data differently but outputs a normalized result:
1. Composite Mode (Default & Recommended)
This mode creates a "consensus" signal by blending three classic momentum indicators to filter out noise.
Logic: It calculates the 14-period RSI, 14-period Stochastic, and 20-period CCI.
Normalization: RSI and Stochastic are centered around zero (subtracting 50). CCI is divided by 150 to match the scale.
Weighting: The formula uses a weighted average: (RSI + (Stoch * 2) + CCI) / 3. The Stochastic component is given double weight to prioritize reaction to recent price closes.
Result: A smoother oscillator that reacts to overbought/oversold conditions with less "whipsaw" than a raw RSI.
2. Deviation Mode
Logic: Calculates the percentage distance between the Close price and a Moving Average (default 20 SMA).
Scaling: The result is normalized using Standard Deviation (Z-Score concept) to fit the histogram scale.
Use Case: Best for spotting mean-reversion opportunities when price extends too far from its baseline.
3. Momentum Mode
Logic: Pure Rate-of-Change (ROC). It measures the percentage change between current close and close n periods ago.
Use Case: Ideal for identifying pure trend velocity without the smoothing lag of complex averages.
4. RS Index Mode
Logic: Comparative Relative Strength. It compares the performance of the current asset against a user-defined benchmark (e.g., SPY, BTC, or IDX:COMPOSITE) over a lookback period.
Formula: (Asset % Change - Benchmark % Change). Positive values indicate the asset is outperforming the market.
## Features & Settings
Noise Filter: A built-in EMA smoothing layer (default 15) is applied to the final calculation to reduce visual noise.
Color Grading:
Green: Positive Momentum (Bullish).
Red/Orange: Negative Momentum (Bearish).
Color Intensity: Brighter colors indicate accelerating momentum, while darker/faded colors indicate deceleration (divergence).
Dashboard: Displays the current real-time values, trend direction, and signal status directly on the chart.
## How to Use
Trend Confirmation: Use the histogram color to confirm the trend direction. Do not go Long if the histogram is Red.
Zero Cross: A crossover above 0 indicates a shift to bullish momentum. A cross below 0 indicates bearish momentum.
Divergence: If price makes a Higher High but the Pulse Histogram makes a Lower High, this indicates momentum exhaustion (Bearish Divergence).
## Disclaimer
This script is a technical analysis tool intended for educational purposes. It does not guarantee profits. Past performance is not indicative of future results. Indicator

LSMA SD | GForgeLSMA SD | GForge
LSMA SD is a trend-following oscillator built for swing trading on higher timeframes. It generates rules-based long and exit signals by measuring where price sits within a statistically-defined volatility envelope anchored to a regression-based trend line.
Core Calculation
The basis line is a Least Squares Moving Average. Unlike a standard moving average which weights past prices, LSMA computes the mathematically optimal straight-line fit across a defined lookback window. This means the basis reflects the actual gradient of a trend — its slope tells you the rate and direction of price movement, not a smoothed echo of where price has been. A short EMA pass is applied to the raw LSMA output as a robustness measure, absorbing single-bar snap artifacts that occur when outlier candles enter or exit the regression window. This is not a smoothing aesthetic — it directly addresses a known fragility in raw LinReg endpoints.
The default source is hlc3 — the average of high, low, and close — rather than close alone. This distributes the regression input across the full bar range, reducing sensitivity to end-of-session price mechanics such as stop runs and last-minute order flow that can distort the trend line without reflecting genuine directional movement.
A Standard Deviation envelope is then constructed around the LSMA basis at a fixed multiplier. The band width is driven entirely by actual price volatility — it widens during high-volatility periods and tightens during quiet ones. There is no secondary adaptive scaling layer. This is intentional: additional dynamic scaling introduces a second noisy signal on top of the basis movement, which in practice degrades signal quality.
The Oscillator
The oscillator expresses where price currently sits within the SD bands on a 0–100 scale. A reading of 0 means price is at the lower band. A reading of 100 means price is at the upper band. A reading of 50 means price is sitting directly on the LSMA trend line itself — the neutral zone between the two signal thresholds represents price consolidating around the regression basis.
Long signals fire when the oscillator crosses above the long threshold (default 74), meaning price has broken decisively into the upper band zone — a momentum confirmation in the direction of the trend, not a mean-reversion trigger. Exit and short signals fire when the oscillator crosses below the short threshold (default 33).
This is a trend-continuation system, not a reversal indicator.
Parameters
The indicator is intentionally low-parameter. LSMA Length sets the regression window. StdDev Length sets the band width lookback and can differ from the LSMA length. StdDev Multiplier sets the fixed band scale. Endpoint Smoothing controls how aggressively window-edge artifacts are absorbed — setting it to 1 disables it entirely. Fewer parameters means less surface area for curve-fitting to historical data.
Default settings are optimised for BTC on the 1D timeframe. Optimize thresholds and lengths for different assets and timeframes before use.
Risk Warning
This indicator is provided for informational and educational purposes only. Past performance, including any results visible on historical bars, does not guarantee or imply future returns. All trading involves risk. You should not make trading decisions based solely on any single indicator. Always apply independent analysis and appropriate risk management.
Developed by GForge Indicator

Ultimate RegimeUltimate Regime | MisinkoMaster
Ultimate Regime is an advanced market environment classification tool designed to identify whether an asset is currently operating in a trending or mean-reverting regime. Instead of focusing on entry signals, the indicator concentrates on answering a more fundamental question: what type of market are we trading right now?
By continuously evaluating market structure, volatility behavior, and directional persistence, the script provides a unified regime view that helps traders adapt strategy selection, risk management, and trade expectations to current conditions.
This makes Ultimate Regime particularly valuable for traders using multiple systems, algorithmic frameworks, or discretionary approaches that perform differently depending on market state.
Core Concept
Markets alternate between expansion phases where directional movement dominates and contraction phases where price oscillates around equilibrium. Strategies built for one condition often underperform in the other.
Ultimate Regime solves this by aggregating several environment measurements into a single regime score that expresses whether the market currently favors:
• Trend continuation strategies
• Breakout participation
• Momentum trading
or instead
• Range trading
• Mean reversion strategies
• Oscillation-based setups
The indicator therefore acts as a decision filter rather than a trade trigger.
Key Features
Unified regime classification combining multiple market characteristics
Automatic detection of trending vs mean-reverting environments
Smooth regime transitions to reduce noise and false flips
Visual histogram representing regime strength
Automatic chart candle coloring based on environment
On-chart regime change labeling for clarity
Configurable lookback and smoothing controls
Works across all timeframes and asset classes
Suitable for discretionary and systematic traders
Designed for integration into multi-indicator workflows
How It Works (Conceptual)
Instead of relying on a single measurement, Ultimate Regime evaluates several dimensions of market behavior simultaneously, such as:
• Price expansion versus contraction
• Volatility shifts
• Directional persistence
• Structural movement characteristics
These components are normalized and combined into a composite regime value. The result is then smoothed to ensure regime changes reflect genuine environment shifts rather than short-term fluctuations.
When the combined regime value turns positive, the market is considered to favor directional movement. When it turns negative, price behavior favors oscillation and mean reversion.
The internal weighting and transformation methods remain proprietary in the invite-only version.
Regime States Explained
Trending Regime
Indicates directional dominance where price tends to move persistently in one direction. Momentum and breakout systems typically perform better under these conditions.
Mean Reverting Regime
Indicates oscillatory behavior where price frequently returns toward equilibrium zones. Range strategies and reversal setups often become more effective.
Neutral Transitions
Short transition periods may occur during regime changes as the environment reorganizes before committing to a dominant state.
Visual Components
Regime Histogram
A histogram displays regime strength and direction, making it easy to gauge whether trending or reverting behavior dominates.
Colored Candles
Price candles automatically change color according to regime classification, allowing instant environment recognition directly on the chart.
Regime Change Labels
Labels appear when regime shifts occur, helping traders visually track transitions between trending and mean-reverting phases.
Reference Thresholds
Visual guide levels help users understand regime extremes and neutral zones.
Inputs Overview
Source
Selects the price data used for regime analysis.
High-Low Difference Lookback
Controls how far back structural price expansion is evaluated.
ATR Lookback
Adjusts how volatility expansion or contraction is measured.
Standard Deviation Lookback
Defines the evaluation window for statistical price dispersion.
ADX Lookback
Controls directional persistence measurement sensitivity.
Smoothing Period
Applies smoothing to regime calculations, balancing responsiveness and stability.
Higher smoothing reduces noise but delays regime changes. Lower smoothing reacts faster but may increase regime flipping.
Usage Guidelines
Use Ultimate Regime as a strategy filter rather than a direct entry signal.
Trending regime environments generally favor:
• Breakout systems
• Momentum entries
• Trend-following approaches
• Pullback continuation trades
Mean-reverting environments generally favor:
• Range trading
• Support and resistance reversals
• Oscillation strategies
• Counter-trend setups
Regime analysis works best when combined with entry and risk tools rather than used standalone.
Practical Applications
Strategy selection switching between trend and range systems
Position sizing adjustments based on environment strength
Filtering trades that conflict with prevailing market behavior
Algorithmic system optimization
Portfolio regime monitoring
Timeframe alignment analysis
Parameter Tuning Notes
Lower lookback values increase responsiveness but may produce faster regime changes.
Higher lookback values stabilize regime detection for swing or position trading.
Short smoothing periods work better for intraday trading.
Longer smoothing periods help long-term traders avoid noise.
Optimal settings vary by asset volatility and timeframe.
Best Practices
Combine regime detection with price structure and confirmation tools.
Avoid forcing trend systems in reverting environments and vice versa.
Use regime awareness to improve trade selection discipline.
Backtest strategies separately for trending and mean-reverting periods.
Summary
Ultimate Regime provides a structured and adaptive view of market conditions by classifying whether the environment favors trend continuation or mean reversion. By separating environment analysis from trade signals, traders gain clarity in strategy selection and improve consistency across changing market conditions.
The invite-only version preserves proprietary calculation methods while delivering a robust regime detection framework suitable for discretionary traders, system developers, and algorithmic strategies alike. Indicator

Standard Deviation Supertrend | GForgeStandard Deviation Supertrend ~ 𝒢𝐹𝑜𝓇𝑔𝑒
A Supertrend indicator that replaces ATR with Standard Deviation for volatility measurement, combined with a selectable Moving Average anchor for noise reduction.
━━━━━━━━━━━━━━━━━━━━━━━━
What This Indicator Does
This is a trend-following overlay that plots a single trailing line on your chart. When price is above the line, the trend is bullish. When price crosses below, the trend flips bearish. Signals fire on each flip.
The core mechanic is identical to the classic Supertrend — ratcheting bands that tighten in the direction of the trend and only reset when price breaks through the opposite side.
━━━━━━━━━━━━━━━━━━━━━━━━
Why Standard Deviation Instead of ATR
ATR measures the average candle range. It treats all bars the same — a strong directional candle and a choppy gap produce equal ATR contributions.
Standard Deviation measures how far price disperses from its mean. During clean directional moves, prices cluster on one side of the mean, producing low StdDev and tighter bands. During erratic, sideways price action, prices scatter around the mean, producing high StdDev and wider bands.
The result: the trailing stop naturally tightens when the trend is clean and loosens when conditions are noisy. This is adaptive behavior that ATR-based Supertrends don't provide.
━━━━━━━━━━━━━━━━━━━━━━━━
Two Smoothing Layers
Raw Supertrend inputs can be noisy. A single wick or volatile candle can jerk the trailing band and cause a premature flip. This indicator addresses that with two optional smoothing layers:
Anchor MA — applies a Moving Average to the price source before bands are calculated. Instead of building bands around raw hl2 (which reacts to every wick), the bands are built around a smoother baseline. 11 MA types are available:
• None (hl2) — raw, classic Supertrend behavior
• SMA, EMA, WMA — standard options with varying lag
• HMA — very low lag, can overshoot on reversals
• DEMA, TEMA — reduced lag variants of EMA
• VWMA — volume-weighted, naturally anchors to high-volume levels
• RMA — Wilder's smoothing, very stable
• ALMA — Gaussian-weighted with tunable offset and sigma
• T3 — Tillson, extremely smooth with adjustable volume factor
StdDev Smoothing — applies an EMA to the raw Standard Deviation output before it scales the bands. This prevents abrupt band width changes when a volatile bar enters or exits the lookback window. Set to 1 to disable.
Together, these improve parameter robustness — small changes to settings produce smaller changes in output, meaning the indicator is less likely to break under slight parameter variation.
━━━━━━━━━━━━━━━━━━━━━━━━
Settings Overview
• Anchor Source — price input for the Supertrend. hl2 is the classic default.
• StdDev Length — lookback period for the Standard Deviation calculation.
• StdDev Multiplier — band width. Higher values require a larger move to flip direction. This serves the same purpose as a "threshold" in oscillator-based indicators.
• Anchor MA Type / Length — which Moving Average smooths the anchor, and its period.
• StdDev Smoothing — EMA period applied to the raw StdDev. 1 = no smoothing.
• ALMA Offset / Sigma — only active when ALMA is selected.
• T3 Volume Factor — only active when T3 is selected.
• Current settings work best on BTC 1D
━━━━━━━━━━━━━━━━━━━━━━━━
Visual Elements
• Glow trail — the Supertrend line pulses with a layered glow that changes color on trend direction.
• Trend fill — gradient fill between price and the trailing line.
• Inactive band — shown as crosses, marking where the opposite flip point sits.
• Anchor MA line — subtle reference line showing the smoothed anchor (hidden when set to None).
• Bar coloring — candles colored by current trend direction.
• Signal diamonds — dual-layer markers (halo + core) on trend flips.
All visual elements can be toggled on or off individually. 13 color themes are included.
━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Disclaimer
This indicator is a technical analysis tool, not financial advice. It does not guarantee profitable results. Past performance on any asset or timeframe does not indicate future results. No indicator can predict market direction with certainty.
Always use proper risk management. Do not rely on any single indicator for trading decisions. Test thoroughly on your chosen instruments and timeframes before applying to live markets. You are solely responsible for your own trading decisions and outcomes.
━━━━━━━━━━━━━━━━━━━━━━━━
Developed by 𝒢𝐹𝑜𝓇𝑔𝑒 Indicator

Adaptive BSP v6The Adaptive Buying and Selling Pressure (ABSP) indicator is the "engine" of your system. Unlike standard volume oscillators that just look at total quantity, this logic dissects the internal price action of every candle to determine who is actually in control.
1. The Core Calculation (Intra-Bar Delta)
Instead of just looking at the candle color, the ABSP logic calculates pressure based on where the price closes relative to the high and low of the bar:
• Buying Pressure (BP): Measured as the distance from the candle's Low to its Close.
BP = Close - min(Low, Close)
• Selling Pressure (SP): Measured as the distance from the candle's High to its Close.
SP = max(High, Close) - Close
2. The Adaptive Lookback (The "Pulse")
Standard indicators use a "static" period (like 14 or 20). The ABSP is different; it uses the Market Pulse to change its own length:
• It tracks the number of bars since the last significant structural pivot.
• If the market is moving fast with frequent pivots, the lookback shortens (more sensitive).
• If the market is trending smoothly without pivots, the lookback lengthens (more stable).
3. Statistical Normalization (Z-Score)
To make the data readable across different assets (like Crypto vs. Forex), we apply a Z-Score calculation. This measures how many standard deviations the current pressure is away from the mean:
• Neutral: Z = approx 0 (Balanced market).
• High Intensity: Z > 2.0 (Significant buying surge).
• Extreme Exhaustion: Z > 3.0 (Potential blow-off top/bottom).
4. Key Logic Points
Feature | Function | Trading Benefit
=============================
Net Delta | Subtracts SP from BP. | Instant view of which side is winning the tug-of-war.
----------------------------------------------------------------------------
EMA Smoothing | Uses a Series EMA on the raw values. | Filters out "noise" while remaining responsive to price.
----------------------------------------------------------------------------
Divergence Logic | Compares Price Highs to Pressure Highs. | Flags when a trend is losing "gas" before price actually drops.
----------------------------------------------------------------------------
Z-Intensity Filter | Only flags "PRO" signals at extremes. | Ensures you aren't entering during "retail chop."
How it drives the "Fusion" System:
In your current setup, the ABSP acts as the ultimate filter. A "Wave" is just a zig-zag on the chart, but the ABSP tells the script: "This wave is legitimate because the Z-Score is at 2.1 and Buying Pressure is exponentially higher than Selling Pressure."
Would you like me to add a specific "Exhaustion" alert to the ABSP logic that pings you when the Z-Score hits an extreme level (>3.0), even if a new wave hasn't formed yet? Indicator

Indicator

ALMA SD Bands | RakoQuantALMA SD Bands | RakoQuant is a volatility-regime band system built from first principles using an institutional smoothing framework: an ALMA baseline combined with ALMA-smoothed standard deviation width, designed for clean trend containment and controlled regime classification.
This tool is part of the RakoQuant protected research line, focusing on minimal noise, persistent state logic, and volatility-aware market structure rather than traditional reactive Bollinger-style band behavior.
Core Concept
This indicator answers one key structural question:
Is price operating inside a stable volatility regime, or transitioning into a new directional band expansion phase?
Unlike classical deviation band systems that fluctuate aggressively candle-to-candle, ALMA SD Bands introduce:
* Ultra-smooth baseline structure
* Smoothed volatility width
* Persistent directional regime logic
* Deadband-based flip stabilization
The result is a clean institutional containment model rather than noisy retail band plotting.
How It Works
1. ALMA Baseline (Institutional Mean Structure)
The centerline of the system is computed using:
Arnaud Legoux Moving Average (ALMA)
ALMA provides:
* Reduced lag compared to EMA
* Superior smoothness compared to SMA
* Stable regime structure across crypto volatility
This baseline acts as the equilibrium axis of the band system.
2. Standard Deviation Volatility Width (Smoothed)
Band width is driven by volatility, measured through standard deviation, with two selectable modes:
* Price Standard Deviation
* Return Standard Deviation (log-return volatility)
Rather than using raw deviation directly, volatility is passed through a second ALMA smoothing layer:
Smoothed Volatility = ALMA(StdDev)
This eliminates the jitter and band shaking that defines most Bollinger-type systems.
3. Adaptive Containment Bands
Final bands are constructed as:
* Upper Band = ALMA Basis + Multiplier × Smoothed Volatility
* Lower Band = ALMA Basis − Multiplier × Smoothed Volatility
Unlike traditional ±2σ envelopes, the multiplier is intentionally adjustable and tuned for regime containment rather than extreme tagging.
4. Deadband Regime Engine (Persistent State Logic)
A defining feature of this protected release is its regime persistence model.
Instead of flipping trend bias instantly, the script applies a volatility-scaled deadband buffer:
* Bull regime activates only above Basis + Deadband
* Bear regime activates only below Basis − Deadband
This removes micro-flips and produces a true structural regime state:
* Bullish containment (green)
* Bearish containment (red)
* Neutral transition zone suppression
Regime state persists until a confirmed boundary transition occurs.
Visual Engine
ALMA SD Bands follows the RakoQuant minimal institutional plotting standard:
* Active volatility bands only
* Smooth containment fill
* Optional candle painting by regime bias
* Ultra-clean overlays suitable for confluence stacking
This indicator is designed as a structural layer, not a clutter generator.
How To Use
✅ Volatility containment framework
✅ Trend regime bias overlay
✅ Expansion / contraction classifier
✅ Portfolio directional filter (RSPS compatible)
Recommended workflow:
* Trade long only during bullish regime containment
* Defensive during bearish containment
* Watch for regime flips as volatility transition events
* Combine with momentum triggers for execution
Best environments:
* 4H–1D swing trend structure
* Volatility breakout classification
* Institutional band containment systems
Screenshot Placement
📸 Example chart / screenshot:
Indicator

Indicator

Volume Weighted LR Z ScoreThis indicator calculates the Volume Weighted Linear Regression
Z-Score (VWLRZS). Unlike a standard Z-Score which measures
deviation from a static mean, this oscillator measures the
statistical distance of price from a dynamic Volume-Weighted
Linear Regression Line (Analysis of Residuals).
Key Features:
1. **Volatility Decomposition:** The indicator separates volatility
based on the 'Estimate Bar Statistics' option.
- **Standard Mode (`Estimate Bar Statistics` = OFF):** Calculates
standard Regression Residuals using the selected `Source`
for both the regression line (baseline) and the signal.
- **Decomposition Mode (`Estimate Bar Statistics` = ON):**
Uses a hybrid statistical approach:
a) **The Model (Baseline):** Uses an estimator to calculate
the 'within-bar' mean and fits the Linear Regression
through these statistical centers. This creates a
stable, trend-following expectation model.
b) **The Signal (Observation):** Compares the actual `Source`
(e.g., Close) against this regression line.
(Result: A Z-Score that measures deviations from the current
trend slope rather than a flat average).
2. **Visual Decomposition Logic:** Total Standard Deviation (of
Residuals) is the primary metric displayed. Since Standard
Deviations are not linearly additive (sqrt(a+b) != sqrt(a)+sqrt(b)),
this indicator calculates the *exact* Total Z-Score and partitions
the area underneath based on the Variance Ratio. This ensures the
displayed total volatility remains mathematically accurate while
showing relative composition.
3. **Normalization (Exponential Regression):** Includes an optional
'Normalize' mode. When enabled, the indicator calculates the
Linear Regression on logarithmic data. Mathematically, this
transforms the baseline into an **Exponential Regression Curve**,
making it ideal for analyzing assets with compounding growth
characteristics (constant percentage trend).
4. **Full Divergence Suite (Class A, B, C):** The indicator's
primary feature is its integrated divergence engine. It
automatically detects and plots all three major divergence
classes between price and the Z-Score:
- Regular (A): Signals potential trend exhaustion and reversals.
- Hidden (B): Signals potential trend continuations during pullbacks.
- Exaggerated (C): Signals weakness at double tops/bottoms.
5. **Divergence Filtering and Visualization:**
- **Price Tolerance Filter:** Divergence detection is enhanced
with a percentage-based price tolerance (`pivPrcTol`) to
filter out insignificant market noise, leading to more
robust signals.
- **Persistent Visualization:** Divergence markers are plotted
for the entire duration of the signal and are visually
anchored to the oscillator level of the confirming pivot.
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library
6. **Note on Confirmation (Lag):** Divergence signals rely on a
pivot confirmation method to ensure they do not repaint.
- The **Start** of a divergence is only detected *after* the
confirming pivot is fully formed (a delay based on
`Pivot Right Bars`).
- The **End** of a divergence is detected either instantly
(if the signal is invalidated by price action) or with
a delay (when a new, non-divergent pivot is confirmed).
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Calculation:** The Z-Score line *itself* can be calculated on a
higher timeframe, with standard options to handle gaps
(`Fill Gaps`) and prevent repainting (`Wait for...`).
- **Limitation:** The Divergence detection engine (`pivDiv`)
is designed for the active timeframe. Using it in MTF mode
is not recommended as step-data can lead to inaccurate
pivot detection.
8. **Integrated Alerts:** Includes a comprehensive set of built-in
alerts for the Z-Score crossing the neutral line, the configured
Threshold levels, and the start/end of all divergence types.
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration. Indicator

Volume Weighted Z ScoreThis indicator calculates the Volume Weighted Z-Score (VWZS), a
statistical oscillator that measures the number of standard deviations
the price is removed from its mean. It combines robust volatility
decomposition with advanced divergence detection.
Key Features:
1. **Volatility Decomposition:** The indicator separates volatility
based on the 'Estimate Bar Statistics' option.
- **Standard Mode (`Estimate Bar Statistics` = OFF):** Calculates
a simple (Volume-Weighted) Standard Deviation using the
selected `Source` for both the baseline and the signal.
- **Decomposition Mode (`Estimate Bar Statistics` = ON):**
Uses a hybrid statistical approach:
a) **The Model (Baseline):** Uses an estimator to calculate
the 'within-bar' mean and volatility. This creates a
stable, mathematically idealized expectation value (mu).
b) **The Signal (Observation):** Compares the actual `Source`
(e.g., Close) against this statistical baseline.
(Result: A Z-Score that combines a noise-filtered trend
baseline with a highly reactive price signal).
2. **Visual Decomposition Logic:** Total Standard Deviation is the
primary metric displayed. Since Standard Deviations are not
linearly additive (sqrt(a+b) != sqrt(a)+sqrt(b)), this indicator
plots the *exact* Total StdDev and partitions the area underneath
based on the Variance Ratio. This ensures the displayed total
volatility remains mathematically accurate while showing relative
composition.
3. **Normalization (Geometric Average):** Includes an optional
'Normalize' mode. When enabled, the indicator uses a
Geometric Moving Average (GMA) as its baseline and applies a
statistical correction for the log-normal distribution
ensuring symmetry between upside and downside movements.
4. **Full Divergence Suite (Class A, B, C):** The indicator's
primary feature is its integrated divergence engine. It
automatically detects and plots all three major divergence
classes between price and the Z-Score:
- Regular (A): Signals potential trend exhaustion and reversals.
- Hidden (B): Signals potential trend continuations during pullbacks.
- Exaggerated (C): Signals weakness at double tops/bottoms.
5. **Divergence Filtering and Visualization:**
- **Price Tolerance Filter:** Divergence detection is enhanced
with a percentage-based price tolerance (`pivPrcTol`) to
filter out insignificant market noise, leading to more
robust signals.
- **Persistent Visualization:** Divergence markers are plotted
for the entire duration of the signal and are visually
anchored to the oscillator level of the confirming pivot.
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library
6. **Note on Confirmation (Lag):** Divergence signals rely on a
pivot confirmation method to ensure they do not repaint.
- The **Start** of a divergence is only detected *after* the
confirming pivot is fully formed (a delay based on
`Pivot Right Bars`).
- The **End** of a divergence is detected either instantly
(if the signal is invalidated by price action) or with
a delay (when a new, non-divergent pivot is confirmed).
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Calculation:** The Z-Score line *itself* can be calculated on a
higher timeframe, with standard options to handle gaps
(`Fill Gaps`) and prevent repainting (`Wait for...`).
- **Limitation:** The Divergence detection engine (`pivDiv`)
is designed for the active timeframe. Using it in MTF mode
is not recommended as step-data can lead to inaccurate
pivot detection.
8. **Integrated Alerts:** Includes a comprehensive set of built-in
alerts for the Z-Score crossing the neutral line, the configured
Threshold levels, and the start/end of all divergence types.
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration. Indicator

Indicator

Std Dev Channel [fmb]What it is
A professional regression channel that combines standard deviation divisions, an extreme price envelope, and a trend quality gauge. It is designed for fast read-and-act decisions on any timeframe, with sensible presets and log-space math for instruments that trend exponentially.
Why it’s different
Most channels draw fixed ±1σ and ±2σ around a regression line. This tool adds:
- Fibonacci-spaced σ divisions for precise scaling
- An objective MaxEnvelope of actual extremes with optional 1.272 and 1.618 extensions
- Pearson’s R labelling that classifies the trend as Strong Up, Moderate, Weak, or Strong Down
- A log-space option so channels behave correctly on long trends and high beta charts
How it works
Base line
- Linear regression of the last Length bars, drawn as a ray.
- Optional colour change by regime using Pearson’s R.
Divisions (StdDev or MaxEnvelope)
- StdDev basis: σ of residuals around the regression line.
- MaxEnvelope basis: distances from the base line to the farthest highs and lows in the lookback.
- Divisions can be Fibonacci multiples (0.382, 0.618, 1.000, 1.272 by default) or uniform steps.
Outer rails
- ENV 1.0 touches the farthest highs and lows within the window.
- Optional extensions at 1.272 and 1.618 highlight stretch and breakout zones.
Trend quality (Pearson’s R)
- R is computed on the same series and window.
- Default thresholds: Strong when |R| ≥ 0.70, Weak when |R| < 0.40.
- The label reads: R 0.XXX • Class, plotted near the most recent base value.
Log-space math
- When enabled, the model runs on ln(price) and converts the outputs back to price.
- Safer on multi-year charts and large percentage trends.
Presets
- Swing: Length 125, StdDev basis, Fib divisions, ENV 1.0 and 1.272 on
- Intraday: Length 240, StdDev basis, simple ±1 and ±2 style divisions, ENV off by default
- Position: Length 200, StdDev basis, compact Fib set for higher timeframes
You can turn preset overrides off to make every input respond instantly.
Inputs you will actually use
- Length, Source, Log-space ON or OFF
- Basis: StdDev or MaxEnvelope
- Divisions: Fib list or Step and Max multiple
- Outer rails: show ENV 1.0, show 1.272, show 1.618
- Labels and sizes, extend left or right
- Hide divisions or outer rails automatically when the regime is Weak
Alerts included
- Close crosses above or below ENV 1.0
- Close crosses above or below ENV 1.272 and 1.618 (if enabled)
Practical playbook
Trend following
- In Strong Uptrend: buy pullbacks near 0.382 to 0.618 above the base with stops just beyond the next lower division.
- In Strong Downtrend: sell bounces into 0.382 to 0.618 below the base with stops just beyond the next upper division.
Mean reversion
- When R is Moderate or Weak, fade moves that tag ENV 1.0 back toward the base.
- If price closes through an ENV extension, treat it as potential regime change and stand down on fades.
Breakouts
- A close through ENV 1.0 with R rising toward Strong often precedes trend acceleration.
- Use the next division or the 1.272 rail as the first target and trail on the base.
Tips
- Keep Length stable across symbols you compare. Consistency beats curve fitting.
- Use log-space on multi-year equities and crypto. Use linear for short intraday work.
- If you want a classic look, disable Fib and rails, set Step 1.0 and Max 2.0.
Notes
- The tool draws more lines when Fib divisions are active. If it feels busy, show divisions only and hide labels, or keep ENV 1.0 plus one extension.
- Pearson’s R is descriptive, not predictive. Combine with price structure and volume for entries. Indicator

Indicator

Indicator

DCA + Martingale strategy.DCA + Martingale: smart synergy for volatile markets
Tame market swings with a powerful hybrid strategy that marries the discipline of Dollar‑Cost Averaging (DCA) with the aggressive recovery logic of the Martingale system. This approach turns price dips into opportunities — systematically building positions while keeping risk in check.
How it works:
1. Entry trigger
The strategy activates when the asset price drops by a predefined percentage on the 1‑hour timeframe. This ensures you only engage when a meaningful pullback occurs, avoiding premature entries.
2. DCA grid for controlled averaging
Once the entry condition is met, a grid of buy orders is deployed:
Each subsequent order is placed at progressively lower price levels (e.g., every 2–5% drop).
Order sizes can be fixed or follow a progressive scale (e.g., 1x, 1.5x, 2x the initial amount).
This dilutes your average entry price, improving the breakeven point as the market corrects.
3. Martingale‑style recovery mechanism
After each unsuccessful trade (i.e., price continues falling), the next position size is increased — not necessarily doubled, but scaled according to your risk tolerance. This accelerates recovery potential when the trend reverses.
4. Take‑profit with a fixed percentage target
A simple, predefined profit target (e.g., +3–7%) is set for the entire averaged position. Once hit, all open trades close, locking in gains. This prevents over‑exposure during uncertain reversals.
Key advantages
Psychological edge: removes emotional decision‑making by automating entries and exits.
Cost optimization: lowers average entry during downtrends, improving profit potential.
Controlled aggression: Martingale logic helps recoup losses faster without infinite scaling.
Flexibility: parameters (entry %, grid spacing, position sizing, TP) are fully customizable.
Risk management essentials
Stop‑loss safeguard: a hard stop‑loss (e.g., 10–15% below the lowest grid level) prevents catastrophic drawdowns in prolonged downtrends.
Position sizing: never risk more than 1–3% of capital per grid cycle.
Market context: best suited for assets with mean‑reverting behavior and moderate volatility. Avoid strong, sustained trends.
Capital buffer: ensure sufficient reserves to withstand multiple grid levels without margin calls.
When to use it
During sideways or range‑bound markets with regular pullbacks.
On assets with historical tendency to recover from short‑term dips.
When you expect a bounce but can’t pinpoint the exact bottom.
Bottom line
DCA + Martingale isn’t a «set‑and‑forget» miracle — it’s a disciplined framework for turning volatility into opportunity. Combine it with rigorous risk rules, and you’ll navigate downtrends with precision, turning market noise into structured profit potential. Strategy

ATR Stop LinesATR Stop Lines
Plots dynamic stop-loss levels on the price chart based on ATR (Average True Range). Optionally adjusts stop distance based on volatility regime.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IT DOES
Green line — Long stop (Close − ATR × multiplier)
Red line — Short stop (Close + ATR × multiplier)
Lines move with price and volatility. When regime-adjust is enabled, stop distance widens in high volatility and tightens in low volatility.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 REGIME-ADJUSTED MULTIPLIERS
When enabled, the multiplier auto-adjusts based on the ATR percentile:
LOW (< 25th pctl) — 1.0× ATR — Tight stops, small moves expected
NORMAL (25–50th pctl) — 1.5× ATR — Standard distance
HIGH (50–75th pctl) — 2.0× ATR — Wider to avoid noise
EXTREME (> 75th pctl) — 2.5× ATR — Widest, or skip the trade
Disable regime-adjust to use a fixed multiplier for all conditions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 HOW TO USE
Entry: Note stop line level when entering a trade. Set stop-loss at or beyond that level.
Trailing: Move stop to new line level as price advances in your favor.
Sizing: Wider stop = smaller position to maintain constant risk.
Example:
BTC Daily, ATR = \$2,000, Regime = HIGH (2.0×)
Entry: \$50,000 → Long stop: \$46,000 / Short stop: \$54,000
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 STATUS LABEL
VOL — Current regime (LOW / NORMAL / HIGH / EXTREME)
ATR — Raw ATR value in price units
Mult — Active multiplier
Stop Dist — Current stop distance in price units
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS
ATR Settings:
ATR Length (default: 14)
Percentile Lookback (default: 100)
Timeframe:
Use Fixed Timeframe — Lock to specific TF
Fixed Timeframe (default: D)
Stop Settings:
Regime-Adjusted Multiplier — Toggle auto-adjust on/off
Base ATR Multiplier — Used when regime-adjust is off
LOW/NORMAL/HIGH/EXTREME Multipliers — Customize per regime
Display:
Show Long Stop / Show Short Stop
Show Status Label
Long/Short Stop Colors
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 ALERTS
Vol → EXTREME
Vol → LOW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 COMPANION INDICATOR
Use with ATR Volatility Regime (separate pane) for full context:
Pane indicator → percentile visualization, zone backgrounds
This indicator → actionable stop levels on price chart
Both use identical ATR/percentile logic and stay in sync.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 NOTES
Works on any timeframe
Stops are dynamic — recalculate each bar
Not a signal generator — use with your own entry logic
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏷️ TAGS
ATR, stop-loss, volatility, risk-management, position-sizing, trailing-stop, swing-trading Indicator
