Adaptive Sharpe Ratio (Robust & Regime-Aware)Adaptive Sharpe Ratio (Robust & Regime-Aware) — ASR+
ASR+ (Adaptive Sharpe Ratio) on a daily chart, highlighting regime shifts and dynamically adjusted risk-aware performance.
WHAT IS ASR+
ASR+ (Adaptive Sharpe Ratio) is an enhanced version of the traditional Sharpe Ratio designed to remain statistically reliable in real market conditions.
It improves on the standard model by correcting for autocorrelation, fat tails, and regime-dependent volatility—factors that routinely distort conventional Sharpe readings.
The result is a more stable, realistic measure of risk-adjusted performance that adapts across timeframes, asset classes, and market environments.
WHY THIS MATTERS
The standard Sharpe Ratio assumes:
Stable volatility
Independent returns
Normally distributed returns
Real markets violate all of these assumptions.
Result: Sharpe can become inflated, unstable, and misleading—often underestimating risk, especially on lower timeframes.
ASR+ is designed to overcome these shortcomings.
WHAT “ROBUST” MEANS
ASR+ is built to resist common distortions:
Outliers & fat tails → adjusted
Skewed returns → penalized
Autocorrelation → corrected (HAC / Newey–West)
Small samples → estimation bias reduced
Result: more stable and realistic Sharpe values.
WHAT “REGIME-AWARE” MEANS
Markets change — volatility and behavior shift.
ASR+ adapts dynamically:
High volatility → stronger risk penalty
Calm markets → normalized evaluation
Regime shifts → reflected in real time
Result: avoids false confidence during risky conditions.
─────────────────────────────────────────
WHAT MAKES ASR+ DIFFERENT
─────────────────────────────────────────
🔹 HAC Autocorrelation Correction (Newey-West)
Uses a 4-lag Bartlett kernel to correct for serial correlation in returns. When returns are trending or mean-reverting, standard volatility estimates are biased. ASR+ adjusts variance to prevent Sharpe inflation during momentum regimes.
🔹 Cornish-Fisher Tail Adjustment
Incorporates skewness and excess kurtosis into the risk estimate. Markets with fat tails or negative skew carry more downside risk than standard deviation alone captures. This adjustment penalizes asymmetric or heavy-tailed return distributions at the 95% confidence level.
🔹 Volatility Regime Penalty
Detects when current volatility is elevated relative to its historical average and applies a dynamic penalty. ASR+ becomes more conservative exactly when standard Sharpe is most likely to mislead.
🔹 Small-Sample Uncertainty Correction
Applies a bias correction to the mean return estimate, accounting for statistical uncertainty from limited observations. Shorter lookbacks carry more estimation error, which ASR+ reflects.
🔹 Adaptive Risk Adjustment
All adjustments — tail risk, volatility regime, autocorrelation, and estimation uncertainty — are combined through an interaction-aware framework. This prevents double-counting while allowing interacting risk factors to generate appropriately compounded penalties. The total adjustment is capped to avoid over-penalization.
🔹 Multi-Asset, Multi-Timeframe Scaling
Automatically detects asset type (crypto, equities, forex, futures) and timeframe (seconds through monthly) and applies appropriate annualization.
Crypto → 365-day, 24-hour markets
Equities → 252-day, 6.5-hour sessions
No manual configuration required.
🔹 Extreme Value Moderation
During periods of high volatility or reduced estimation reliability, ASR+ moderates extreme Sharpe values in both directions. Positive readings may be reduced, while negative readings may move closer to zero, reflecting lower statistical confidence rather than a change in underlying performance.
🔹 Logarithmic Returns
ASR+ uses logarithmic (log) returns instead of arithmetic returns. Log returns are time-additive and more statistically consistent across timeframes, improving the stability and comparability of risk-adjusted performance, particularly over longer horizons and in the presence of compounding.
ADAPTIVE VS STANDARD SHARPE
Toggle between:
Standard Sharpe → baseline calculation (thinner line)
ASR+ → adjusted, real-world version (thicker line)
Use this to:
Detect inflated Sharpe values
Reveal hidden risk
Validate strategy robustness
─────────────────────────────────────────
REGIME CLASSIFICATION
─────────────────────────────────────────
Light theme view for clarity and accessibility. The same regime classification logic is applied across themes.
ASR+ colors both the plotted line and background for instant interpretation:
🔴 Red → Below 0 — Negative risk-adjusted return
⚫ Gray → 0 to 1 — Subpar performance
🟢 Green → 1 to 2 — Good performance
💚 Lime → Above 2 — Exceptional performance
─────────────────────────────────────────
KEY INPUTS & SETTINGS
─────────────────────────────────────────
→ Lookback Period
Minimum: 50 bars (Daily & Intraday), 36 (Weekly), 24 (Monthly)
Recommended: 63 (Daily), 100 (4H), 252 (1H), 500 (30M)
For high-volatility assets (e.g., growth stocks, crypto), longer lookbacks are recommended to reduce sensitivity to short-term trends
Short lookbacks during strong trending conditions can produce elevated readings that reflect momentum rather than sustainable risk-adjusted performance
→ Risk-Free Rate
Annualized (default 4.5%), adjustable to reflect prevailing rates
→ Show Adaptive vs Standard Sharpe
Plot both to visualize adjustment magnitude
→ EMA Smoother
Optional smoothing to reduce noise
→ Background Regime Colors
Fully customizable
─────────────────────────────────────────
WHO THIS IS FOR
─────────────────────────────────────────
→ Quantitative traders evaluating strategies
→ Multi-asset traders needing consistent metrics
→ Risk-conscious traders focused on efficiency, not just returns
→ Systematic traders monitoring regime shifts in real time
IMPORTANT
ASR+ is not a buy/sell signal.
It measures the quality of returns to support:
Strategy evaluation
Risk control
Position sizing
All calculations are based on confirmed historical data and do not rely on future values.
─────────────────────────────────────────
Built with statistical rigor for traders who demand more accurate evaluation tools.
─────────────────────────────────────────
Indicatore

IS Ghostbusters - Visual Session Levels & Auto-Hedge LogicGhostbusters is a visual execution tool designed for traders who operate based on fixed intraday levels and seek disciplined risk management. The script does more than just project entry, stop loss, and take profit levels; it acts as a real-time session monitor, validating executions and automatically managing hedge operations.
+1
Key Features:
Precision "Touch" Detection: Unlike standard indicators that wait for a candle to close, Ghostbusters uses intrabar prices (High/Low) to detect the exact moment price touches a level, ensuring surgical precision for entries and exits.
"One-Shot" Logic: To prevent overtrading, the script validates only the first outcome of the day. Once a TP or SL is hit, the indicator locks until the next configured session.
+1
Automatic Hedge System: If the initial trade hits the Stop Loss, the script automatically activates a violet-colored hedge radar. It calculates a new entry at the failure point, sets the Stop Loss at the original entry price, and calculates a reduced Take Profit (50% of the original range) to seek a quick technical recovery.
+1
Adaptable Professional UI:
Smart Contrast: Labels automatically change color based on your chart background (light or dark) to ensure total readability.
Level Table: Includes a dynamic table in the bottom corner that organizes SELL, BUY, and Hedge values.
Synchronized Infinite Lines: Uses line objects that span the entire chart, maintaining perfect synchronization with the price scale when zooming or scrolling.
How to Use It:
Configure Levels: Manually enter your Entry, SL, and TP levels for both BUY and SELL scenarios.
Session Control: Define your session start time. The script will ignore any prior movement and place a yellow "START" circle on the starting candle.
+1
Execution: Monitor the visual signals:
▲/▼ OPEN: Confirmed Entry.
✔️ TP: Target Reached.
X SL: Stop Loss Hit.
🟣 OPEN HEDGE: Hedge activation after an initial SL.
Technical Notes:
Written in Pine Script v6.
Optimized to keep the chart clean by avoiding unnecessary data points, maintaining a professional aesthetic.
Disclaimer: This script is a visualization and manual trading aid. It does not constitute financial advice or guarantee profits. Use at your own risk. Indicatore

Concordia Regime Execution [JOAT]Concordia Regime Execution
Introduction
Concordia Regime Execution is an open-source TradingView strategy that integrates regime detection, trend bias, structure, momentum breadth, pressure confirmation, and ATR-based risk management into one non-repainting execution model. The strategy is built as a realistic framework rather than a curve-fit showcase.
The problem Concordia solves is signal fragmentation. Regime, trend, structure, and momentum are often evaluated separately, which leads to entries taken in the wrong environment. Concordia requires multiple engines to align before a position is opened, then manages risk through predefined stop, target, trailing, and bias-failure exits.
Core Concepts
1. Regime Detection
ADX, choppiness, and compression work together to classify whether the market is suitable for directional participation.
2. Trend Bias Filter
Fast, intermediate, and structural EMAs plus anchored VWAP context define directional bias before any entry can pass.
3. Structure Confirmation
Confirmed bullish or bearish breaks of recent swing structure add structural alignment to the trade decision.
4. Momentum Breadth
A compact ribbon engine classifies whether fast momentum is actually expanding in the same direction as trend and structure.
5. Pressure and Risk Layer
Chart-derived pressure and crowding inputs help confirm continuation and suppress entries during elevated stress.
6. Risk Management
Each trade uses ATR-based initial stop placement, ATR-based profit target, optional trailing activation, and bias-failure closure if internal conditions deteriorate.
Features
Regime gate: Expansion, compression, and transitional filtering
Trend alignment: EMA stack plus anchored VWAP bias logic
Structure filter: Recent swing break confirmation
Momentum breadth: Ribbon spread confirmation instead of a single oscillator line
Pressure confirmation: Chart-derived directional pressure and crowding logic
Risk model: ATR stop, ATR target, trailing trigger, and bias-failure exit
Top-right dashboard: Regime, bias, structure, momentum, pressure, risk, setup scores, active position, and stop/target levels
Confirmed-bar entries: All setup logic is gated on confirmed bars
How to Use This Strategy
Step 1: Start with liquid markets
Concordia is better suited to instruments where anchored VWAP, ATR, and structure transitions behave consistently.
Step 2: Use realistic assumptions
Commission, slippage, and position sizing inputs should match your actual market and trading conditions before evaluating performance.
Step 3: Evaluate regime quality first
The strategy is intentionally selective. If the market is compressing or structurally unstable, fewer trades should occur.
Step 4: Review bias-failure exits
These exits are included to avoid overstaying trades when internal alignment breaks down before the stop or target is reached.
Strategy Limitations
Like any rules-based strategy, it can underperform in abrupt gap conditions or news-driven spikes
ATR-based exits adapt to volatility, but they are not guaranteed to be optimal for every instrument
The strategy is intentionally conservative and may miss some fast reversals
Historical performance does not guarantee future results
Originality Statement
Concordia Regime Execution is original in the way it integrates regime, trend, structure, momentum breadth, pressure confirmation, and ATR-based trade management into a single open-source strategy designed for realistic chart use rather than decorative backtest output.
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice and should not be treated as a recommendation to buy or sell any instrument. Strategy results are based on historical chart data and platform assumptions. Live trading results can differ materially. Always validate settings and use independent risk management.
Strategia

ontagion & Shock System (CSS) - Systemic Risk TrackerThe Contagion & Shock System (CSS) is an advanced quantitative indicator designed to measure systemic risk and sector contagion in real-time. Instead of looking at a single asset in isolation, this system tracks how sudden price shocks ripple across a configurable basket of proxy assets, helping traders identify true macro risk-on or risk-off environments.
1. Shock Detection
The system continuously monitors the base asset for sudden volatility spikes. It triggers an active "Shock" if a single bar exceeds a specific percentage threshold, or if a cumulative multi-bar move indicates sustained, aggressive buying or selling pressure.
2. Dynamic Correlation Engine (Wave Assignment)
The indicator runs a live Pearson Correlation (using log returns) between your base chart and 10 configurable proxy assets (e.g., SPY, QQQ, VIX, XLF). It automatically buckets these assets into three contagion waves:
Wave 1 (Immediate Impact): Correlation >= 0.70
Wave 2 (Lagging Impact): Correlation >= 0.40
Wave 3 (Distant/Isolated): Correlation < 0.40
3. Contagion Pressure Index (CPI)
Displayed as a central histogram, the CPI aggregates the correlation strength and directional movement of all 10 proxies. A positive score indicates risk-on contagion (assets are rising together), while a negative score indicates risk-off contagion (assets are falling together).
4. Systemic Risk Score (0-100)
Located in the dashboard, this gauge blends the magnitude of the CPI, the number of assets currently caught in Wave 1, and the recency of the last price shock. A score above 80 indicates severe market-wide stress.
Users can fully customize the shock thresholds, cumulative lookback windows, correlation lengths, and all 10 proxy tickers via the indicator settings to tailor the system to specific sectors or asset classes. Indicatore

Monte Carlo Risk Geometry Simulator [Aslan]Thanks to @KioseffTrading for the polyline retracing system and the plotting system as a whole🙏
♦️ What This Script Does
This is a Monte Carlo simulator for visualising and calculating the probability of a return based on risk geometry of the model (Risk %, RR, WR). It assesses the probability of returns by generating hundreds or thousands of possible outcomes using your win rate, risk-reward, and position sizing. Each line you see is a different plausible “future,” showing how your account could realistically evolve.
🔶 How To Use It
Input your strategy stats, run a large number of simulations, and focus on three things: how wide the equity curves spread, how deep drawdowns get, and the percentage of profitable outcomes. Then adjust your model and repeat.
🔷 Application in Prop Firm evaluations
Using the threshold system, you can see what risk geometry is most likely to pass a prop firm evaluation. Suprisingly, the most probable geometry for passing an eval can sometimes have a negative expected value!
♦️ Bottom Line
This script helps you move from “how much can I make?” to “how likely am I to profit?”
🔎 Monte Carlo Simulations Explained
Monte Carlo simulations are a method of modeling uncertainty by running many random versions of the same system to see all possible outcomes. In trading, instead of assuming one fixed result, it repeatedly simulates sequences of wins and losses based on your strategy’s statistics (like win rate and risk-reward). This creates a distribution of potential equity curves, showing not just what did happen, but could happen. It’s essentially a way to test probability and survival under randomness rather than relying on a single backtest. Monte Carlo simulations are widely used on quant trading desks around the world to model uncertainty, test strategy robustness, and estimate the probability distribution of trading outcomes under real-world randomness. Indicatore

Convergence Protocol [JOAT]
Convergence Protocol
Introduction
Convergence Protocol is an open-source strategy that combines four analytical modules — structural trend, volatility regime, delta pressure, and liquidity/structure break detection — into a multi-pathway entry and exit system. The strategy generates trade signals through five independent entry mechanisms, each requiring alignment between different analytical dimensions, and manages positions with ATR-based stops, dual take-profit levels, and an optional trailing stop that activates after the first target is reached.
The design rationale for combining these four modules is that each answers a different question about the market. Structure and trend analysis answers: what direction is the market likely to move? Volatility regime answers: does the market have the energy to sustain a directional move? Delta pressure answers: is volume supporting the proposed direction? Liquidity and structure break detection answers: has the market made a meaningful structural commitment that confirms directional intent? No single module alone provides a robust enough basis for a trade. Convergence across multiple modules provides a higher-quality signal set that reduces the frequency of marginal trades while maintaining enough opportunities to be practical.
Strategy Properties and Backtesting Settings
Default settings used for publication:
Initial Capital: Default TradingView account size
Position Size: 5% of equity per trade
Commission: 0.04% per side (realistic for most crypto and equity platforms)
Slippage: 1 tick
Risk Per Trade: 5% of equity maximum (within sustainable limits)
Stop Loss: 1.5x ATR from entry
TP1: 1.2x risk (50% of position closed)
TP2: 2.5x risk (remaining position)
Trailing Stop: 1.0x ATR trailing offset, activates after TP1 hit
Backtesting results will vary significantly by instrument and timeframe. This strategy is intended to be evaluated across multiple instruments and market conditions before drawing conclusions. A single backtest run does not constitute evidence of future performance.
Core Modules
Module 1: Structural Trend Engine
The baseline uses a double-smoothed moving average (SMEMA). Swing highs and lows are tracked to classify market structure as bullish (HH+HL), bearish (LH+LL), or neutral. A 0-7 confluence score is assembled from: regime direction, structural alignment, volatility expansion, absence of squeeze, delta pressure, structure break confirmation, and liquidity sweep confirmation. Each module contributes a binary point to the score.
Module 2: Volatility Regime
Short-period ATR is compared to long-period ATR. A ratio above 1.05 with a rising oscillator confirms volatility expansion — the market has enough energy for directional moves. A squeeze condition (fast ATR well below slow ATR and its own moving average) signals that the market is coiling; entries are filtered or blocked depending on settings.
Module 3: Delta Pressure
Bar-by-bar delta (positive on bullish bars, negative on bearish bars) is smoothed into fast and slow EMAs. Their cross and relative position provide a directional bias from the volume perspective.
Module 4: Liquidity and Structure
A break of structure (BOS) is confirmed when price closes beyond the most recent pivot in any direction on a confirmed bar. Liquidity sweeps are detected when price wicks beyond a prior swing and closes back on the correct side. Both conditions contribute to the confluence score.
Entry Mechanisms
1. Confluence Score Entry
All four modules must be aligned and score at or above the minimum threshold (default: 2 of 7). This is the primary high-conviction entry.
2. Baseline Pullback Entry
In an established trend (regime confirmed), when price returns to within the step band of the baseline with positive delta confirmation, a pullback entry is generated. This produces more frequent entries by adding trend-continuation trades within an established directional move.
3. Squeeze Breakout Entry
When a detected squeeze condition resolves (squeeze ends) with trend and delta alignment, a breakout entry fires. This targets the expansion phase immediately following volatility compression.
4. Delta Crossover Entry
When the fast delta EMA crosses above the slow delta EMA in the direction of the regime, and the market is not in a squeeze, a momentum entry is generated.
5. Sweep Reversal Entry
When a liquidity sweep occurs with confirming delta pressure, a reversal entry is generated in the direction of the sweep reversal. This targets the classic sweep-and-go pattern.
Exit Logic
TP1: 50% of position closed at 1.2× risk. Locks in partial profit and reduces position size for the remainder of the trade
TP2: Remaining 50% targets 2.5× risk with a hard stop at the original stop level
Trailing Stop: After TP1 is hit, the strategy optionally converts to a trailing stop with an ATR-based offset, allowing the winning portion of the trade to capture extended moves
Regime Exit: If the market regime flips against the position (bullish regime while short, or bearish regime while long), the position is closed at market. This protects against holding trades through structural regime reversals
Limitations and Considerations
The strategy uses OHLCV-based calculations throughout. It does not have access to tick data, order book information, or real-time execution data that institutional traders use
Backtesting results are inherently optimistic due to perfect execution assumed at bar close prices. Real-world execution will differ
The five entry mechanisms produce different trade frequencies. Users should evaluate each mechanism independently in backtesting before enabling all simultaneously
The regime change exit can produce early exits in choppy markets where the regime briefly flips before resuming the original direction
The trailing stop activation after TP1 is a fixed ATR offset from the highest/lowest price reached. It does not adapt to subsequent volatility changes during the trade
The strategy is designed for trending markets. In persistent ranging environments, the confluence score-based entries will underperform because the regime module will frequently return a Ranging classification, suppressing primary entries
Commission and slippage settings in the strategy Properties should be adjusted to match the actual costs on the instrument and broker being used before drawing any performance conclusions
Originality Statement
This strategy is original in its specific multi-pathway entry architecture and the unified 0-7 confluence scoring system that synthesizes structural, volatility, delta, and liquidity analysis into a single conviction metric. Each of the five entry pathways serves a distinct market condition: confluence entries target high-alignment setups; pullback entries target trend continuation in established moves; squeeze breakout entries target volatility expansion transitions; delta crossover entries target momentum initiation; sweep reversal entries target institutional accumulation/distribution patterns. No single existing strategy approach covers all five scenarios. The combination is justified because these five market conditions occur at different points in the market cycle, and a strategy limited to one condition type will sit idle during the other four.
Disclaimer
This strategy is provided for educational and informational purposes only. Past backtest results do not guarantee future performance. No backtesting result should be interpreted as evidence that this strategy will be profitable in live trading. Markets change, and conditions that produced past results may not recur. The strategy does not account for taxes, broker requirements, or psychological factors in live trading. Always use proper risk management and consult with a qualified financial professional before making any investment decisions. The author is not responsible for any losses incurred from using this strategy.
-Made with passion by officialjackofalltrades
Strategia

Kelly Criterion CurveThe Kelly Criterion Curve indicator gives you the leverage/return tradeoff by displaying a bell curve with growth and leverage. This indicator shows where you are on the risk curve depending your allocation/leverage used and the optimal leverage to use in any asset.
What Does It Show?
The indicator plots the Kelly growth function:
g(f) = μ·f - 0.5·σ²·f²
Where:
g(f) = Expected growth rate at leverage f
μ = Annualized return
σ = Annualized volatility
f = Leverage multiplier
The curve peaks at the Optimal Kelly leverage (full Kelly) and then declines, showing that:
Too little leverage = underutilized capital
Too much leverage = volatility drag destroys returns
The curve is dynamically divided into zones based on your asset's return profile:
Underinvesting (Green) - Too conservative, underutilized capital
Optimal Sizing (Teal) - Sweet spot for position sizing
High Risk (Yellow) - Diminishing returns, high volatility drag
Never Logical (Red) - Risk outweighs reward
Suicidal (Black) - Negative expected returns
Position Markers
★ Kelly Optimal (Green/Red) - Maximum long-term log growth leverage
½ Kelly (Yellow) - Conservative sizing (recommended most times)
Settings for Kelly Calculation
Lookback Period - Historical data window for calculations (default: 252 = 1 year)
Annual Trading Days - For annualization (default: 252)
Use Log Returns - More accurate for compounding (recommended: ON)
Curve Smoothness (20-200) - Number of points on curve (default: 100)
Maximum Leverage Display (2-10x) - X-axis range
Show Short Positions - Display negative leverage for short strategies. Note the chart is not fully optimized for shorts.
Show Optimal Kelly Marker - Mark optimal leverage on curve
Show Half Kelly Marker - Mark conservative leverage
How to Use
Look at Optimal Kelly - This is the theoretical maximum for the period analyzed
Use Half Kelly for conservative sizing
Check which risk zone your position falls into
If your leverage is in the High Risk zone → Consider reducing
If you're in Never Logical or Suicidal → I wish you good luck because you will need a lot
If you're in Underinvesting → You may be too conservative
IMPORTANT
The indicator is based on past returns and volatility. It CANNOT predict:
Market crashes
Regime changes
Black swan events
If you use Optimal Kelly and suddenly there's a crash, you are toasted.
Full Kelly maximizes long-term growth but can experience large drawdowns
Most traders use ¼ to ½ Kelly for risk management
You should almost never use full Kelly, unless you are extremely confident
Remember leverage amplifies gains and losses
Notice how Max Growth isn't simply Ann. Return × Leverage
The formula accounts for volatility drag (the cost of using leverage)
Higher volatility = lower optimal leverage
The Kelly Criterion was developed by John L. Kelly Jr. in 1956 for information theory and later adapted for gambling (card counting for example, pioneered by Edward O. Thorp), and investing.
Optimal Leverage:
f* = μ / σ²
Expected Growth Function:
g(f) = μ·f - 0.5·σ²·f²
This is a quadratic function that forms the bell curve you see on the chart.
This indicator pairs perfectly with my other indicators:
Kelly Optimal Leverage Indicator
Jensen's Inequality + Kelly Leverage
Multi-Leverage VAR/VaG Indicator
For deeper insights on Kelly Criterion and optimal leverage:
Read my article: Unlock the Power of Monte Carlo
Read these papers:
Alpha Generation and Risk Smoothing using Managed
Volatility
Leverage for the Long Run - A Systematic Approach to Managing Risk and Magnifying Returns in Stocks
Trading with leverage involves substantial risk of loss.
The Kelly Criterion provides a theoretical framework - actual trading requires additional risk management, market analysis, and psychological discipline.
Some examples of using the Kelly Criterion Curve:
Russel 2000, last 500 days Kelly curve
Here's you can see that the optimal sizing over the last 500 days would have been around 1.7x leverage and that full Kelly is 3.4x leverage.
While Russel 2000 returned 16%, full Kelly would have returned 27.8%, and more that full Kelly (3.4x leverage) would lower the returns.
Berkshire Hathaway, last 1000 days Kelly curve
BRK stock optimal Kelly (full Kelly) is 2.5x for the last 1000 trading days. To reduce volatility, one could use 1/2 Kelly which is 1.25x leverage.
Bitcoin, last 2000 trading days Kelly curve
Very interestingly, the indicator tells us not to leverage Bitcoin. Even a 2x leverage can lead to ruin given its volatility, and in fact, in 2025 many traders got liquidated while leveraging Bitcoin by 2x.
Let me know if you have questions, suggestions and comments.
- Henrique Centieiro Indicatore

Strategia

Strategia

Adaptive Regime Momentum [JOAT]Adaptive Regime Momentum
Introduction
The majority of publicly available trend-following strategies rely on one of two entry mechanisms: a moving average crossover, or a price-versus-MA relationship. These are valid starting points, but they share a common weakness — they fire signals based on a single confirmatory condition that can be triggered by brief, low-conviction price moves. A single bar pushing above a moving average while volume is thin and the MA is barely sloping is not the same market condition as a sustained directional move with volume behind it and a clearly sloping MA. Yet a simple strategy would treat both identically.
Adaptive Regime Momentum is a trend-following strategy that requires three independent conditions to align before generating an entry signal. These three layers — MA slope confirmation over multiple consecutive bars, price position relative to the MA, and a volume-based demand filter — must all agree simultaneously. The result is a strategy that generates fewer signals but with higher internal consistency between entry conditions. It is designed for liquid markets on daily or higher timeframes where each component is reliably measurable.
This is an overlay strategy — all visuals are plotted directly on the price chart.
---
Strategy Properties
The following default settings are used for all backtests unless modified:
Initial capital: $10,000
Position sizing: 5% of equity per trade
Commission: 0.05% per side
Pyramiding: 0 (only one open position at a time; new signals are ignored while a position is active)
Stop loss: 2.5x ATR below the entry price (long), 2.5x ATR above the entry price (short), calculated from strategy.position_avg_price
Take profit: 4.0x ATR above the entry price (long), 4.0x ATR below the entry price (short), calculated from strategy.position_avg_price
Trail / slope exit: Position is closed early if price crosses to the wrong side of ComboMA ± 1.5x ATR, or if the MA slope reverses direction
The stop and take profit are anchored to strategy.position_avg_price — the actual average fill price of the position — rather than the signal bar's close. This ensures that in backtesting, stop and TP distances are measured from where the trade was actually opened, not from a theoretical signal level.
These are backtesting defaults only. They do not represent a recommendation for live trading position sizing or risk management.
---
Core Concepts
Signal 1 — ComboMA Slope Confirmation (Structural Momentum)
The ComboMA is a blend of two moving averages:
ALMA (Arnaud Legoux Moving Average) — a smooth MA with reduced lag, fitting to recent price without overreacting to single bars
ZLMA (Zero-Lag Moving Average) — a lag-compensated MA designed to reduce the delay between price movement and MA response
The two are blended into a single ComboMA value. The slope of this composite is then evaluated not just on the current bar, but across the last N consecutive bars (default: 3). A slope is only confirmed as UP if all of the last 3 bars showed a positive slope. A slope is only confirmed as DOWN if all 3 bars showed a negative slope. A single slope fluctuation — even if the most recent bar shows a positive slope — does not trigger confirmation unless all N bars agree.
This multi-bar slope confirmation is the primary mechanism that distinguishes this strategy from a simple MA-based entry. A one-bar slope flip that immediately reverses is filtered out. Only a sustained slope direction triggers the first condition.
Signal 2 — Price vs. ComboMA (Real-Time Confirmation)
The second condition requires that price is currently on the correct side of the ComboMA:
For a long: close > ComboMA
For a short: close < ComboMA
This condition is evaluated at the current bar, providing real-time confirmation that price is aligned with the structural slope direction. The MA slope could be upward from prior bars, but if price has already pulled back below the MA, the second condition vetoes the entry. Both the historical slope and the current price position must agree.
Signal 3 — Volume RSI (Demand Pressure Validation)
Volume RSI is RSI applied to raw volume over an 8-bar period, then divided by 50. A result above 1.0 (the default threshold) means the Volume RSI is above 50 — indicating that volume activity on recent bars has been relatively elevated compared to the preceding period.
For a long entry: Volume RSI / 50 must exceed the threshold
For a short entry: same condition applies
Volume RSI does not confirm direction — it confirms participation . A move accompanied by above-average volume has more demand/supply backing than a low-volume drift. When volume is below threshold, the third condition is not met and no entry is generated, even if slope and price position align.
RSI Filter
An additional RSI filter is applied to the close:
RSI(14) must be above 50 for long entries
RSI(14) must be below 50 for short entries
This acts as a momentum gating condition — confirming that short-term momentum is consistent with the trade direction before entry is permitted.
Non-Repainting Execution
All entry conditions are gated by barstate.isconfirmed . No signal is generated until the current bar has fully closed. This prevents intra-bar signal flickering and ensures that the backtest accurately represents what would have been traded on confirmed bar closes.
---
Exit Logic
The strategy uses a layered exit system combining fixed risk-defined targets with adaptive trend exits:
Fixed exits (via strategy.exit):
Stop loss at 2.5x ATR from entry price
Take profit at 4.0x ATR from entry price
Trail exits (via strategy.close):
Price closes beyond ComboMA ± 1.5x ATR on the wrong side
The ComboMA slope reverses (multi-bar confirmation fails in the opposite direction)
The trail exit allows winning positions to exit earlier if the trend deteriorates before reaching the fixed take profit, while the fixed TP provides a defined maximum target. The stop loss is the unconditional floor regardless of trail conditions.
---
ATR Shadow Visual
The chart displays two layers of ATR bands around the ComboMA:
Inner band: ComboMA ± 1x ATR
Outer band: ComboMA ± 2x ATR
These bands give a visual read of how extended price is from the MA relative to recent volatility, and where the trail exit threshold sits (1.5x ATR, between the two bands). They are visual aids only and do not affect strategy logic.
---
Performance Table
A table is displayed on the chart showing current strategy metrics:
Net P&L
Open P&L (current unrealized)
Win Rate
Average winning trade
Average losing trade
Maximum drawdown
Total trades
Current position direction
Current MA slope status
---
Features
Three-layer entry confirmation: multi-bar MA slope, price vs. MA, and Volume RSI
RSI momentum filter as an additional gating condition
ALMA + ZLMA blend for the ComboMA, reducing lag without sacrificing smoothness
Multi-bar slope confirmation preventing single-bar slope flickers from triggering entries
ATR-based stop and take profit anchored to actual fill price via strategy.position_avg_price
Trail exit on slope reversal or price-vs-MA breach
Non-repainting: all signals confirmed via barstate.isconfirmed
Pyramiding disabled — one position at a time
ATR shadow bands for visual context around the ComboMA
Live performance table with key metrics
---
Input Parameters
ALMA / ZLMA settings — length, offset, and sigma for each MA component
Slope Confirm Bars (default 3) — consecutive bars of slope agreement required for confirmation
Volume RSI Length (default 8) — RSI period applied to volume
Volume Threshold (default 1.0) — Volume RSI / 50 minimum for the demand filter
RSI Length (default 14) — RSI period for the momentum filter
ATR Length — period for ATR used in stop, TP, trail, and visual bands
Stop Multiplier (default 2.5) — ATR multiplier for the fixed stop loss
TP Multiplier (default 4.0) — ATR multiplier for the fixed take profit
Trail Multiplier (default 1.5) — ATR multiplier for the trail exit threshold
---
How to Use
Apply to daily or higher timeframes on liquid instruments. Volume RSI is most meaningful where volume data is consistent and representative of actual market participation.
Allow the chart to load sufficient historical bars before evaluating backtest results. The ComboMA slope confirmation requires multiple bars of agreement, and early bars in the dataset may not reflect the strategy's typical behavior. Aim for at least several hundred bars of data for meaningful backtest statistics.
Review the performance table while backtesting to understand average win size relative to average loss, drawdown, and total trade count. A strategy with very few trades may show favorable metrics by chance rather than edge — consider whether the trade count is sufficient to draw conclusions.
The default 5% equity position size produces moderate equity curve sensitivity. Smaller sizes will reduce drawdown and return proportionally; larger sizes will amplify both.
Commission is set to 0.05% per side (0.1% round trip) by default. Adjust this to match your actual trading costs. Higher commission rates — especially relevant for frequent-trading timeframes — will reduce net results.
Do not optimize parameters on the same data you use to evaluate performance. Optimization on historical data produces settings tuned to past noise, not future edge.
The trail exit on slope reversal means that strongly trending markets where the MA briefly flattens before resuming may see early exits. This is the tradeoff for using slope as an exit condition.
---
Limitations
Backtest results are calculated on historical data and do not guarantee future performance. Market conditions change, and a strategy that performed well in a particular regime may perform differently as conditions evolve.
The Volume RSI filter requires reliable volume data. This strategy is not recommended for synthetic instruments, CFDs where volume represents contracts rather than underlying market activity, or very short intraday timeframes where volume is fragmented and noisy. On such instruments, the third entry condition may be meaningless or misleading.
The multi-bar slope confirmation requirement means the strategy will miss fast, sharp trend initiations where the MA slope has not yet had N bars to confirm. This is a deliberate tradeoff — reducing false entries at the cost of some late entries on fast moves.
Pyramiding is disabled. The strategy will not add to winning positions. This limits upside during strongly trending markets where additional entries might be beneficial, but it also limits drawdown from compounding positions that subsequently reverse.
ATR-based stops and TPs are fixed at entry. They do not adjust after the trade is open (apart from the trail exit). If volatility expands significantly after entry, a 2.5x ATR stop that was appropriate at entry may become relatively tight.
The performance table reflects cumulative backtest results as of the current bar. Results will vary across different lookback windows and instruments.
Default capital of $10,000 with 5% equity sizing means each trade risks approximately $500 before the stop is hit (assuming stop is the loss floor). This is a backtesting convention — it is not a recommendation for live account sizing.
No strategy produces guaranteed results. The three-layer entry system improves internal signal consistency but cannot eliminate the inherent uncertainty of financial markets.
---
Originality Statement
Standard MA-based trend strategies treat a single bar's price-vs-MA relationship as sufficient for entry. ARM's primary differentiation is the multi-bar slope confirmation requirement : the ComboMA slope must be consistently positive (or negative) across N consecutive bars before the first condition is met. A one-bar slope deviation — common during consolidations and brief retracements — does not trigger entry. Only a sustained slope direction qualifies.
The ComboMA itself is a blend of ALMA and ZLMA, combining the smoothness and Gaussian weighting of ALMA with the lag-compensation of ZLMA. Neither is used in isolation because each has a specific weakness: ALMA can lag on sharp moves; ZLMA can be sensitive to noise. The blend leverages the strengths of both while partially offsetting their weaknesses.
The three-layer confirmation architecture — slope duration, price position, and demand validation — requires agreement across genuinely different measurement types: structural momentum over time, current price location, and volume activity. These are not three views of the same quantity. The stop and TP placement using strategy.position_avg_price rather than the signal bar close is a practical accuracy measure: in backtesting, it means risk distances are calculated from the price at which the trade was actually filled, not from where the signal was generated, which can differ from the fill price particularly on gap opens.
---
Disclaimer
This strategy is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any security. Backtested results are hypothetical and do not reflect actual trading. Hypothetical performance results have inherent limitations and do not account for execution slippage, liquidity constraints, or the psychological challenges of live trading. All trading involves risk, including the possible loss of principal. Always conduct your own research and consult a qualified financial professional before making any trading or investment decisions.
-Made with passion by officialjackofalltrades
Strategia

Index Futures Position Size CalculatorA simple, free position size calculator for CME index futures.
Click Entry, click Stop Loss, pick your asset, get your contract size. That's it.
═══════════════════════════════════
✦ SUPPORTED INSTRUMENTS
MNQ • MES • NQ • ES — all CME tick values hardcoded.
═══════════════════════════════════
✦ FEATURES
→ One-click Entry & Stop Loss directly on chart
→ Auto 1-handle SL buffer (protects against wick hunts)
→ Asset dropdown — no manual tick value entry
→ Custom rounding (≥0.75 rounds up, else down)
→ Green Entry / Red SL lines with price labels
→ Clean black-on-white size panel, top right
═══════════════════════════════════
✦ HOW TO USE
Add to chart → click Entry → click Stop Loss
Settings → pick asset, enter Account Size & Risk %
Read your size from the top-right panel
═══════════════════════════════════
✦ TIP
If you're trading a funded challenge, here are two clean ways to use this tool with your max loss limit:
Method 1 — Loss budget split
Decide how many consecutive losses you can take before you're out. Divide your max loss by that number, and use the result as your "Account Size" with Risk % at 100.
Example: $2,000 max loss ÷ 5 losses = $400 per trade
→ Account Size: $400 | Risk %: 100
Method 2 — Direct percentage
Enter your full max loss as Account Size and set Risk % to your per-trade percentage.
Example: $2,000 max loss, risking 20% per trade
→ Account Size: $2,000 | Risk %: 20
Both give the same result — pick whichever feels more natural.
═══════════════════════════════════
✦ A NOTE FROM THE AUTHOR
Built with Claude AI for my own daily trading. Sharing it free because clean tools shouldn't be locked behind paywalls.
100% free. 100% open source. No Discord, no course, no affiliate links, nothing to buy. Copy it, modify it, republish your own version — it's yours.
═══════════════════════════════════
✦ DISCLAIMER
Educational tool only. Not financial advice. Futures trading carries substantial risk of loss. Always verify calculations against your broker's parameters before trading.
Built with ❤️ by REDz & Claude Indicatore

Indicatore

Strategia

TrueMove: Council of 7 Schools [TechnicalZen]A Decision Support System for Risk Management.
Imagine seven analysts — each a specialist in a different discipline — studying the same price chart simultaneously. One reads volume flow. Another scores multi-factor confluence. A third measures Wyckoff effort dynamics. A fourth compares wave speed and amplitude. A fifth tracks volume-weighted momentum. A sixth applies adaptive Kalman filtering. A seventh learns patterns from the instrument's own history using machine learning. Each arrives at their own independent conclusion. Then they vote.
This is what this indicator does. Seven academically grounded analytical Schools, each examining price action through a fundamentally different lens, casting independent votes on market direction. The result is not a prediction — it is a decision support system designed to help traders manage risk with confidence.
The core question it answers: "Is this move real, or is it a trap?"
When the council reaches consensus, you trade with conviction. When it doesn't, you wait. The strength of this system is not in any single School — it is in the convergence of independent perspectives. A move confirmed by volume flow, momentum, wave dynamics, and machine learning simultaneously carries fundamentally different weight than a move flagged by one method alone.
This is risk management through structured consensus. Not a black box. Not a single signal line. A council of seven independent minds, each with a transparent methodology, each with a tracked hit rate, each accountable for its calls.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The System
The indicator operates on three layers:
Signal Layer — Seven independent Schools analyze price action using different methodologies. Each votes Bull or Bear when its conditions are met.
Council Layer — Votes are aggregated. In "2+ Agree" mode, a signal fires only when two or more Schools vote in the same direction within a 3-bar window. In "All Signals" mode, any School's vote fires a signal.
Visual Layer — POC lines (anchored VWAP), EVWAP (exponentially weighted VWAP), risk/reward boxes, and direction labels present the council's verdict on the price chart.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The Council
The council aggregates school votes using a configurable consensus mechanism:
"2+ Agree" Mode — Requires two or more enabled Schools to vote in the same direction within a 3-bar window. This is the conservative mode. Fewer signals, higher conviction. If only one School is enabled, it automatically drops to requiring just that one vote.
"All Signals" Mode — Any enabled School's vote fires a signal. This is the aggressive mode. More signals, lower filtering. Useful for seeing what each School detects independently.
Conflict Resolution — If bull and bear votes arrive on the same bar, the direction with more votes wins. If tied, bull wins (consistent tie-breaking).
Cooldown — Separate bull and bear cooldowns prevent signal spam in the same direction while allowing quick reversals when the market genuinely flips.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The 7 Schools
Each School uses a fundamentally different analytical approach. They are designed to be independent — a signal from one School does not depend on or duplicate another.
School 1: OBV Flow
What it sees: Volume flow divergence and acceleration
Detects when On-Balance Volume diverges from price (hidden buying or selling pressure) and when volume flow is accelerating in a direction supported by market structure.
School 2: Confluence
What it sees: Multi-factor agreement across independent indicators
Triggers when RSI exits oversold (bull) or crosses below the momentum midline (bear) in a trending market. Scores seven independent factors and requires four or more to agree.
School 3: Wyckoff
What it sees: Effort vs Result on pullbacks, plus trap events
Measures whether pullback volume is declining relative to pre-pullback volume (Wyckoff effort), whether the bounce bar shows commitment (result), and detects Spring and Upthrust events — false breakdowns and breakouts that trap weak hands.
School 4: Amplitude Strength
What it sees: Wave dynamics — speed, time, and volume at swing points
Compares consecutive swing waves: is the trend wave faster than the pullback? Is the pullback shorter in time? Is volume declining at successive swing lows (or highs)? Is momentum oversold (or overbought) at the swing point? Scores seven wave-quality factors.
School 5: VWMA Delta
What it sees: Volume-weighted momentum crossing fair value
Computes the difference between short-term and long-term Volume Weighted Moving Averages, smooths it with RMA, and fires when this delta crosses zero. Volume is built into the measurement itself — not added as a secondary filter.
School 6: Kalman Filter (LQE)
What it sees: Adaptive filtered trend crossover
Applies two Kalman filters (Linear Quadratic Estimator) to price at different speeds. The short filter crossing above or below the long filter signals a trend shift. The Kalman filter adapts its responsiveness automatically based on estimation uncertainty.
School 7: Naive Bayes (Adaptive)
What it sees: Learned patterns in raw price action DNA
A machine learning classifier that observes six raw features no other School uses: body trend, wick dominance, price percentile, volatility regime, momentum acceleration, and gap behavior. It builds Gaussian probability profiles from resolved outcomes and votes when its confidence exceeds 65% in either direction. This School learns and adapts to the specific instrument and timeframe over time.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
School Rules — Complete Reference
School 1: OBV Flow (5 rules)
Price at/near 20-bar low (within 5% of range) — bull trigger
OBV well above its 20-bar low (>15% of OBV range) — divergence detection
OBV above its SMA(20) — volume flow trend confirmation
OBV slope accelerating (current 5-bar slope > previous) — momentum
Bull structure (higher lows) confirmed — structural context
Bear: symmetric mirror of all conditions
School 2: Confluence (9 rules — 2 trigger + 7 scored, need 4/7)
Trigger: RSI crosses above 30 (bull) or below 50 (bear)
Trigger gate: ADX ≥ 20 + price on correct side of EMA
Score: ADX ≥ 25 (strong trend)
Score: Bull/bear structure confirmed
Score: Price above/below SMA(50) (longer-term trend alignment)
Score: MACD line vs signal agreement
Score: Price touched EMA in last 2 bars (level test)
Score: Volume above average
Score: Candle body ratio > 50%
School 3: Wyckoff (9 rules — 7 standard + 2 trap events)
EMA cross initiates pullback tracking
Pullback duration ≥ 3 bars
Average pullback volume < pre-pullback average volume (declining effort)
OR average body ratio < 0.45 during pullback (narrow bars)
Bounce bar body ratio > 50% (strong commitment)
Bounce bar volume > pullback average volume (expanding effort)
EMA cross back confirms resolution
Spring: price breaks below previous swing low, closes back above with volume
Upthrust: price breaks above previous swing high, closes back below with volume
School 4: Amplitude Strength (7 scored, need 4/7)
Bull/bear structure confirmed
Trend wave amplitude > 0.8 ATR (bull: up-wave, bear: down-wave separately)
Trend wave speed > pullback speed (impulsive move, not grinding)
Pullback duration < trend wave duration (quick correction)
Current pullback shallower than previous (< 1.2x)
Current swing volume < previous swing volume (swing-to-swing comparison)
RSI < 40 at swing low (bull) / RSI > 60 at swing high (bear)
School 5: VWMA Delta (1 rule)
RMA(30) of VWMA(5) minus VWMA(30) crosses zero
School 6: Kalman Filter LQE (1 rule)
Kalman filter (length 50, R=0.01, Q=0.10) crosses above/below Kalman filter (length 100)
School 7: Naive Bayes Adaptive (6 features + confidence threshold)
Feature: 3-bar body trend (growing or shrinking candle bodies)
Feature: Wick dominance (upper vs lower wick ratio — rejection direction)
Feature: Price percentile in 20-bar range (position within recent range)
Feature: Volatility regime (ATR vs its SMA — expanding or contracting)
Feature: Momentum acceleration (bar-to-bar price change speeding up or slowing)
Feature: Gap behavior (open vs previous close, ATR-normalized)
Threshold: P(bull) ≥ 65% to vote bull, P(bull) ≤ 35% to vote bear
Requires minimum 15 resolved samples before voting
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
How the Schools Differ
Schools 1 & 5 are volume-driven — they measure where money is flowing, not where price is moving.
Schools 2 & 4 are multi-factor scoring systems — they require multiple conditions to align before voting, reducing false positives.
School 3 is event-driven — it detects specific Wyckoff structural events (springs, upthrusts, effort exhaustion) rather than continuous measurements.
School 6 is filter-driven — it uses an adaptive mathematical estimator that adjusts its own responsiveness based on estimation uncertainty.
School 7 is the only School that learns — it builds its model from the instrument's own history and adapts over time. Every other School uses fixed rules.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The Voting System
Each School votes independently. Votes are collected within a 3-bar window — Schools do not need to fire on the exact same bar to count as agreeing. This accommodates the fact that different analytical methods detect events at slightly different times.
The dashboard shows each School's most recent vote using directional emojis and colors the School name green (bull vote) or red (bear vote) when it participated in the last signal. Schools are sorted by recency — the most recently active School appears at the top of the list.
The Hit Rate column shows each School's accuracy when it participated in council signals — how often signals were correct when that School voted. This is not standalone accuracy; it measures performance within the council context.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
POC Lines (Anchored VWAP)
Three dashed lines that represent volume-weighted fair value since the last extreme volume event:
Center — the anchored VWAP: where volume-weighted price has centered since the last climax event
Upper and Lower — standard deviation bands that start at the same point as the center (origin) and branch outward as price disperses
The POC re-anchors when a volume extreme is detected (volume z-score exceeds the threshold with a directional candle). All three lines converge to a single origin point at the climax bar, then branch as the new VWAP accumulates data.
The line closest to price is highlighted with increased width and brightness. When the council signals a direction and price subsequently moves against it (crossing the POC center in the wrong direction for 3+ bars), the highlighted line changes color — red for a failed bull signal, green for a failed bear signal. This failure detection provides immediate visual feedback that the anticipated move did not materialize.
Hull smoothing can be applied to the POC lines for cleaner visual tracking.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EVWAP (Exponentially Weighted VWAP)
A solid line that tracks volume-weighted fair value with exponential decay, re-anchoring at swing direction changes:
Uses the same Exponentially Weighted Moving Average formula as the DS-VWAP methodology
Re-seeds at swing pivot points detected by the swing period setting
Volume spikes are capped at 3x the 20-bar average to prevent single bars from hijacking the calculation
Changes color based on swing direction — bull color when the most recent swing high is more recent, bear color when the most recent swing low is more recent
Direction change triangles mark where each new segment begins
Hull smoothing can be applied for a cleaner line.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The Cyclic Structure: POC within EVWAP
The POC and EVWAP operate on different cycles and anchor to different events:
EVWAP re-anchors on swing direction changes (structural pivots in price). It represents the macro fair value — where the broader trend says price should be.
POC re-anchors on volume extreme events (climax bars). It represents the micro fair value — where volume clustered after the last burst of aggressive participation.
These cycles are not synchronized. A volume climax can happen mid-swing. A swing pivot can happen without a volume extreme. When both re-anchor near the same bar, that is a structurally significant event — both macro and micro fair value are resetting simultaneously.
The POC lines oscillate within the EVWAP framework. When the POC center is above the EVWAP line, volume-weighted activity is biased above the structural trend — bullish pressure. When below, bearish pressure. This relationship provides a dynamic reading of whether short-term volume activity agrees with the broader trend direction.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Risk/Reward Boxes
When a signal fires, two boxes are drawn:
Green box (above entry for bull, below for bear) — the take-profit zone at 2:1 risk-reward ratio
Red box (below entry for bull, above for bear) — the stop-loss zone at 0.5 ATR from the signal bar's extreme
Boxes extend 15 bars forward
Higher vote counts produce slightly more opaque boxes (stronger conviction = more visible)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Hit Rate and Accuracy Tracking
The indicator tracks signal accuracy using Maximum Favorable Excursion (MFE):
After each signal, the tracker monitors the next 12 bars
If price reaches 0.5 ATR in the signal direction at any point during those 12 bars (using the bar's high for bull signals, low for bear signals), the signal is marked correct
This is not a close-at-bar-12 check — it measures whether the move occurred , not whether it held
The dashboard displays:
Per-School Hit Rate — accuracy when that School participated in the council signal
Council Accuracy — overall accuracy across all evaluated signals
Signals — evaluated count vs total fired (signals during an active evaluation window are not double-counted)
Naive Bayes Learning — current status and class distribution of the adaptive learner
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Visual Aesthetics
The indicator is designed for visual clarity on dark-themed charts:
POC lines — dashed, in a distinct blue tone, with the tracked line highlighted at double width
EVWAP line — solid, colored by swing direction (bull/bear), with direction triangles at segment starts
Climax circles — small colored dots marking extreme volume events, no glow clutter
Signal labels — directional arrows with vote counts (e.g., "↑ Up (3/7)")
Dashboard — Schools sorted by recency of last vote, with bull/bear emojis and color-coded names. Schools that voted in the most recent signal appear at the top and light up in the direction color.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Key Settings
Council Behavior — "2+ Agree" (consensus) or "All Signals" (any School)
Signal Cooldown — Minimum bars between same-direction signals (default 30). Opposite-direction signals are not blocked.
School Toggles — Enable or disable each of the 7 Schools independently.
POC/EVWAP Smoothing — Raw or Hull smoothed. Hull length configurable.
Swing Period — Controls EVWAP re-anchoring sensitivity (default 55).
Volume Lookback — Bars analyzed for climax detection and volume statistics.
NB Min Samples — Minimum resolved outcomes before the Naive Bayes School starts voting.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, and it does not constitute a recommendation to buy, sell, or hold any financial instrument.
All trading involves risk. Past performance of any signal, voting system, or analytical method does not guarantee future results. The council votes, hit rates, and accuracy statistics displayed represent computational assessments based on the indicator's rules applied to historical data loaded in TradingView. They are not predictions and should not be treated as certainties.
The Naive Bayes School learns from the chart data currently loaded. Its learned patterns may not generalize to future market conditions, different instruments, or different timeframes. The hit rates displayed in the dashboard reflect performance on the loaded chart history only and are subject to survivorship bias, lookback bias, and data limitations inherent to backtesting on historical bars.
No indicator, algorithm, or model — regardless of how many independent methods it combines — can account for all market variables including liquidity events, news-driven gaps, exchange outages, dark pool activity, or sudden regime changes.
Traders should always use independent risk management, position sizing, and their own judgment before entering any trade.
By using this indicator, you acknowledge that you are solely responsible for your own trading decisions and that the authors accept no liability for any losses incurred.
Indicatore

Indicatore

Sovereign Execution [JOAT]Sovereign Execution
Introduction
Sovereign Execution is an open-source multi-layer trading strategy that synthesizes five independent analytical engines into a unified execution framework. Rather than relying on a single indicator or a simple crossover, this strategy requires alignment across regime classification, momentum displacement, session timing, imbalance confluence, and multi-timeframe bias scoring before any trade is taken. The result is a highly selective system that filters out low-conviction setups and only enters when multiple independent analytical dimensions agree.
The strategy uses ATR-based adaptive stop-losses, configurable risk-reward ratio targets, optional trailing stops, and multiple exit conditions including regime flips and opposite displacement detection. It is designed for traders who want a systematic, rules-based approach to execution with full transparency into every decision the system makes.
Why This Strategy Exists
Most trading strategies suffer from one of two problems: they are either too simple (single-indicator entries that generate excessive noise) or too complex (dozens of conditions that are impossible to understand or debug). Sovereign Execution occupies the middle ground by using exactly five analytical layers, each addressing a different aspect of market conditions:
Regime Cipher: Is the market trending or compressing? Only trade in trending regimes.
Displacement Lens: Is there institutional momentum right now? Only enter on confirmed displacement.
Session Filter: Is the market in an active trading session? Avoid low-liquidity periods.
Imbalance Confluence: Is there a Fair Value Gap nearby? Optional confirmation of institutional interest.
Confluence Ledger: Do multiple timeframes agree on direction? Only trade when the score exceeds the threshold.
Each layer acts as an independent filter. A trade only fires when ALL active filters align simultaneously. This multi-gate approach dramatically reduces false signals compared to single-indicator strategies.
Module 1: Regime Cipher — Trend and Volatility Classification
The regime engine uses an Outlier-Resistant Moving Average (ORMA) as its foundation. The ORMA applies a square-root transformation to price, calculates a base moving average (configurable: EMA, SMA, RMA, WMA, HMA, DEMA, or TEMA), then applies a volatility-dampening filter using the ratio of full ATR to half-period ATR. This creates a moving average that is responsive to genuine trend changes but resistant to outlier spikes.
ATR-based bands are drawn above and below the ORMA. When price closes above the upper band, the regime is classified as Trending Bull. When price closes below the lower band, Trending Bear. The strategy also monitors Bollinger Band width relative to its 50-bar average to detect compression (BB width below 85% of average) and expansion (above 110%).
The key rule: the strategy only takes trades when the regime is Trending (not Compressed or Transitional). This single filter eliminates the majority of choppy, range-bound conditions where most strategies bleed money.
Module 2: Displacement Lens — Momentum Timing
The displacement engine normalizes three momentum oscillators (Bollinger %B, CCI, ROC) to a scale and blends them with a volume-weighted candle body analysis. The composite is smoothed with an EMA and compared against adaptive threshold bands calculated from the signal's own standard deviation.
A "strong bull displacement" occurs when the composite exceeds the upper threshold — meaning momentum, volume, and candle structure all confirm bullish institutional activity. Strong bear displacement is the mirror condition. The strategy only enters when displacement confirms the regime direction.
Module 3: Session Filter
Trading sessions are defined by UTC hour ranges (configurable for Asia, London, and New York). When the session filter is enabled (default), the strategy only takes trades during active sessions. This avoids entries during low-liquidity periods (overnight gaps, holiday hours) where spreads widen and price action is unreliable.
The session filter is optional — it can be disabled for instruments that trade 24/7 with consistent liquidity (e.g., major crypto pairs).
Module 4: FVG Confluence (Optional)
When enabled, the strategy scans the last 10 bars for Fair Value Gaps in the entry direction. A bullish FVG (gap up in price delivery) near the entry confirms institutional buying interest. A bearish FVG confirms selling interest. This filter is optional (default off) because not all valid setups occur near FVGs, but when enabled, it adds an additional layer of institutional confirmation.
Module 5: Confluence Score — Multi-Timeframe Bias Gate
The strategy calculates a simplified confluence score combining trend alignment, momentum, volatility state, market structure, and volume conviction on the current timeframe, then blends it with a higher timeframe score (default 4H) at a 40/60 weighting (HTF gets more weight).
The score is mapped to 0-100. Long entries require the score to exceed the long threshold (default 60). Short entries require the score to be below the short threshold (default 40). This ensures the strategy only trades when multiple analytical dimensions across timeframes agree on direction.
Entry Conditions
A long entry requires ALL of the following simultaneously:
Regime is Trending Bull (price above upper ORMA band, not compressing)
Confluence score >= long threshold (default 60)
Strong bullish displacement (composite above adaptive threshold)
Active session (if session filter enabled)
Recent bullish FVG (if FVG filter enabled)
Bar is confirmed (barstate.isconfirmed — no intrabar entries)
Short entries require the bearish mirror of all conditions. Edge detection ensures each signal fires only once — no repeated entries on the same setup.
Risk Management
Stop-Loss: ATR-based adaptive stop calculated as ATR(14) multiplied by the stop multiplier (default 1.5). For longs, the stop is placed below the entry price by this distance. For shorts, above. This means the stop automatically adapts to the instrument's current volatility — wider stops in volatile markets, tighter stops in calm markets.
Take-Profit: Calculated as the stop distance multiplied by the reward-risk ratio (default 2.0). A 1.5 ATR stop with a 2.0 R:R produces a 3.0 ATR take-profit target.
Trailing Stop: When enabled (default), the stop is trailed upward (for longs) or downward (for shorts) using the trail ATR multiplier (default 2.0). The trail only moves in the favorable direction — it never moves against the position.
Exit Conditions
Beyond the TP/SL levels, the strategy has two additional exit conditions:
Regime Flip: If the regime changes from Trending Bull to Trending Bear (or vice versa), or enters Compression, the position is closed immediately. The thesis for the trade no longer holds.
Opposite Displacement: If strong displacement fires in the opposite direction of the trade, the position is closed. Institutional momentum has shifted against the position.
Default Strategy Properties
These are the exact values used in the strategy's Properties dialog:
Initial Capital: $100,000 — a realistic account size for the average trader
Default Quantity: 5% of equity per trade — conservative position sizing
Commission: 0.04% per trade (round-trip 0.08%) — realistic for most exchanges
Slippage: 2 ticks per order — accounts for execution delay and spread
Pyramiding: 0 — only one position at a time
Calc on Every Tick: false — entries only on bar close for realistic execution
These settings are intentionally conservative. The commission and slippage values are included to produce realistic backtesting results. Traders should adjust these values to match their specific broker/exchange conditions.
Visualization
Regime MA: The ORMA line plotted with a glow effect (crisp line + transparent wider line) colored by trend state — teal for bullish, rose for bearish, gray for neutral
ATR Bands: Upper and lower bands showing the regime breakout thresholds
SL/TP Levels: When a position is active, the stop-loss (red), take-profit (green), and entry price (gray) are plotted as horizontal lines
Gradient Candles: Candles colored by the confluence score — transitioning from bearish rose (low score) to bullish teal (high score)
Session Background: Subtle amber tint when an active session is in progress
10-Row Dashboard
Row 1: Header — "SOVEREIGN EXECUTION"
Row 2: Regime — TREND LONG / TREND SHORT / COMPRESSED / TRANSITIONAL
Row 3: Displacement — BULL DISP / BEAR DISP / NEUTRAL
Row 4: Session — ASIA / LONDON / NEW YORK / OFF-SESSION
Row 5: Confluence — Score value + bias classification
Row 6: Volatility — EXPANDING / COMPRESSED / NORMAL
Row 7: Position — LONG / SHORT / FLAT
Row 8: Entry — Entry price when in a trade
Row 9: Stop — Current stop-loss level
Row 10: Target — Current take-profit level
Input Parameters
Execution Parameters:
Risk Per Trade % (default 1.5) — percentage of equity risked per trade
Reward:Risk Ratio (default 2.0) — take-profit as multiple of stop distance
ATR Stop Multiplier (default 1.5) — stop distance as ATR multiple
Use Trailing Stop (default on), Trail ATR Multiplier (default 2.0)
Entry Filters:
Confluence Threshold Long (default 60) — minimum score for long entries
Confluence Threshold Short (default 40) — maximum score for short entries
Require Active Session (default on)
Require FVG Confluence (default off)
Regime Cipher Parameters:
Adaptive MA Length (default 27), ATR Length (default 14), ATR Factor (default 1.05)
Base MA type (default EMA, options: RMA/SMA/EMA/WMA/HMA/DEMA/TEMA)
Displacement Parameters:
BB Length (20), BB Multiplier (2.0), CCI Length (23), ROC Length (50)
Displacement Smoothing (default 5)
Session Filter (UTC):
Asia Start/End (0/8), London Start/End (8/14), NY Start/End (14/21)
Strategy Limitations and Compromises
Every strategy involves design compromises. Here are the key ones for Sovereign Execution:
Selectivity vs Frequency: The multi-gate filter approach produces fewer trades than single-indicator strategies. On some instruments/timeframes, the strategy may go days without a signal. This is by design — it prioritizes quality over quantity — but it means the strategy needs sufficient historical data to produce a meaningful sample size.
Regime Lag: The ORMA-based regime classification has inherent lag. It will not catch the exact top or bottom of a trend. The strategy enters after the trend is confirmed, which means it misses the first portion of moves.
Session Filter Limitation: The UTC-based session filter works well for forex and indices but may need adjustment for instruments with non-standard trading hours. Crypto traders may want to disable the session filter entirely.
Single Timeframe Execution: While the confluence score incorporates HTF data, entries and exits are executed on the chart's timeframe. Very fast timeframes (1m) may produce noisy signals despite the filters.
Backtesting Caveats: All backtesting results are historical and do not guarantee future performance. The strategy uses calc_on_every_tick=false and barstate.isconfirmed to produce realistic entries, but real-world execution will always differ from backtesting due to slippage, partial fills, and latency.
No Guarantee of Profitability: This strategy is a systematic framework, not a profit guarantee. Market conditions change, and strategies that worked historically may underperform in different regimes.
Recommended Usage
Use on liquid instruments (major forex pairs, large-cap stocks, major crypto) for most reliable signals
Test on the 15m to 4H timeframe range — these provide enough bars for the regime and displacement engines while maintaining meaningful session context
Ensure the backtest produces at least 100 trades for statistical significance before drawing conclusions
Adjust commission and slippage to match your specific broker/exchange
Consider the strategy as one component of a broader trading plan, not a standalone system
Originality Statement
This strategy is original in its multi-layer filter architecture. While individual components (moving averages, momentum oscillators, session filters) are established concepts, this strategy is justified because:
It synthesizes five independent analytical engines (regime classification, displacement measurement, session timing, imbalance confluence, multi-TF scoring) into a unified execution framework where ALL must align for entry
The ORMA-based regime engine uses a volatility-dampened, outlier-resistant moving average with ATR bands — not a standard MA crossover
The displacement engine normalizes three oscillators and blends them with volume-weighted candle body analysis for institutional-grade momentum confirmation
The confluence score combines five analytical dimensions with HTF weighting, producing a quantitative bias gate rather than a subjective assessment
Multiple exit conditions (regime flip, opposite displacement, trailing stop, TP/SL) provide layered risk management beyond simple stop-loss
The strategy uses realistic default settings (commission, slippage, position sizing) and documents all Properties values for transparent backtesting
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Backtesting results shown are historical and do not guarantee future performance. The results of a single backtest run do not constitute proof that the strategy will be profitable in the future. Market conditions change, and strategies that performed well historically may underperform or lose money in different market environments.
The default settings (commission 0.04%, slippage 2 ticks, 5% equity per trade, $100,000 initial capital) are designed to produce realistic results. Users should verify these match their trading conditions and adjust accordingly.
Always use proper risk management. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions. The author is not responsible for any losses incurred from using this strategy.
-Made with passion by officialjackofalltrades
Strategia

Trade Strategy Calculator [WillyAlgoTrader]📊 Trade Strategy Calculator is the first comprehensive mathematical strategy calculator built entirely inside TradingView — a 4-panel dashboard that computes position sizing, risk analysis, deposit growth projection, and Kelly Criterion optimization in real time, directly on your chart. No spreadsheets, no external tools, no switching tabs. Every number you need before entering a trade — position size, stop loss level, take-profit targets, commission impact, expected value, probability of ruin, compound growth forecast, and optimal bet sizing — calculated from your strategy parameters and displayed in a single organized view.
This tool is useful for every trader regardless of market, instrument, or timeframe — stocks, forex, crypto, futures, indices, commodities. Whether you trade scalping on 1-minute charts or swing on daily, whether you use 1x spot or 125x futures leverage — the mathematics of position sizing, risk management, and bankroll growth are universal. This calculator puts those mathematics at your fingertips.
🧩 WHY ALL FOUR PANELS WORK TOGETHER
Most traders calculate position size in isolation — they know how much to risk but don't connect it to their long-term growth trajectory. They know their win rate but don't know if it's mathematically profitable after commissions. They have a "feel" for their risk level but haven't computed what happens after 7 consecutive losses.
This calculator connects four mathematical dimensions into one coherent picture:
🎯 TRADE panel answers: "How large should this specific trade be, and what are the exact entry/SL/TP prices?"
⚠️ RISK panel answers: "What happens when things go wrong — how many losses until I hit my daily limit, my max drawdown, and what's my expected value per trade?"
📈 GROWTH panel answers: "If I trade consistently with these parameters, where will my deposit be in 30/90/365 days — and how long to reach my target?"
📐 KELLY panel answers: "Am I betting the mathematically optimal amount — or am I over-betting (risking ruin) or under-betting (leaving growth on the table)?"
A trader who only uses the TRADE panel knows their position size but not whether their strategy has positive expected value. A trader who only uses KELLY knows the optimal bet size but not the specific position for their current trade. A trader who only uses GROWTH knows the projection but not whether the underlying math is sound. All four together give you the complete picture: "Is my strategy profitable? Am I sizing correctly? What's the worst case? And where does this lead?"
🔍 WHAT MAKES IT ORIGINAL
There is no other indicator on TradingView that combines all four of these mathematical models — position sizing, risk stress testing, compound growth simulation, and Kelly Criterion — into a single, real-time, interactive dashboard. Each panel alone would be a useful tool. Together, they create something that doesn't exist elsewhere on the platform.
🎯 PANEL 1 — TRADE (Position Sizing + Targets)
This panel calculates the exact position size for your trade based on your deposit, risk percentage, stop loss distance, leverage, and commissions.
Core formula:
positionSize = riskAmount / (slDistance% + commissionBothSides)
Where:
— riskAmount = deposit × riskPerTrade%
— slDistance% = slPercent × (1 + slippage%) — slippage is added to the stop distance for realistic sizing
— commissionBothSides = commission% × 2 (open + close)
This formula ensures that if your stop loss is hit, you lose exactly riskAmount — not more, not less — after accounting for both slippage and round-trip commission.
What you see:
— Direction (Long / Short)
— Entry Price (manual or auto from chart)
— Stop Loss price (calculated from entry ± SL%)
— 💰 Position Size in USD — the headline number
— Margin Required (if leverage > 1)
— Quantity (units/coins/shares)
— 🔴 Risk (loss) in USD and % of deposit
— 🟢 Profit at TP — in USD, % of deposit, and net R:R after commission
— TP Price level
— Commission cost in USD
— Liquidation price (for leveraged positions)
— ⚠️ Insufficient margin warning (if position exceeds deposit)
Multi Take-Profit mode:
When enabled, the position is split across 2 or 3 TP levels with configurable volume allocation:
— TP1 at R:R 1.0 with 50% of position → locks partial profit early
— TP2 at R:R 2.0 with 30% → captures the main move
— TP3 at R:R 3.0 with 20% (if 3 TPs) → runner for extended moves
Each TP shows: profit in USD, target price. The panel also computes:
— Total blended profit across all TPs
— Net R:R (blended, after commissions)
— Breakeven price after TP1 — the price where your remaining position becomes zero-loss after banking TP1 profit. This is critical: after TP1, you move your stop to this price — the trade can no longer lose money.
Example:
Deposit: $10,000. Risk: 1% ($100). SL: 2%. Commission: 0.04%.
Position = $100 / (0.02 + 0.0008) = $4,808.
If BTC at $100,000 → SL at $98,000, TP1 at $102,000.
If stopped out → you lose exactly $100 (1% of deposit).
If TP1 hit → you gain ~$96 (after commission).
⚠️ PANEL 2 — RISK (Stress Testing + Expected Value)
This panel answers: "What happens when I have a losing streak, and is my strategy mathematically profitable?"
Daily risk limit:
maxLosingDaily = floor(dailyRiskLimit% / riskPerTrade%)
Example: 3% daily limit, 1% per trade → you stop after 3 losses in a day.
Max drawdown limit:
maxLosingTotal = floor(maxDrawdown% / riskPerTrade%)
Example: 20% max DD, 1% per trade → 20 consecutive losses to hit max DD.
Stress test — losing streaks:
The panel computes what happens after 5, 7, and 10 consecutive losses:
— depositAfterN = deposit × (1 − riskPerTrade%)^N
— drawdownAfterN = (1 − (1 − riskPerTrade%)^N) × 100%
— probabilityOfN = (1 − winrate%)^N × 100%
Example: $10,000 deposit, 1% risk, 55% winrate:
— 5 losses: −4.9% DD ($9,510), probability 1.85%
— 7 losses: −6.8% DD ($9,321), probability 0.37%
— 10 losses: −9.6% DD ($9,044), probability 0.03%
This tells you: a 5-loss streak WILL happen (1.85% probability over hundreds of trades). A 10-loss streak is extremely rare (0.03%). Your risk% must be sized so that even the realistic worst case doesn't blow your account.
Expected Value (EV):
EV per trade = winrate × riskAmount × avgR:R − (1 − winrate) × riskAmount − commission
This is the single most important number in trading. If EV > 0, your strategy makes money over time. If EV < 0, no amount of position sizing saves you.
The panel shows:
— 📈 EV per trade in USD (highlighted — this is the headline metric)
— EV per 100 trades
— Break-even winrate WITH commission — the minimum winrate needed to be profitable at your R:R, accounting for commission drag
— Your actual WR and R:R for comparison
Break-even winrate formula (with commission):
beWinrate = (1 + commissionCost / riskAmount) / (avgR:R + 1)
This is more accurate than the standard 1/(R:R+1) because it accounts for commission reducing your net edge.
📈 PANEL 3 — GROWTH (Deposit Projection + Scenarios)
This is the unique deposit growth simulator — it projects where your deposit will be after N days of consistent trading, using either compound (reinvest profits) or simple (fixed risk from initial deposit) growth.
Compound growth formula:
EV per trade as % = winrate × (risk% × R:R) − (1 − winrate) × risk%
totalTrades = tradesPerDay × projectionDays
finalDeposit = deposit × (1 + evPerTrade%)^totalTrades
Simple growth formula:
finalDeposit = deposit + deposit × evPerTrade% × totalTrades
The difference is massive. Compound growth reinvests profits — each winning trade increases the base for the next trade. Simple growth always risks a fixed amount from the initial deposit.
Example — compound vs simple:
$1,000 deposit, 55% WR, 1:2 R:R, 1% risk, 3 trades/day, 30 days:
— Simple: $1,000 + $1,000 × 0.65% × 90 = $1,585
— Compound: $1,000 × (1.0065)^90 = $1,795
Over 90 days: $1,585 vs $1,795. Over 365 days the gap becomes enormous. This is why compound growth (reinvesting profits) is the key to deposit acceleration.
Three scenarios:
— 🟢 Optimistic: your winrate + 10% (what happens if you're having a great month)
— 🟡 Realistic: your actual parameters
— 🔴 Pessimistic: your winrate − 10% (what happens during a drawdown period)
This gives you a range, not a single number. If even the pessimistic scenario is positive, your strategy is robust.
Goal milestones:
— Days to 2× deposit (double your money)
— Days to 3× deposit
— Days to custom target ($5,000, $10,000, etc.)
Formula: daysToTarget = log(target / deposit) / (log(1 + evPerTrade%) × tradesPerDay)
Risk metrics:
— Max estimated drawdown: based on expected worst losing streak × risk%
— Ruin probability: the probability of losing your entire bankroll at your current risk level
Ruin probability formula:
edge = winrate × R:R − (1 − winrate)
bankrollUnits = floor(100 / risk%)
ruinProb = ((1 − winrate) / (winrate × R:R))^bankrollUnits
If edge ≤ 0, ruin probability is effectively 100%. If edge > 0, ruin probability decreases exponentially with more bankroll units (lower risk%).
Presets for quick scenarios:
— Beginner: 45% WR, 1:2 R:R, 1% risk — conservative starting point
— Moderate: 55% WR, 1:2 R:R, 2% risk — typical intermediate trader
— Aggressive: 50% WR, 1:3 R:R, 3% risk — higher risk, needs discipline
— Custom: uses your exact My Strategy values
📐 PANEL 4 — KELLY CRITERION (Optimal Bet Sizing)
The Kelly Criterion is the mathematically optimal percentage of your bankroll to risk on each bet, given your edge. It maximizes the long-term growth rate of your account.
Kelly formula:
edge = winrate × avgR:R − (1 − winrate)
kellyPercent = edge / avgR:R
If edge ≤ 0 → Kelly = 0% (no edge, don't trade). If edge > 0 → Kelly tells you the maximum you should risk.
What the panel shows:
— Your winrate and avg R:R
— Break-even winrate (with commission)
— 📐 Edge per $1 risked — your mathematical advantage. If +$0.15, every $1 risked returns $1.15 on average.
— Full Kelly % — the theoretical maximum. Most traders should NOT use this — it's too aggressive.
— Half Kelly ✦ — the recommended practical value. Reduces variance by ~75% while giving up only ~25% of growth.
— Quarter Kelly — ultra-conservative, minimal variance.
— Your current risk % — so you can compare
— Status: 🟢 Optimal (between half and full Kelly), 🟡 Conservative (below half), 🔴 Over-bet (above full Kelly), 🚨 >2× Kelly (danger zone)
Growth rate comparison:
— Growth rate at Kelly %: the compound growth rate per trade at the optimal bet size
— Growth rate at your %: your actual compound growth rate per trade
Formula: growthRate = winrate × log(1 + risk% × R:R) + (1 − winrate) × log(1 − risk%)
If your rate is close to the Kelly rate, you're near-optimal. If it's much lower, you're leaving growth on the table. If it's negative (possible when over-betting!), you're actually losing money despite having a positive edge — the over-betting destroys the compounding.
Why this matters:
A trader with a 55% WR and 1:2 R:R has an edge. Kelly says risk ~4.6%. But if that trader risks 10% per trade (2× Kelly), their actual growth rate can become negative — they go broke despite having a winning strategy. This is the most counterintuitive result in trading mathematics: over-betting a winning system turns it into a losing system . The Kelly panel prevents this.
📖 HOW TO USE — STEP BY STEP
Step 1 — Enter your strategy parameters (My Strategy section):
— Deposit: your actual account balance in USD
— Risk per Trade: how much you risk per trade (start with 1% if unsure)
— Winrate: your historical win rate (be honest — check your journal)
— Average R:R: your average reward-to-risk on winning trades
— Trades per Day: how many trades you typically take
— Leverage: 1 for spot, or your futures leverage
— Commission: your exchange fee per side (Binance Futures taker: 0.04%)
Step 2 — Set up your current trade (Trade Setup section):
— Direction: Long or Short
— Stop Loss %: how far your SL is from entry
— Risk:Reward: your target R:R for this trade
— Entry Price: manual or auto from chart
Step 3 — Read the TRADE panel:
— The 💰 Position Size number is your order size in USD
— If using leverage, check Margin Required doesn't exceed your deposit
— Note the SL and TP prices — set these in your exchange
Step 4 — Check the RISK panel:
— Is your EV per trade positive? If not, your strategy loses money long-term
— Is your winrate above the break-even? If not, improve your R:R
— Check the stress test: can your deposit survive 7 losses in a row?
— If the risk badge shows 🚨 DANGER, reduce your risk% or leverage
Step 5 — Review the GROWTH panel:
— The projected deposit shows where you'll be in 30 days
— Check the pessimistic scenario — is it still above your starting deposit?
— Note the days to 2× — this is your compound growth timeline
— If ruin probability > 5%, your risk is too high
Step 6 — Optimize with KELLY panel:
— Compare your risk% to Half Kelly — this is the recommended level
— If Status shows 🔴 Over-bet, reduce your risk%
— If Status shows 🟡 Conservative, you could increase (but don't have to)
— Check Growth Rate at Your % — is it positive? Is it close to Kelly's rate?
🎯 PRACTICAL EXAMPLES
Example 1 — Conservative Spot Trader:
Deposit $5,000, Risk 1%, WR 55%, R:R 1:2, 2 trades/day, No leverage, Commission 0.1%
— Position: ~$2,500 per trade. Risk: $50.
— EV: +$5.60 per trade. Positive — strategy is profitable.
— 30-day projection (compound): $5,000 → $5,705 (+14.1%)
— Days to double: ~98 days
— Kelly: 4.6%. Your 1% = conservative. Status: 🟡
Example 2 — Crypto Futures Scalper:
Deposit $1,000, Risk 2%, WR 50%, R:R 1:3, 5 trades/day, Leverage 10x, Commission 0.04%
— Position: ~$10,000 per trade. Margin: $1,000. Risk: $20.
— EV: +$10.40 per trade. Strong positive edge.
— 30-day projection (compound): $1,000 → $4,680 (+368%)
— Days to double: ~14 days
— Kelly: 8.3%. Your 2% = well below Kelly. Room to grow.
— ⚠️ But 7-loss streak probability: 0.78%. DD: −13.2%. Manageable.
Example 3 — Why Over-Betting Kills:
Same as Example 2, but Risk 15% (almost 2× Kelly):
— EV per trade still positive (+$78)
— BUT growth rate per trade: NEGATIVE (−0.3%)
— 30-day projection: $1,000 → $620 (−38%)
— Kelly Status: 🚨 >2× Kelly
— Despite winning 50% with 1:3 R:R, you LOSE money because over-betting destroys compounding.
⚙️ KEY SETTINGS REFERENCE
⚙️ My Strategy:
— Deposit : account balance in USD
— Risk per Trade (default 1%): % of deposit risked per trade
— Winrate (default 55%): historical win rate
— Average R:R (default 2.0): average reward-to-risk on wins
— Trades per Day (default 3): daily trade count
— Leverage (default 1): 1 = spot, >1 = futures
— Commission (default 0.04%): exchange fee per side
🎯 Trade Setup:
— Direction : Long / Short
— Stop Loss % (default 1%): SL distance from entry
— Risk:Reward (default 2.0): target R:R
— Slippage (default 0.05%): expected execution slippage
— Entry Price : Manual or Auto (chart price)
🎯 Multi Take-Profit:
— Enable Multi TP (default Off): split into 2–3 targets
— R:R for TP1/TP2/TP3 (default 1.0/2.0/3.0)
— Volume allocation (default 50%/30%/20%)
📈 Growth Projection:
— Preset : Beginner / Moderate / Aggressive / Custom
— Projection Period (default 30 days)
— Compound (default On): reinvest profits
— Target Deposit (default 0 = off): goal amount
— Max Daily Risk (default 3%): daily loss limit
— Max Drawdown (default 20%): total DD limit
🎨 Visual:
— Font Size: Tiny / Small / Normal / Large
— Auto / Dark / Light theme
⚠️ IMPORTANT NOTES
— 📊 This is a calculator, not a signal generator. It does not produce buy/sell signals. It computes the mathematical framework for your trading decisions — position sizing, risk limits, growth projections, and optimal bet sizing. The math is universal and applies to any strategy.
— 📐 All calculations are deterministic — they depend only on your input parameters, not on price data. The dashboard updates in real-time when you change any input.
— ⚖️ The growth projection assumes consistent strategy parameters over the projection period. Real trading involves varying win rates, R:R ratios, and market conditions. The three scenarios (optimistic/realistic/pessimistic) partially address this by showing a range.
— 📏 The Kelly Criterion assumes known, fixed probabilities . In practice, your winrate and R:R fluctuate. This is why Half Kelly (not Full Kelly) is recommended — it accounts for parameter uncertainty.
— 💰 Commission is calculated as round-trip (both sides) and deducted from both profit calculations and expected value. This provides realistic net returns.
— 📊 The break-even winrate calculation includes commission drag — it's higher than the simplified 1/(R:R+1) formula because commission erodes your edge.
— 🔄 The compound growth formula uses logarithmic overflow protection — if the projected growth exceeds exp(23) ≈ 10 billion ×, it displays "∞" instead of crashing.
— 🛠️ Works on any chart, any instrument, any timeframe . The calculator is price-independent — it uses your manual inputs. "Auto" entry price mode uses the current chart close for convenience.
— 🌐 Useful for all markets : stocks (set leverage = 1, commission = 0.1%), forex (adjust for pip-based SL), crypto spot (leverage = 1), crypto futures (set your leverage), indices, commodities. Indicatore

Indicatore

Singularity Convergence Protocol [JOAT]Singularity Convergence Protocol
Introduction
The Singularity Convergence Protocol is an advanced open-source multi-system confluence strategy that combines eight distinct analytical methodologies into a unified trading system. This strategy integrates momentum analysis, Smart Money Concepts, velocity waves, liquidity tracking, trend detection, divergence analysis, volatility measurement, and institutional flow into a comprehensive decision-making engine that generates high-probability trading signals through systematic confluence scoring.
Unlike single-indicator strategies, the Singularity Convergence Protocol provides institutional-grade signal generation through multi-dimensional analysis, weighted confluence scoring, and adaptive risk management. The strategy is designed for traders who understand that the highest probability setups occur when multiple independent analytical systems align simultaneously, creating a "singularity" of confluence.
Why This Strategy Exists
This strategy addresses the critical challenge of signal reliability in algorithmic trading. By requiring confluence across multiple independent systems, it dramatically reduces false signals while identifying the highest probability setups. The strategy reveals:
System 1 - Momentum Analysis: Quantum Flux Oscillator methodology combining VFI, Laguerre RSI, Fisher Transform, TSI, MFI, OBV, and A/D
System 2 - Structure Detection: Smart Money Concepts including Order Blocks, Fair Value Gaps, Liquidity Levels, and Market Structure
System 3 - Velocity Waves: Multi-layer momentum spectrum with five EMA layers and ALMA enhancement
System 4 - Liquidity Tracking: Pivot-based liquidity detection with sweep confirmation
System 5 - Trend Analysis: Hull MA, SuperTrend, ADX, and moving average alignment
System 6 - Divergence Detection: Multi-oscillator divergence with RSI, MACD, TSI, and Stochastic
System 7 - Volatility Analysis: ATR, Bollinger Bands, Keltner Channels, Historical Volatility, and Squeeze detection
System 8 - Institutional Flow: CMF, MFI, OBV, VWAP, and A/D Line integration
Core Strategy Logic
1. Eight Independent Analytical Systems
Each system operates independently and generates binary signals (bullish/bearish):
Momentum System:
Calculates composite momentum from seven components
Generates bullish signal when momentum > 0 and rising
Generates bearish signal when momentum < 0 and falling
Score: +1 for bullish, -1 for bearish, 0 for neutral
Structure System:
Detects order blocks, FVGs, and market structure
Bullish when OB/FVG active + bullish structure + discount zone
Bearish when OB/FVG active + bearish structure + premium zone
Score: +1 for bullish, -1 for bearish, 0 for neutral
Velocity Wave System:
Analyzes five momentum layers with ALMA enhancement
Bullish when Basis 1 > Basis 2 and rising with spread > 5
Bearish when Basis 1 < Basis 2 and falling with spread < -5
Score: +1 for bullish, -1 for bearish, 0 for neutral
Liquidity System:
Tracks liquidity sweeps with volume confirmation
Bullish when SSL swept with volume surge
Bearish when BSL swept with volume surge
Score: +1 for bullish, -1 for bearish, 0 for neutral
Trend System:
Combines Hull MA, SuperTrend, ADX, and MA alignment
Bullish when Hull rising + SuperTrend bullish + ADX > 20 + MA alignment
Bearish when Hull falling + SuperTrend bearish + ADX > 20 + MA alignment
Score: +1 for bullish, -1 for bearish, 0 for neutral
Divergence System:
Detects divergences across RSI, MACD, TSI, and Stochastic
Bullish when regular bullish divergence with 2+ oscillator confluence
Bearish when regular bearish divergence with 2+ oscillator confluence
Score: +1 for bullish, -1 for bearish, 0 for neutral
Volatility System:
Measures volatility through ATR, BB Width, KC, HV, and Squeeze
Bullish when squeeze breakout upward with low volatility index
Bearish when squeeze breakout downward with low volatility index
Score: +1 for bullish, -1 for bearish, 0 for neutral
Institutional Flow System:
Tracks institutional positioning through CMF, MFI, OBV, VWAP, A/D
Bullish when flow index > 10 with CMF > 0 and MFI > 50
Bearish when flow index < -10 with CMF < 0 and MFI < 50
Score: +1 for bullish, -1 for bearish, 0 for neutral
2. Confluence Scoring System
The strategy employs two scoring methods:
Binary Signal Count:
Counts how many systems generate bullish signals (0-8)
Counts how many systems generate bearish signals (0-8)
Minimum signals required (default: 2) filters weak setups
Weighted Confluence Score:
Sums all system scores (range: -8 to +8)
Adds bonus points for extreme conditions:
- Extreme momentum regimes (+1)
- All velocity layers aligned (+1)
- 4/4 divergence confluence (+1)
- Volume surge with strong flow (+1)
Total score can exceed ±8 with bonuses
3. Entry Conditions
Two entry modes are available:
Standard Mode (Binary Count):
Long Entry: Bullish signals >= minimum AND bullish signals > bearish signals
Short Entry: Bearish signals >= minimum AND bearish signals > bullish signals
Simple and straightforward
Confluence Mode (Weighted Score):
Long Entry: Total bullish score >= minimum AND bullish score > bearish score
Short Entry: Total bearish score >= minimum AND bearish score > bullish score
Accounts for bonus conditions and extreme setups
4. Risk Management System
The strategy includes comprehensive risk management:
Position Sizing:
Risk per trade: Percentage of equity (default: 2%)
Position size calculated based on stop distance and risk percentage
Prevents over-leveraging on any single trade
Stop Loss Placement:
ATR-based stops: Stop distance = ATR × multiplier (default: 2.0)
Long stops: Entry price - (ATR × multiplier)
Short stops: Entry price + (ATR × multiplier)
Adapts to current volatility
Take Profit Targets:
Risk:Reward ratio (default: 2.0)
Target distance = Stop distance × R:R ratio
Long targets: Entry price + (Stop distance × R:R)
Short targets: Entry price - (Stop distance × R:R)
Trailing Stops:
Optional trailing stop (default: enabled)
Trail distance = ATR × trailing multiplier (default: 3.0)
Locks in profits as trade moves favorably
Adjusts to volatility changes
5. Visual Features
The strategy includes comprehensive visual elements:
Hull Moving Average: Primary trend line with dynamic coloring
SuperTrend Bands: Dynamic support/resistance levels
EMA Matrix: Three EMAs showing trend alignment
Order Block Boxes: Bullish and bearish OB zones
Fair Value Gap Boxes: FVG zones with dashed borders
Liquidity Lines: BSL and SSL levels with sweep tracking
Equilibrium Line: Premium/discount zone reference
Background Coloring: Regime indication (extreme bull/bear, squeeze, entry signals)
Information Dashboard: Real-time display of all metrics and scores
Dashboard Metrics
The comprehensive dashboard displays:
Bull/Bear Scores: Total confluence scores with signal counts
Volatility Index: Current volatility level and regime
Spread: Velocity wave spread indicating momentum strength
Flow Index: Institutional positioning measurement
Price Zone: Premium/discount position with percentage
Win Rate: Strategy performance with trade count
Position: Current position status (Long/Short/Flat)
Signal: Current signal status with confluence indication
Strategy Settings and Defaults
Backtest Configuration:
Initial Capital: $100,000
Position Size: 100% of equity (adjusted by risk management)
Commission: 0.1% per trade
Slippage: 2 ticks
Pyramiding: Disabled (one position at a time)
Risk Management Defaults:
Risk Per Trade: 2.0% of equity
Stop Loss: 2.0 × ATR
Take Profit: 2.0 × Risk (2:1 R:R)
Trailing Stop: Enabled, 3.0 × ATR
Strategy Defaults:
Minimum Signals: 2 (requires at least 2 systems to agree)
Use Confluence Scoring: Enabled (uses weighted scores)
Show Visual Features: Enabled (displays all chart elements)
How to Use This Strategy
Step 1: Configure Risk Parameters
Set risk per trade, stop loss ATR multiplier, and take profit R:R ratio based on your risk tolerance.
Step 2: Choose Entry Mode
Select standard mode (binary count) for simplicity or confluence mode (weighted scores) for advanced filtering.
Step 3: Set Minimum Signals
Higher minimum (3-4) = fewer but higher quality trades. Lower minimum (2) = more trades but lower quality.
Step 4: Enable Trailing Stops
Trailing stops lock in profits on winning trades. Adjust trailing ATR multiplier based on market volatility.
Step 5: Monitor Dashboard
Watch bull/bear scores in real-time. Scores >= 4 indicate strong confluence. Scores >= 6 indicate exceptional setups.
Step 6: Review Visual Confluence
Check that multiple visual elements align: trend, structure, liquidity, and flow should all confirm signal direction.
Step 7: Backtest Thoroughly
Test on multiple instruments and timeframes. Adjust parameters based on results. Aim for 100+ trades for statistical significance.
Best Practices
Use on liquid instruments (major forex, large-cap stocks, major crypto)
Test on multiple timeframes - higher timeframes generally more reliable
Increase minimum signals in choppy markets, decrease in trending markets
Monitor win rate - aim for 40%+ with 2:1 R:R for profitability
Adjust stop loss ATR multiplier based on instrument volatility
Use confluence mode for highest quality signals
Review dashboard before entering - ensure multiple systems align
Combine with higher timeframe analysis for additional confirmation
Be patient - wait for high confluence scores (4+) for best results
Respect the risk management - never override stop losses
Strategy Limitations
Requires sufficient historical data for all eight systems
May generate fewer signals than single-indicator strategies
Performance varies by instrument and timeframe
Backtesting results do not guarantee future performance
Slippage and commission can significantly impact results
Extreme market conditions may cause all systems to fail simultaneously
Requires regular monitoring and parameter adjustment
Not suitable for very low timeframes (< 5 minutes) due to noise
Input Parameters
Risk Management:
Risk Per Trade %: Percentage of equity to risk (default: 2.0%)
Stop Loss (ATR): ATR multiplier for stops (default: 2.0)
Take Profit (R:R): Risk:reward ratio (default: 2.0)
Use Trailing Stop: Enable trailing stops (default: enabled)
Trailing ATR: ATR multiplier for trailing (default: 3.0)
Strategy Settings:
Minimum Signals: Required system agreements (default: 2)
Use Confluence Scoring: Enable weighted scoring (default: enabled)
Show Visual Features: Display chart elements (default: enabled)
Originality Statement
This strategy is original in its comprehensive multi-system approach. While individual analytical methodologies are established concepts, this strategy is justified because:
It integrates eight distinct analytical systems into a unified decision-making engine
The confluence scoring system measures agreement across independent methodologies
Bonus scoring for extreme conditions identifies exceptional setups
Comprehensive risk management adapts to volatility and account size
Visual integration allows traders to verify confluence across multiple dimensions
The dashboard provides real-time transparency into all system states
Systematic approach removes emotional decision-making from trading
Strategy Performance Notes
When publishing this strategy, ensure you:
Use realistic account size (default: $100,000)
Include realistic commission (0.1%) and slippage (2 ticks)
Generate 100+ trades for statistical significance
Document all default settings in description
Explain risk management parameters clearly
Show results on multiple instruments/timeframes
Discuss limitations and market conditions where strategy works best
Never make unrealistic claims about future performance
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Past performance does not guarantee future results. Backtesting results are hypothetical and do not represent actual trading. Actual results may differ significantly from backtested results due to slippage, commission, market conditions, and execution differences.
The strategy combines multiple analytical systems, but no combination of indicators can predict future price movement with certainty. Market conditions change, and strategies that worked historically may not work in the future. Users must conduct their own analysis and risk assessment before using this strategy.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this strategy. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Strategia

Multi-Leverage VAR/VaG IndicatorHere's why I developed this indicator: I love leverage but most people don't use leverage correctly. This indicator helps you understanding whether leverage is advantageous and how much should be used.
Standard VAR calculations assume linear scaling (2x leverage = 2x risk), which is wrong for leveraged ETFs. Also, most VaR indicators show risk without comparing it to potential reward. This one tells you how do you quantify whether current market conditions are friendly or hostile to leveraged positions?
To do this, we calculate both the downside risk (VAR), upside potential (VaG), and their relationship across different leverage levels.
PROBLEMS THIS INDICATOR SOLVES
THE LEVERAGE SCALING FALLACY
Problem: Traders assume 3x leverage means 3x the risk.
Reality: Due to volatility decay and daily rebalancing, leveraged ETFs don't scale linearly. A 3x ETF can lose MORE than 3x in high downside volatility markets or LESS than 3x during up trending markets.
Solution: This indicator simulates actual leveraged ETF mechanics by applying leverage to each daily return and compounding over your holding period.
THE REGIME BLINDNESS PROBLEM
Problem: Traders use the same leverage in all market conditions.
Reality: Trending, low-volatility markets favor leverage. Choppy, high-volatility markets penalize leverage through volatility drag.
Solution: The VaG/|VAR| ratio quantifies leverage efficiency. When the leverage VaG/|VAR| is higher than the 1x VaG/|VAR|, then leverage is friendly .
THE RISK-WITHOUT-CONTEXT PROBLEM
Problem: Knowing your maximum loss doesn't tell you if that risk is worth taking.
Reality: A -10% VAR might be acceptable if VaG is +30%, but terrible if VaG is only +8%.
Solution: I calculate both downside and upside at the same confidence level for complete risk/reward context.
HOW THIS INDICATOR IS USEFUL TO INVESTORS
Determine optimal leverage level for current market conditions
Identify when to scale up or reduce leveraged positions based on regime changes
Calculate dollar risk on any account size for proper position sizing
Understand true risk of leveraged ETFs beyond the "3x" label
Detect transitions between leverage-friendly and leverage-hostile regimes
CORE METHODOLOGY: Historical simulation with daily rebalancing
Unlike parametric VAR (assumes normal distribution) or Monte Carlo (generates synthetic scenarios), this uses historical simulation - what actually happened in the past.
Calculate daily returns from closing prices
Simulate leveraged ETF behavior with daily rebalancing - apply leverage to each daily return, compound over the holding period, and cap losses at -100% (ETFs can't go negative)
Create a distribution by sliding the holding period window across the lookback period (252-day lookback with 21-day holding = 232 scenarios)
Sort all outcomes and extract percentiles: VAR = lower tail (e.g., 5th percentile at 95% confidence), VaG = upper tail (e.g., 95th percentile)
Calculate efficiency ratio: VaG / |VAR|
This tells you: for every dollar of downside risk, how many dollars of upside potential do you get?
HOW TO USE THIS INDICATOR
Lookback Period (default: 252 days) - Longer = more data but slower to adapt; Shorter = more responsive but less reliable
Holding Period (default: 21 days) - Match to your timeframe: 5-10 days (day traders), 21-42 days (swing traders), 63-126 days (position traders)
Confidence Level (default: 95%) - 90% for typical outcomes, 95% for balanced view, 99% for extreme tail risk
Leverage Levels (default: 1x, 2x, 3x) - Customize to your trading, supports decimals like 1.5x
INTERPRETING THE TABLE:
Lev = Leverage multiplier
VAR (%) = Maximum expected loss over holding period
VaG (%) = Minimum expected gain over holding period
VaG/|VAR| = Leverage efficiency ratio
VAR on $10k = Dollar loss on $10,000 position
EXAMPLE INTERPRETATION
This QQQ chart demonstrates the indicator's power to identify leverage regimes.
Current metrics (table):
1x: VAR -3.21%, VaG +21.58%, Ratio 6.73
2x: VAR -6.79%, VaG +46.58%, Ratio 6.86
3x: VAR -10.71%, VaG +75.26%, Ratio 7.02
This means:
Ratios above 6.5 are outstanding - upside is nearly 7x the downside at all leverage levels
Backwardation pattern: the ratio IMPROVES with more leverage (6.73 → 7.02), indicating strong trending conditions favor higher leverage
VAR remains very manageable even at 3x (-10.71% on a 55-day hold)
At 3x leverage, you risk $1,071 to potentially gain $7,526 on $10k - exceptional risk/reward. And understanding risk/reward is one of the most important points here.
Trade smart. Manage risk. Know your regime.
And let me know if you have any questions or suggestions.
- Henrique Centieiro Indicatore

Omega Ratio AnalysisThe Omega ratio was introduced by Keating and Shadwick in 2002 as a superior alternative to the Sharpe ratio.
Sharpe assumes normally distributed returns (ignores fat tails and might be unrealistic sometimes), Omega captures the entire return distribution. This makes it ideal for analyzing crypto, leveraged ETFs, and any assets with asymmetric returns or fat tails (I love fat tails, as part of my investment strategy of course).
Quant funds prefer Omega because it answers:
"How much do I gain above my threshold versus how much do I lose below it?"
This aligns with actual investment goals better than abstract volatility penalties.
THE MATH
Omega ratio is defined as:
Ω(MAR) = (Sum of returns above MAR) / (Sum of returns below MAR)
Where MAR (Minimum Acceptable Return) is your return threshold .
The indicator calculates this using log returns
for better statistical properties:
Log returns: ln(price / previous price)
For time series mode: Loops through lookback period, summing gains above threshold and losses below threshold
For curve mode: Calculates Omega at multiple MAR levels (from 0% to max) to reveal distribution shape
Values above 1.0 indicate gains exceed losses. For example, Ω = 1.5 means $1.50 in gains for every $1.00 in losses relative to your target.
Time Series Mode
Tracks Omega over time using a rolling window (default 252 bars). Shows color-coded performance zones: Excellent (>1.5), Good (>1.0), Caution (>0.7), Poor (<0.7). Set your annual return target and the indicator converts it to per-bar threshold. Monitor whether you're beating your goal over time.
Omega Curve Mode
It plots Omega versus different MAR thresholds to reveal the return distribution shape. A steep declining curve indicates normal distribution with thin tails. A gentle slope indicates fat tails with asymmetric upside. Compare your asset against any benchmark (default QQQ) to see which has better tail performance at different return thresholds.
HOW TO USE
For Long-Term Investors:
Use 252-bar lookback on daily charts (1 year) or use even weekly charts. Set your annual target around 10% (historical market average). If Omega stays above 1.0, you're beating your goal. Check the curve periodically - a gentle slope means the asset has upside potential beyond average returns.
For Comparing Assets:
Plot two assets (like SPY vs TQQQ). If the leveraged version has a gentler curve slope, it captures more explosive upside days. The crossover point shows which MAR threshold favors which asset. Asset above benchmark at high MAR levels = better for aggressive return goals.
For Regime Detection:
Use shorter periods (60-90 bars) for curve calculation. When curves become steeper, returns are normalizing and momentum may be fading. When curves flatten or become more convex, fat tails are developing (bullish regime forming).
APPLICATIONS
Asset Selection: Screen for asymmetric opportunities by comparing curve shapes. Gentle slopes indicate lottery-ticket upside potential.
Leverage Analysis: Quantify whether leveraged ETFs justify the volatility by comparing curves at high MAR levels. If 3x ETF curve significantly above 1x at MAR = 2%, leverage premium exists.
Risk Assessment: Steep curves = predictable, capped returns. Gentle curves = volatile but moonshot potential. Choose based on your risk tolerance and return goals.
Performance vs Benchmark: Compare your holdings against sector ETFs or market indices. If your curve is below benchmark at your target MAR, you're not getting paid for the extra risk.
PRACTICAL TIPS
Curve Period: Use 60-90 bars to see asymmetry during volatile markets. Longer periods (252-1000 bars) average out cycles and produce linear curves.
MAR Increments: Keep at 50 for smooth curves. Only lower for performance reasons.
Multi-Symbol Analysis: Compare growth stocks vs QQQ, value vs SPY, crypto vs BTC, or leveraged vs unleveraged to quantify relative risk-reward.
Reading the X-Axis: MAR shows per-bar percentage. On daily charts, 0.5% MAR means "only days with +0.5%+ returns count as wins." On monthly charts, 3% MAR means "only months with +3%+ returns count as wins."
My indicator is perfect for quant investors who want institutional-grade risk analysis. Goes beyond simple volatility metrics to reveal the true shape of return distributions.
PRACTICAL EXAMPLE:
This chart compares SPY versus TQQQ (3x leveraged Nasdaq ETF) on monthly bars over 252 months (21 years), spanning the 2008 crisis, 2020 crash, and multiple market cycles.
Both start at Omega = 1.50 (identical overall risk-adjusted returns), but the curve shapes reveal how those returns were achieved:
SPY (in cyan): Steep drop from 1.5 to near zero by MAR = 1.7% per month. Returns cluster tightly around average - predictable but limited upside.
TQQQ (in red): Gradual slope maintaining Omega = 0.35 even at MAR = 8.7% per month. Shows fat right tail with many explosive +20-40% months that SPY never sees.
Key insight is: For aggressive goals (20-30% annual), SPY's Omega drops to 0.5 (losses dominate) while TQQQ stays above 1.0 (gains exceed losses). TQQQ offers better odds at high return targets, but requires surviving -60 to -90% bear market drawdowns.
This demonstrates how curves reveal distribution characteristics that price charts or Sharpe ratios miss - specifically the asymmetric upside advantage of leveraged products for long-term holders with high risk tolerance.
Let me know if you have questions or suggestions:
- Henrique Centieiro
Indicatore

Indicatore

Trade Levels - Entry, Trims & StopA clean, fully configurable trade planning overlay for scalpers, day traders, and swing traders on any instrument — Futures, Forex, Crypto, Equities, and Indices. Set your entry price, define your risk parameters, and instantly visualize every critical level on the chart before and during a trade.
🔑 Key Features
Entry Line — White reference line at your exact entry price, labeled with direction (Long/Short)
Stop Loss — Plots your maximum loss level at a defined distance from entry
Take Profit — Plots your full target with a live R:R ratio calculated automatically
3 Independent Trim Levels — Each trim can be placed on the Profit Side OR Loss Side of your entry, allowing you to plan early exits in either direction (e.g., trimming before max loss)
Zone Fills — Translucent color fills between Entry → Stop and Entry → Target for instant visual clarity
Info Table — A real-time summary table (top-right corner) showing all prices and distances at a glance
Full Alert Integration — alertcondition() support for all 5 levels: Stop, Take Profit, Trim 1, Trim 2, and Trim 3
⚙️ Settings Overview
Group What You Set
📍 Entry Settings Entry price, Long/Short direction, Points or Ticks mode
🔴 Stop Loss Points/Tick Distance from entry, line color
🟢 Take Profit Points/Tick Distance from entry, line color
✂️ Trim 1 / 2 / 3 Enable toggle, Profit or Loss side, Points/Tick distance, trim size %, color
🔔 Alerts Toggle alerts on/off per level
⚙️ Display Labels, R:R visibility, zone fills, table, line style, label size
📐 Points vs. Ticks
Switch the Unit Mode under Entry Settings between:
Points — Native price units (e.g., 10 = 10 full points on NQ)
Ticks — Minimum tick increments (e.g., on NQ: 1 point = 4 ticks, so 40 ticks = 10 points)
The indicator uses syminfo.mintick to auto-convert, so it works accurately on any symbol.
✂️ Loss-Side Trims Explained
Most indicators only allow trims in the profit direction. This tool lets you place a trim on the Loss Side of your entry — meaning you scale out of part of your position before reaching your full stop. This is a common risk management technique used by professional futures and forex traders to reduce average loss on losing trades.
To use it: enable a Trim, set Side → Loss Side, and dial in the distance. The label will display as "LOSS TRIM" to visually distinguish it from profit-side trims.
🔔 Setting Up Alerts
Click the Alerts bell icon on the TradingView toolbar
Click "+" → Create Alert
Under Condition, select "Trade Levels — Entry, Trims & Stop"
Choose a level: Stop Loss Hit, Take Profit Hit, Trim 1, Trim 2, or Trim 3
Set your notification method (popup, sound, mobile push, or webhook)
Click Create
📌 Tips for Scalpers
Set your entry price before you take the trade so the levels are pre-drawn when your order fills
Use Loss-Side Trim 1 to take off 25–33% of your position if price moves against you early — this lowers your average loss significantly over time
The live R:R ratio on the TP label updates instantly as you adjust your distances — use it to ensure you never take a sub-1:1 trade
Works on all timeframes and all instruments — ES, NQ, MNQ, EUR/USD, BTC, SPY, anything Indicatore
