Indicateur

Markowitz Frontier Compass [JOAT]Markowitz Frontier Compass
Introduction
Markowitz Frontier Compass compares the chart symbol against a peer basket using inverse-volatility weights, correlation drag, diversification benefit, factor scores, and active risk budget.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. Inverse-Volatility Basket
Each peer receives an inverse-volatility weight to form a portfolio-context benchmark.
2. Correlation Drag
Average pairwise correlation reduces diversification value when assets move together.
3. Factor Composite
Quality, momentum, low-volatility, and carry-style behavior are combined.
4. Risk Budget
Institutional grade, entropy, concentration, and factor state become active or defensive budget context.
frontierScore = efficiency + diversification - correlationDrag - concentration
Features
Peer basket context
Inverse-volatility weighting
Correlation drag and diversification benefit
Factor composite and allocation entropy
Risk-on, defense, and factor-prime states
Input Parameters
Peer symbols
Return window and smoothing
Risk-free annual percent
Correlation stress and concentration gates
Display toggles and HUD position
How to Use This Script
Use MFC as cross-asset context. Risk-on or factor-prime states suggest constructive basket behavior; defense states warn of stress.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
MFC is original in combining portfolio theory, factor scoring, entropy, and risk-budget logic in one open-source study.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
Indicateur

Squeeze Momentum IQ Trade Management SimplifiedSqueeze Momentum IQ Trade Management Simplified
A trade management and position conviction engine designed to help determine whether to continue holding, manage cautiously, take profits, or avoid new entries.
Most indicators focus on finding entries.
Squeeze Momentum Nexus Conviction focuses on a different question:
"Does the trade still deserve my conviction?"
Rather than generating simple buy and sell signals, Conviction continuously evaluates trend quality, momentum behavior, efficiency, and confirmation conditions to determine whether current market conditions still support remaining in a trade.
The objective is to help traders avoid two common mistakes:
• Exiting strong trends too early
• Holding weakening trades too long
Core Concept
Conviction transforms multiple market variables into a simplified trade management framework:
HOLD
Strong trend quality and confirmation
Momentum remains healthy
Higher timeframe and trend conditions supportive
HOLD CAUTIOUSLY
Trend remains intact, but signs of weakening or conflict begin to appear
Increased probability of pullback or slower continuation
TAKE PROFIT / DO NOT ENTER
Trade quality deteriorating
Momentum weakening significantly
Choppy or conflicting conditions increasing
Features
Trade Quality Engine
Evaluates market conditions through a weighted scoring model using:
• Momentum behavior
• Trend confirmation
• Higher timeframe agreement
• Efficiency ratio
• Volatility state
• Expansion quality
Conviction State Engine
Converts raw calculations into actionable states:
HOLD
Strong continuation conditions
Trend quality remains elevated
HOLD CAUTIOUSLY
Moderate quality conditions
Continuation possible but with increasing caution
TAKE PROFIT / DO NOT ENTER
Weak conditions
Elevated risk of deterioration, pullback, or lower probability continuation
Visual Hold Zones
Vertical highlighted chart regions visually display current conviction states:
Green
HOLD
Orange
HOLD CAUTIOUSLY
Red
TAKE PROFIT / DO NOT ENTER
Designed to allow immediate interpretation directly from price action without requiring constant dashboard monitoring.
Simple Decision Dashboard
Displays only the essential information:
Action
HOLD
HOLD CAUTIOUSLY
TAKE PROFIT / DO NOT ENTER
Trade Quality
Current trade-grade evaluation
Score
Weighted confidence reading
Suggested Uses
Can be used for:
• Managing existing positions
• Scaling out of trades
• Holding trend positions longer
• Filtering poor continuation conditions
• Preventing emotional exits
• Avoiding lower quality entries
Works well alongside:
• Market structure
• Trend systems
• Volume Profile / POC analysis
• Supply and demand zones
• Higher timeframe bias
• Risk management systems
About TrendGenY Indicators
TrendGenY indicators are built from market experience, creative concepts, and a constant pursuit of unique perspectives. Rather than following conventional ideas, the focus is on uncovering alternative insights and viewing market behavior through different angles to reveal information that traditional tools may overlook and help traders build a more meaningful edge in the market. Indicateur

ATR Position SizerATR Position Sizer
A simple position sizing tool for futures traders. Calculates how many contracts to trade based on your risk tolerance and the current ATR-based stop distance.
How it works
The indicator uses the standard formula:
Contracts = Risk $ ÷ (ATR × Stop Multiplier × Dollar per Point)
It pulls the contract's dollar-per-point value directly from the symbol info, so you don't need to enter it manually. At the close of each bar, the calculation updates and displays in the bottom right of your chart.
Inputs
ATR Lookback (bars): How many bars to use for the ATR calculation. Default is 14.
Risk Tolerance ($): Maximum dollar amount you're willing to lose on the trade. Default is $250.
Stop Multiplier (xATR): How wide your stop is relative to ATR. Default is 1.5x.
How to use it
Add the indicator to your chart.
Set your ATR lookback, risk tolerance, and stop multiplier in the settings.
At the close of your entry candle, look at the contracts value in the bottom right.
Size your trade accordingly.
The output is a decimal so you can see exactly where you stand. Round down if you want to stay within your risk, round up if you're comfortable taking slightly more.
Supported instruments
This indicator was designed and tested on the following futures contracts:
S&P 500: ES, MES
Nasdaq 100: NQ, MNQ
Russell 2000: RTY, M2K
Dow: YM, MYM
Nikkei 225: NKD, NIY
Gold: GC, MGC
Crude Oil: CL, QM, MCL
It may work on other futures contracts that have a defined point value in TradingView, but results outside the listed instruments are not guaranteed.
Disclaimers
This indicator is for educational and informational purposes only. It is not financial advice, investment advice, or a trading recommendation.
The calculations assume your actual stop loss will be placed at the ATR-based distance. If you use a different stop placement method, your real risk will differ from what this indicator shows. Always verify your stop placement and position size before entering a trade.
ATR is a backward-looking measure of volatility. It does not predict future price movement, slippage, gaps, or news-driven volatility expansion. Your actual loss on a trade can exceed the calculated risk amount, especially on thinly traded instruments, around economic releases, or during overnight sessions.
This tool does not account for commissions, exchange fees, margin requirements, account size, or overall portfolio exposure. You are responsible for ensuring any position size is appropriate for your account and risk profile.
Futures trading involves substantial risk of loss and is not suitable for every investor. Past performance is not indicative of future results. Trade at your own risk. Indicateur

Indicateur

Trend Volatility RegimeThe Trend Volatility Regime is an all-in-one trend-following model that identifies changes in the market regime by combining moving-average crossover signals with volatility-adaptive trailing stops. It features an integrated backtesting engine that provides institutional-grade insights into historical strategy performance, along with a built-in alert system that notifies investors in real time when regime changes occur. The model integrates seamlessly into the price chart and presents backtest results in a clear, color-coded table benchmarked against buy-and-hold.
At its core, the model combines two complementary trend detection components to determine the prevailing market regime. The first component identifies the underlying structural trend using a volatility-adjusted moving-average crossover based on the spread between fast and slow moving averages. The second component identifies trend reversals using an adaptive trailing stop based on changes in price and volatility. Bullish and bearish regimes occur when both crossover and volatility signals are directionally aligned, while conflicting signals result in neutral regimes.
Bullish Crossover Signal = (Fast MA – Slow MA) > (ATR × Trend Margin)
Bearish Crossover Signal = (Fast MA – Slow MA) < –(ATR × Trend Margin)
Bullish Volatility Signal = Price > (Highest Price – (Volatility × Stop Factor))
Bearish Volatility Signal = Price < (Lowest Price + (Volatility × Stop Factor))
By default, the model applies an asymmetric regime design in which conflicting signals default to a bullish regime unless half-equity positions are enabled in the menu. This asymmetric design reflects the tendency of risk assets to deteriorate gradually while recovering more abruptly. The moving-average component captures the slower deterioration typically observed during market tops, while the trailing stop component responds more dynamically to faster reversals typically observed at market bottoms. This helps reduce overreaction to corrections during uptrends while still allowing for faster re-entry following sharp recoveries. To evaluate the performance of different parameter configurations, the model includes a built-in table with the following metrics:
CAGR = Compounded Annual Growth Rate.
Excess = CAGR in excess of buy-and-hold.
Sharpe = CAGR per unit of standard deviation.
Sortino = CAGR per unit of downside deviation.
Calmar = CAGR relative to maximum drawdown.
Max DD = Largest peak-to-trough decline in value.
Alpha (α) = Excess annualized risk-adjusted returns.
Win Rate = Ratio of profitable trades to total trades.
Profit Factor = Total gross profit per unit of losses.
Expectancy = Average expected return per trade.
Turnover = Average annualized change in exposure.
This indicator is designed with flexibility in mind, enabling users to specify the start date of the backtesting period, the preferred trend type, volatility type, and regime visualization. Supported regime visualizations include line, candle, and shaded background. Supported moving-average types include the Exponential Moving Average (EMA), Simple Moving Average (SMA), Wilder’s Moving Average (RMA), and Weighted Moving Average (WMA). Supported volatility types include the Average True Range (ATR), Standard Deviation (SD), and Mean Absolute Deviation (MAD). Supported price sources include Close, HL2, HLC3, and OHLC4. The table follows an intuitive color-coded logic that allows for quick performance comparison against buy-and-hold (B&H):
CAGR = Green indicates above 0%, while red indicates below 0%.
Excess = Green indicates above 0%, while red indicates below 0%.
Sharpe = Green indicates better than B&H, while red indicates worse.
Sortino = Green indicates better than B&H, while red indicates worse.
Calmar = Green indicates better than B&H, while red indicates worse.
Max DD = Green indicates better than B&H, while red indicates worse.
Alpha (α) = Green indicates above 0%, while red indicates below 0%.
Win Rate = Green indicates above 50%, while red indicates below 50%.
Profit Factor = Green indicates above 2, while red indicates below 1.
Expectancy = Green indicates above 0%, while red indicates below 0%.
In summary, the Trend Volatility Regime is a comprehensive trend-following tool designed to help investors stay on the right side of the market by identifying key changes in the market regime. By combining volatility-adjusted moving-average crossover signals with adaptive volatility-based trailing stops, the model seeks to maximise participation during uptrends while reducing exposure during sustained downtrends. While the model provides valuable historical insights, users should remain mindful that past results may not necessarily persist under future market conditions. Indicateur

Indicateur

Indicateur

KNN Market Regime Engine [Dots3Red]█ OVERVIEW
Most market regime tools work in a pretty simple way: we set a threshold and call it a day. ADX above 25? Trending. Below 20? Ranging.
But that threshold is basically just our assumption baked into code. It doesn’t adapt, it doesn’t learn, and it’s treated the same whether we’re looking at Bitcoin, EUR/USD, or any other market — even though they behave completely differently.
This script takes a different approach . It uses a K-Nearest Neighbors (KNN) machine learning algorithm to estimate the probability that the current market is in one of three regimes: Trending , Ranging , or Volatile Trend . Rather than comparing today's readings against a fixed number, it searches the past 700 bars for the moments that looked most like right now - and asks what the market did after each of those moments. The result is a live probability for each regime, not a hard categorical label.
The output is three things simultaneously:
a background color telling you the dominant regime
a dashboard showing live probability bars for all three states
change markers appearing only when the classifier is genuinely confident a shift has occurred.
█ THE FOUR REGIMES
🔵 TRENDING — price is moving directionally with efficiency. Momentum strategies belong here. Mean reversion strategies get punished here.
🟣 RANGING — price is oscillating between levels with no net directional movement. Mean reversion strategies and fade-the-extreme setups have edge here. Trend-following generates whipsaws.
🟡 VOLATILE TREND — price is trending and ATR has expanded sharply beyond its baseline. This captures earnings gaps, macro shocks, and post-breakout expansion. It is a distinct fourth state — not simply "a strong trend." Reduce size or trail very tightly.
⬛ UNCERTAIN — the dominant probability did not clear the minimum confidence threshold. The market's character is genuinely ambiguous. The best action is observation, not engagement.
█ HOW IT WORKS — THE FULL PIPELINE
Step 1 — Six features, measured every bar
Each bar is described by six measurements, each capturing a different dimension of market character:
• ADX — trend strength. Not direction — only how strongly price is committed to any direction.
• ATR ratio — current ATR divided by its own long-term average. Measures whether volatility is elevated or compressed relative to its own history.
• Choppiness Index — measures how much of the price movement was wasted going sideways. Near 100 = pure chop. Near 38 = perfectly directional.
• Bollinger Band width — how expanded or compressed the bands are relative to price. A compression often precedes volatile expansion.
• Normalized slope — linear regression slope over N bars, divided by ATR. A scale-free measure of directional momentum.
• Kaufman Efficiency Ratio — how directly did price move from A to B? If price traveled 100 points total but only net-moved 20, ER is 0.20. High ER = trending cleanly. Low ER = zigzagging.
Step 2 — Z-score normalization
ADX runs 0–100. ATR ratio runs 0.5–3.0. BB width might be 0.01–0.08 on forex. Using raw values in a distance calculation means the largest-scale feature dominates by sheer magnitude. All six features are standardized: z = (value − rolling mean) / rolling stdev . This puts every feature on equal footing — a reading of +2.0 means " two standard deviations above normal " on any feature. Critically, the mean and stdev are computed on prior bars only ( src offset), which eliminates look-ahead bias from the normalization step.
Step 3 — Labeling historical bars
For every historical bar, the script evaluates what happened over the following Forward Bars window:
• If the net price move exceeded Trend Threshold × average ATR over the window → labeled TRENDING (1)
• If the ATR ratio exceeded Volatility Threshold → labeled VOLATILE TREND (3)
• If trending AND volatile simultaneously → labeled VOLATILE TREND (3), because risk context takes priority
• Otherwise → labeled RANGING (2)
This label is only ever read at an offset of at least Forward Bars bars into the past, so the current bar carries no label — there is no look-ahead in the training data.
Step 4 — KNN search and Gaussian-weighted voting
On each bar, the algorithm scans the historical window (default 700 bars) and computes the Minkowski distance between today's six Z-scored features and every historical bar's six features. The K nearest matches are selected. Closer neighbors receive exponentially higher voting weight via a Gaussian kernel : w = exp(−d² / 2σ²) . This means a bar at distance 0.1 vastly outweighs one at distance 0.5. The votes produce three probabilities — P(trending), P(ranging), P(volatile trend) — that always sum to 1.
Step 5 — Three-stage noise filtering
A single KNN output can flicker bar to bar. Three filters eliminate this:
• Mode filter — selects the most common regime over the last smooth_len bars. Removes 1-3 bar flickers entirely.
• Confirmation filter — the smoothed regime must hold steady for confirm_bars consecutive bars before being accepted. Kills false starts.
• Signal gap — regime change markers only appear once per signal_gap bars minimum, and only when the dominant probability exceeds 65%. This eliminates cluttered charts entirely.
█ DESIGN DECISIONS — WHAT WAS INITIALLY, WHAT CHANGED AND WHY
From 3 regimes to 4
The first idea used three regimes with a simple override: if volatility was high, VOLATILE replaced TRENDING regardless of whether price was actually moving directionally. Testing on stocks showed this caused problems — an earnings-day spike during a clear uptrend was collapsing the trend signal entirely. We realized volatile trending markets are qualitatively different from volatile ranging markets. A fast trend during an OPEC announcement is not the same as a gap-down in a sideways consolidation. VOLATILE TREND became its own regime, and the distinction turned out to be the most practically useful change in the entire script.
From stride = fwd_bars to stride = 3
The early idea for the script we had sampled the training window with a stride equal to Forward Bars (30 by default). This gave roughly 23 training samples — barely enough for KNN to make a meaningful comparison. Reducing the stride to 3 gives approximately 230 samples. The regime classification became dramatically more stable and consistent, especially in quieter markets where the 23-sample version frequently returned UNCERTAIN. The trade-off is slightly more computation, which Pine handles comfortably within its limits.
From a single volatile threshold to a combined trend + volatile check
Originally we labeled VOLATILE based purely on ATR ratio exceeding a threshold. This correctly flagged high-volatility periods but was labeling slow low-ATR trends as RANGING instead of TRENDING during prolonged low-volatility bull markets. The label logic was reworked to check directionality and volatility independently and then combine them: a trending move is TRENDING unless ATR is also elevated, in which case it becomes VOLATILE TREND. This made the label logic honest about what the market was actually doing.
The Efficiency Ratio addition
The original five features (ADX, ATR ratio, Choppiness, BB width, Slope) left a gap: two markets can have identical ADX and slope but very different directional efficiency — one moves in a clean staircase, the other zigzags the same distance. Kaufman's Efficiency Ratio fills this gap. ER = 0.85 on a bar means 85% of all price movement went in the net direction. ER = 0.20 means price was thrashing around and barely net-moved. It proved particularly valuable for distinguishing true trending from noisy ranging in crypto and high-beta stocks.
The regime change marker clutter problem
Early testing produced charts covered in triangles, circles, and diamonds — a new marker on almost every regime flicker. Three parameters were added to solve this: the mode filter, the confirmation bars requirement, and the signal gap. Together they ensure a marker only appears when (a) the majority of recent bars agree on the new regime, (b) it has held for at least N bars, and (c) the KNN confidence is above 65%. The result is 2–6 meaningful markers per year on a daily chart rather than dozens of noisy ones.
█ WHAT YOU SEE ON THE CHART
Background color — the dominant confirmed regime, colored continuously. Cyan = Trending. Magenta = Ranging. Amber = Volatile Trend. No color = Uncertain.
Bar coloring — individual bars colored by the same regime. Toggle off if you prefer your own candle coloring scheme.
Regime change markers — small shapes at confirmed, high-confidence regime transitions only. ▲ below bar = shift to Trending. ● below bar = shift to Ranging. ◆ above bar = shift to Volatile Trend.
Dashboard (top right) — shows the confirmed regime label, confidence percentage, three probability meters (▰▰▰▱▱▱ format), and six live feature readings. The bottom row shows Raw → Smooth (e.g. "T → R") so you can see what the raw KNN output is before the filters process it — useful for understanding when the classifier is about to change state.
█ SETTINGS REFERENCE
🧠 KNN Engine
• K Neighbors — how many historical bars vote. Lower = faster reaction, higher = more stable. Default 25.
• Lookback Window — how many bars to search for neighbors. Larger = more training data. Default 700.
• Minkowski p — distance exponent. 1 = Manhattan (robust to outliers), 2 = Euclidean (standard). Default 2.
• Gaussian bandwidth — how steeply neighbor weight falls with distance. Lower = only the closest neighbors matter. Default 1.5.
• Minimum confidence — probability threshold below which the regime shows as UNCERTAIN. Default 0.45.
🏷️ Labeling
• Forward bars — how many bars ahead define a historical bar's regime label. Match your typical hold time. Default 30.
• Trend threshold — net move must exceed this × avg ATR to label TRENDING. Lower = more bars labeled trending. Default 1.2.
• Volatility threshold — ATR ratio must exceed this to label VOLATILE TREND. Higher = only extreme events qualify. Default 1.5.
📐 Features
• ADX Length — period for the directional movement index. Longer = smoother. Default 20.
• ATR Length — period for average true range. Default 14.
• ATR Baseline — SMA period for the ATR ratio denominator. Longer = more stable baseline. Default 100.
• Choppiness / BB / Slope lengths — feature calculation periods. All default to 20–30.
• Efficiency Ratio Length — Kaufman ER lookback. Default 30.
🧹 Filtering
• Regime Smoothing Lookback — mode filter window. Higher = fewer false regime changes. Default 11.
• Bars to confirm regime — consecutive bars required before a new regime is accepted. Default 4.
• Min bars between signals — minimum spacing between regime change markers. Default 20.
█ SETTINGS BY ASSET CLASS
📈 Large-cap stocks — daily (AMZN, AAPL, NVDA)
Stocks trend slowly over weeks to months, with sharp one-day volatility spikes on earnings. All feature lengths should be longer to resolve the slower regime pace.
• Forward bars: 20–30 | Trend threshold: 0.8–1.2 | Volatility threshold: 2.0–2.5
• ATR Baseline: 100 | ADX / Chop / Slope lengths: 20 | BB length: 30 | EffR: 30
• Smoothing: 11 | Confirm bars: 4–5 | Signal gap: 20
• Note: use 0.8 trend threshold for slow defensive stocks (JNJ, KO), 1.2 for high-beta tech (NVDA, TSLA)
₿ Crypto — daily (BTC, ETH, large caps)
Crypto regimes flip in days, not months. ATR is 3–7× higher than stocks. Shorter windows, lower thresholds, less smoothing.
• Forward bars: 10–14 | Trend threshold: 1.5–2.5 | Volatility threshold: 1.5–2.0
• ATR Baseline: 50–70 | All feature lengths: 14 | EffR: 14–20
• Smoothing: 5–7 | Confirm bars: 2–3 | Signal gap: 7–10
• Note: for altcoins use trend threshold 2.0–2.5; for BTC use 1.5–2.0
💱 Forex — daily (EUR/USD, GBP/USD, USD/JPY)
Forex trends are driven by central bank divergence and last months. Daily ATR is tiny (0.4–0.7% of price). Everything needs to be longer and slower.
• Forward bars: 30–45 | Trend threshold: 0.6–0.8 | Volatility threshold: 2.5–3.0
• ATR Baseline: 120–150 | ADX length: 20–25 | Slope / EffR: 40–50
• Smoothing: 15–21 | Confirm bars: 5–7 | Signal gap: 30–45
• Note: exotic pairs (USD/TRY, USD/ZAR) behave like crypto — use crypto settings instead
🛢️ Commodities — daily (Gold XAU, Oil WTI)
Gold is slow and stable like equities. Oil is fast and event-driven like crypto. Use different profiles.
• Gold: Forward bars 20, Trend 0.8, Vol 2.5, ATR Base 100, Smooth 11, Confirm 4, Gap 20
• Oil: Forward bars 15, Trend 1.2, Vol 2.0, ATR Base 70, Smooth 7, Confirm 2–3, Gap 10
• Note: OPEC events and geopolitical shocks will correctly fire VOLATILE TREND on oil — this is intended behavior
🌐 Indices — daily (SPX, NDX, DAX)
Indices are the most regime-stable asset class. They trend 65–75% of the time and have the cleanest feature signals of any asset.
• Forward bars: 20–30 | Trend threshold: 0.8–1.0 | Volatility threshold: 2.0–2.5
• ATR Baseline: 120 | ADX length: 20 | Smoothing: 11–15 | Confirm bars: 4–5 | Signal gap: 20–30
• Note: NDX is ~30% more volatile than SPX — use trend threshold 1.0 for NDX, 0.8 for SPX
EXAMPLE
█ HOW TO USE WITH OTHER INDICATORS
This script does not generate buy or sell signals. It tells you which type of strategy has edge right now . The intended workflow:
1 — Add your momentum or mean reversion indicator alongside this one.
2 — Only take momentum / trend-following entries when the background is cyan (TRENDING) .
3 — Only take mean reversion / fade entries when the background is magenta (RANGING) .
4 — Reduce position size or step aside entirely when the background is amber (VOLATILE TREND) .
5 — Do nothing when there is no background color — the regime is UNCERTAIN.
Used this way, the classifier acts as a strategy mode selector rather than a signal generator. It is the foundation of a multi-strategy system where the same chart hosts different logic depending on detected conditions.
█ LIMITATIONS
• KNN is a lazy learner — it reflects patterns in its training window. If the current market regime has no historical analog in the lookback window (e.g. a once-in-a-decade crash), the classifier will misclassify or return UNCERTAIN.
• The script requires a warm-up period equal to Lookback Window + Forward Bars bars before producing output. On instruments with limited history this may delay the first valid reading.
• Computation scales with window size and stride. Very large windows (2000+) may slow chart rendering on lower-end machines.
• The reversion probability reflects historical frequency, not a guarantee of future behavior. All market regimes can and do fail.
Human vs Machine 🧠vs 🤖
And most importantly, checking the chart with the HUMAN EYE is different from using the raw ML KNN method - something we agreed on checking the charts, as we, traders-developers, had different opinions of the market regime for an asset price. But the Script might yield results we can all agree upon.
█ DISCLAIMER
This indicator is a decision-support tool, not a trading system. It does not constitute financial advice. Past regime patterns do not guarantee future behavior. Always apply proper risk management.
Algorithm: K-Nearest Neighbors (KNN)
Distance metric: Minkowski Distance (p=2, Euclidean default)
Kernel: Gaussian (distance-weighted voting)
Normalization: Z-Score (look-ahead free)
Regimes: Trending | Ranging | Volatile Trend | Uncertain Indicateur

Order Block Mitigation Profiler [forexobroker]Order Block Mitigation Profiler locates institutional order blocks and tracks each one through a full lifecycle: OPEN (untouched), TOUCHED (price traded back in), and MITIGATED (price closed through). The unique angle is the dual-layer engine: instead of only firing the rare classic one-shot retest, a fresh block arms a persistent directional bias and entries are timed by an EMA reclaim inside that bias, keeping signal cadence usable on live charts.
🔶 ALGORITHM
1. Confirm swing structure with symmetric pivots (ta.pivothigh / ta.pivotlow), tracking the most recent confirmed swing high and low.
2. Detect a Break of Structure (BOS): close crosses the last confirmed swing pivot (close > lastPH while prior close was at or below it, mirrored for bearish).
3. Walk back up to OB Search Lookback bars from the BOS to find the last opposing-direction candle; that candle's high/low defines the order block.
4. Validate displacement: the impulse leg from the block must span at least Min Impulse x ATR, filtering out non-institutional moves.
5. Lifecycle state machine per block: state 1 (OPEN), 2 (TOUCHED on first retest), 3 (MITIGATED when the mitigation reference closes/wicks through).
6. Persistent bias: a freshly formed OB sets bias +1 / -1; the bias clears only when that block is mitigated.
7. Entry timing: within an active bias, an EMA reclaim (ta.crossover / ta.crossunder of close vs the Entry Reclaim EMA) fires the trade. Retest-Only Mode swaps this for the strict first-retest event.
🔶 SIGNAL LOGIC
- Buy: bullish bias active (fresh bull OB, not yet mitigated) and close crosses over the Entry Reclaim EMA (or, in Retest-Only Mode, the first bull OB retest), in session, with position not already long, after the cooldown window has elapsed, and only on barstate.isconfirmed; a position-lock state flips to LONG to prevent stacking.
- Sell: bearish bias active (fresh bear OB, not yet mitigated) and close crosses under the Entry Reclaim EMA (or the first bear OB retest), in session, position not already short, cooldown elapsed, on barstate.isconfirmed; position-lock flips to SHORT.
Only fires when a fresh, unmitigated order block has set directional bias.
🔶 INPUTS
- Structure: pivot length for swing confirmation (default 8), OB search lookback, and ATR length.
- Impulse filter: minimum impulse measured in ATR multiples to qualify a block (default 1.0x ATR).
- Mitigation rule: mitigate on close versus wick-through toggle (default close).
- Signal Logic: Entry Reclaim EMA length (default 9) and Retest-Only Mode toggle (default off = regime + EMA reclaim).
- Cooldown: minimum bars between signals (default 5).
- Filters: optional session restriction with a session window, and one-signal-per-block lock (default on).
- Visual: OB zone boxes, dashboard, 3-layer glow, buy/sell colors, and dashboard background.
🔶 ALERTS
OBM Buy, OBM Sell, OBM Any Signal, OBM Bull BOS, OBM Bear BOS, OBM Bull OB Formed, OBM Bear OB Formed, OBM Bull Mitigated, OBM Bear Mitigated, OBM Bull Retest, OBM Bear Retest, OBM Structure Break, OBM Webhook JSON.
🔶 LIMITATIONS
- Requires warm-up: pivots only confirm after Pivot Length bars on each side, so early chart history produces no structure.
- Defaults (ATR 14, impulse 1.0x) are tuned for liquid instruments; thin or low-volatility symbols may need a lower impulse multiple.
- Retest-Only Mode is intentionally rare and can go long stretches with no signal; the default regime + EMA reclaim mode trades more frequently.
- Non-repainting by design (pivots confirmed, signals on bar close), which means the swing that anchors a block appears Pivot Length bars after it actually formed.
- Order blocks are structural zones, not guaranteed reversals; the impulse and ATR filters reduce but do not eliminate false breaks.
Indicateur

MTF Structure Vote [forexobroker]MTF Structure Vote polls three independent higher timeframes and lets each one cast a directional vote based on where price sits relative to its own structural trend EMA. When enough timeframes agree, a confluence regime is declared, and a precise local EMA reclaim then times the entry. The unique angle is treating multi-timeframe alignment as a discrete vote count rather than a single blended bias, which makes chop filtering explicit and tunable.
🔶 ALGORITHM
1. Three higher timeframes (default 60, 240, D) are read via request.security with barmerge.lookahead_off.
2. Each timeframe computes a trend EMA (default length 50) on its own closes. Close above the HTF EMA returns +1, below returns -1.
3. The three votes are summed into a net vote ranging from -3 to +3.
4. A local reclaim EMA (default 9) is computed on the chart timeframe to time entries.
5. Bull confluence is declared when net vote is greater than or equal to the threshold; bear confluence when it is less than or equal to the negative threshold.
6. ATR (default 14) is tracked for context in the dashboard.
7. Each signal flips a persistent position state and stamps the bar so the cooldown can enforce spacing.
🔶 SIGNAL LOGIC
- Buy: net vote reaches the bull confluence threshold AND local close crosses over the reclaim EMA AND session filter passes AND position is not already long AND cooldown bars elapsed since last signal AND barstate.isconfirmed.
- Sell: net vote reaches the bear confluence threshold AND local close crosses under the reclaim EMA AND session filter passes AND position is not already short AND cooldown bars elapsed since last signal AND barstate.isconfirmed.
Only fires when the multi-timeframe net vote has reached the configured confluence threshold.
🔶 INPUTS
- MTF group: three higher-timeframe selectors; HTF 1 default 60.
- HTF Trend EMA: length of the structural EMA computed on each higher timeframe; default 50.
- Local Reclaim EMA: chart-timeframe EMA used to time entries; default 9.
- Signal Logic group: minimum absolute net vote required; default 2 (at least 2 of 3 agree).
- ATR Length: volatility reference shown in the dashboard; default 14.
- Cooldown Bars: minimum bars between signals; default 5.
- Filters group: optional session restriction; session window default 0000-2400.
- Visual group: dashboard, 3-layer glow, local EMA plot, buy/sell colors, dashboard background; glow on by default.
🔶 ALERTS
MSV Buy, MSV Sell, MSV Any Signal, MSV Bull Conf, MSV Bear Conf, MSV Unanimous Bull, MSV Unanimous Bear, MSV Vote Change, MSV Local Up, MSV Local Down, MSV Any Conf, MSV Webhook JSON.
🔶 LIMITATIONS
- The higher-timeframe EMAs need warm-up history; on fresh symbols early bars carry no reliable vote.
- request.security on higher timeframes is read with lookahead_off on the confirmed bar, so values are non-repainting but update only when the HTF bar closes, introducing natural lag.
- Defaults are tuned for liquid instruments; thin symbols may need wider thresholds or different timeframes.
- Confluence gating intentionally suppresses signals during mixed regimes, so trending-only behavior is expected.
- The local reclaim is a fast EMA cross and can whipsaw inside a valid confluence regime during low volatility.
Indicateur

Mitigation Block Sentinel [forexobroker]Mitigation Block Sentinel locates mitigation blocks: a bullish block is the last down-close candle before an up-displacement that breaks recent structure, the zone where trapped longs were mitigated and from which price tends to launch again (mirror for bearish). The block arms a directional bias, and entries time off an EMA reclaim inside that bias or a strict block retest in Retest-Only mode. A live dashboard tracks both block zones and the current bias.
🔶 ALGORITHM
1. Compute ATR and the prior N-bar structural high and low (structure lookback).
2. A bullish impulse = up candle whose body >= k x ATR that closes above the prior structural high; bearish is the mirror below the prior structural low.
3. Mitigation-block origin scan: from the impulse, scan back up to the block-scan-back limit for the nearest opposite-close candle; its high/low becomes the block top/bottom.
4. The fresh block is armed; a retest occurs when price trades back into the block extended by a retest buffer of k x ATR.
5. A fresh block arms a persistent directional bias that holds until the opposite block forms.
6. Entry timing: an EMA reclaim (close crossing the entry-reclaim EMA in the block direction), or a strict block retest in Retest-Only Mode.
🔶 SIGNAL LOGIC
- Buy: bias == bullish AND close crosses over the reclaim EMA (or a bullish block retest in Retest-Only Mode), in session, with no active long, cooldown elapsed, and barstate.isconfirmed; position locks long.
- Sell: bias == bearish AND close crosses under the reclaim EMA (or a bearish block retest in Retest-Only Mode), in session, with no active short, cooldown elapsed, and barstate.isconfirmed; position locks short.
Only fires while the persistent block bias agrees with the entry direction.
🔶 INPUTS
- Block group: structure lookback for the high/low the impulse must break (default 10).
- Block group: impulse body multiple of ATR for the launch candle (default 1.0).
- Block group: block scan-back bars to find the origin candle (default 6).
- Block group: retest buffer multiple of ATR (default 0.10) and ATR length (default 14).
- Signal Logic group: entry reclaim EMA length (default 9).
- Signal Logic group: Retest-Only Mode toggle (default off) and cooldown bars (default 5).
- Filters group: restrict-to-session toggle and session window (default 0000-2400).
- Visual group: show block zones, dashboard, and 3-layer glow (all default on).
- Visual group: buy color, sell color, and dashboard background.
🔶 ALERTS
MBS Buy, MBS Sell, MBS Any Signal, MBS Bull Block, MBS Bear Block, MBS Bull Retest, MBS Bear Retest, MBS Any Block, MBS EMA Up, MBS EMA Down, MBS Bias Bull, MBS Bias Bear, MBS Webhook JSON.
🔶 LIMITATIONS
- Needs warm-up bars for ATR and the structural lookback before blocks can form.
- The origin scan only reaches back the block-scan-back limit; a block whose origin sits beyond that window is missed.
- ATR-adaptive defaults are tuned for liquid instruments; thin symbols may need the impulse body multiple retuned.
- The persistent bias holds until an opposite block forms, so it can remain stale through extended ranges.
- Signals confirm on bar close; block zones are redrawn on each new block and are not guaranteed support or resistance.
Indicateur

Volume Profile Enhanced PeriodicVolume Profile Enhanced Periodic
Volume Profile Enhanced Periodic is an advanced profile framework designed to analyze and visualize how volume is distributed across price levels over repeating time periods such as days, weeks, months, quarters, and years.
Unlike traditional fixed-range profiles that focus on a single visible section of the chart, this indicator automatically generates separate volume profiles for each selected historical period, allowing traders to study how price acceptance, value migration, and high participation areas evolve over time.
The objective is to identify where market participants historically concentrated activity and monitor how these areas shift as market structure develops.
By combining period-based volume profiles, Point of Control tracking, Value Area analysis, extending POC levels, and profile projection tools, the indicator is designed to provide additional context for support/resistance behavior, market acceptance, and evolving market structure.
Features
• Automatic Day / Week / Month / Quarter / Year profiles
• Historical profile generation across multiple periods
• Solid histogram profile display
• Profile direction toggle (Left or Right facing)
• Point of Control (POC) detection
• Previous POC tracking
• Value Area High (VAH) and Value Area Low (VAL) calculations
• Extend POC levels until price interaction
• Extend Value Area fields into future periods
• Adjustable Value Area extension brightness
• Custom profile width controls
• Historical profile management controls
• Lightweight performance optimization
• Naked labels without background flags
• Dynamic labels for:
• POC
• Previous POC
• VAH
• VAL
Alerts Included
• Price Crossed POC
• Price Crossed VAH
• Price Crossed VAL
• POC Shifted Higher
• POC Shifted Lower
• Price Entered Value Area
• Price Exited Value Area
Potential Use Cases
• Identify historical high participation zones
• Locate support and resistance areas
• Monitor value migration over time
• Track changing market acceptance
• Identify developing imbalance areas
• Observe POC movement between periods
• Use extended POC levels as potential reaction zones
• Add confluence to existing systems
• Study auction behavior and market structure
Interpretation
POC (Point of Control)
Represents the price level where the highest concentration of volume occurred during the selected period.
VAH (Value Area High)
Represents the upper boundary of the selected value area where the majority of trading activity occurred.
VAL (Value Area Low)
Represents the lower boundary of the selected value area.
Previous POC
Displays prior dominant participation levels for historical context.
Extended POC
Extends POC levels forward until price revisits or crosses through them, potentially highlighting important market interaction zones.
Extended Value Area Field
Projects the previous period's value area into future price action for additional context regarding acceptance and rejection zones.
About TrendGenY Indicators
TrendGenY indicators are built from market experience, creative concepts, and a constant pursuit of unique perspectives. Rather than following conventional ideas, the focus is on uncovering alternative insights and viewing market behavior through different angles to reveal information that traditional tools may overlook and help traders build a more meaningful edge in the market. Indicateur

Indicateur

Entry Gate - ADR% / ADV / ATR MultipleThree critical pre-trade filters, always visible right on your chart.
Before entering any swing trade, three questions determine whether the setup is even worth considering: is this stock volatile enough to move my account, is it liquid enough to trade cleanly, and is it too extended to enter now? Entry Gate answers all three at a glance, in a single corner of your chart.
ADR% (Average Daily Range) measures how much a stock moves on an average day. Too low and it won't move your portfolio. Too high and daily noise will stop you out randomly.
ADV (Average Dollar Volume) measures how much money flows through the stock each day. Liquid stocks respect key levels, pull back cleanly to moving averages, and don't gap on low volume. Illiquid stocks do the opposite.
ATR Multiple measures how extended the price is above its 50-day moving average, expressed in ATR units. The further extended, the higher the probability of a pause or reversal. Based on jfsrev's published formula: % Gain from MA divided by ATR%.
ATR% rounds out the dashboard with the raw volatility number for context.
All values are color-coded against your thresholds:
🟢 Green — within your ideal range
🟠 Orange — borderline, proceed with caution
🔴 Red — outside your criteria
A yellow dot also plots above the bar when the ATR Multiple exceeds your trigger level, marking historically extended zones at a glance.
Fully customizable:
Independent thresholds for ADR%, ADV, and ATR Multiple
Warning zones for borderline values
Lookback periods for each calculation
Font size, table position, dot size and offset
Color customization for good / warning / bad / ATR / dot
All values are pulled from the daily timeframe via request.security, so the numbers stay consistent whether you're on a daily, weekly, or intraday chart.
Default thresholds are calibrated for swing traders running mid-sized accounts. Adjust to match your strategy.
Credits to ArmerSchlucker for the original ADR% table indicator, MikeC / TheScrutiniser and GlinckEastwoot for the ADR% formula, and jfsrev / Fred6724 for the ATR% Multiple from 50-MA approach. Indicateur

Kinetic Inertia Field [JOAT]Kinetic Inertia Field
Introduction
Kinetic Inertia Field models price like a noisy particle using velocity, acceleration, jerk, kinetic energy, potential displacement, and equilibrium deviation.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. Velocity and Acceleration
Log returns are normalized by volatility to create velocity, then differentiated into acceleration and jerk.
2. Kinetic Energy
Inverse volatility acts as a mass proxy and squared velocity creates energy context.
3. Equilibrium Displacement
A regression/VWAP blend creates a fair path and ATR-normalized displacement.
4. Inertia Field
Energy, acceleration, and displacement combine into inertial up, inertial down, or elastic state.
kineticEnergy = 0.5 * mass * velocity * velocity
Features
Velocity, acceleration, and jerk model
Kinetic and potential energy scoring
Regression/VWAP equilibrium
Energy rails and impulse trace
K+ and K- labels plus snapback markers
Input Parameters
Velocity smoothing
Volatility memory
Equilibrium horizon
Energy and inertia gates
Cooldown and display toggles
How to Use This Script
Use K+ and K- as confirmed high-energy state changes. Gold markers show elastic snapback conditions.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
KIF is original in applying kinetic energy, potential displacement, and inertia scoring to price-state analysis.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
Indicateur

Average Daily Range Percentage (ADR%) and Average Daily VolumeTwo critical pre-trade filters, always visible right on your chart.
Before entering any swing trade, you need to know two things: is this stock volatile enough to move your account, and is it liquid enough to trade cleanly? This indicator answers both questions at a glance.
**ADR% (Average Daily Range)** measures how much a stock moves on an average day. Too low and it won't move your portfolio. Too high and the daily noise will stop you out randomly. The color tells you where you stand instantly.
**ADV (Average Dollar Volume)** measures how much money flows through the stock each day. Liquid stocks respect key levels, pull back cleanly to moving averages, and don't gap randomly on low volume. Illiquid stocks do the opposite.
Both values are color-coded against your thresholds:
🟢 Green — within your ideal range
🟠 Orange — borderline, proceed with caution
🔴 Red — outside your criteria, skip it
Fully customizable:
ADR% and ADV thresholds
Warning zones for borderline values
Lookback periods for both calculations
Colors for good, warning, and bad values
Default thresholds are calibrated for swing traders. Adjust to match your account size and risk tolerance.
Built for swing traders who want clean, fast chart reviews without second-guessing liquidity or volatility on every name. Indicateur

DTR & ATR & RVolDTR & ATR with Live Zones + Relative Volume
Combines two essential intraday tools in a single overlay indicator:
DTR vs ATR — compares today's Daily Trading Range (actual high–low) against the Average True Range (ATR). Displayed as a percentage so you instantly see where the day stands relative to its historical average range. The info box turns green (< 70%), yellow (70–90%), or red (≥ 90%) to signal how extended the move already is.
ATR Zone Lines & Boxes — draws horizontal lines and shaded zones at 100%, 150%, 200%, 250%, and 300% of the ATR, anchored to the session open. Lines update dynamically as price discovers the day's range, then lock in once the full ATR is covered. Fully customisable colours, thickness, and label styles per level.
Relative Volume (RVol) — measures today's volume activity versus the N-day historical average. Two modes:
[Cumulative (default): total volume accumulated so far today (including pre-market and after-hours) divided by the N-day average full-day total. Grows throughout the session; values above 100% mean today is running above average volume.
Pace: compares each individual bar's volume to the N-session EWMA for that same bar slot — a stable per-bar reading that is not distorted by the naturally high opening volume.
All inputs are fully configurable: ATR length and smoothing method (EMA/RMA/SMA/WMA), RVol lookback period and mode, session time and time zone, individual on/off toggles and colour pickers for every ATR level, and table position/size.
Based on the original "DTR & ATR with live zones" by Mereep01, extended with a time-consistent Relative Volume engine. Indicateur

Black Merton Volatility Engine [JOAT]Black Merton Volatility Engine
Introduction
Black Merton Volatility Engine blends multiple realized-volatility estimators with expected-move rails, cone rank, jump pressure, and tail-state classification.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. Composite Realized Volatility
Close-to-close, Parkinson, Garman-Klass, Rogers-Satchell, and Yang-Zhang-style estimates contribute to the volatility state.
2. Volatility Cone
Current volatility is ranked against a historical cone to identify squeeze and shock conditions.
3. Expected Move Rails
Annualized volatility is converted into a multi-day expected move around price.
4. Tail and Jump Pressure
Large returns, rail breaches, and volatility divergence contribute to tail and jump states.
expectedMove = close * realizedVol * math.sqrt(days / 252)
Features
Composite realized volatility
Expected-move rails
Squeeze and shock regimes
Gamma pin, tail shock, clean expansion, and jump labels
Movable quant HUD
Input Parameters
Fast, base, and slow vol windows
Vol cone window
Expected move days
Squeeze and shock percentiles
Cooldown and display toggles
How to Use This Script
Use the rails as volatility context. Squeeze, shock, tail, and jump states describe volatility conditions, not a certain direction.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
BMV is original in blending several volatility estimators, cone ranking, jump pressure, and expected-move visualization.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
Indicateur

Discrete Stochastic Volatility Optimal Stopping## Technical Documentation: Discrete Approximation of Bivariate Optimal Stopping Boundaries
### Overview
This document outlines the mathematical methodology for discretizing a continuous-time stochastic volatility model to identify optimal execution boundaries. The algorithm maps an asset's price and variance processes into standardized state spaces to detect joint extrema, triggering execution when predefined statistical thresholds are breached.
---
### 1. Price Process Normalization
To evaluate structural price dislocation, the raw asset price $P_t$ is transformed into a standardized normal state space (Z-score).
**Mathematical Formulation:**
$$Z^{(S)}_t = \frac{P_t - \mu_S}{\sigma_S}$$
Where the sample mean ($\mu_S$) and sample standard deviation ($\sigma_S$) are calculated over an $N$-period lookback window:
* **Sample Mean:** $\mu_S = \frac{1}{N} \sum_{i=0}^{N-1} P_{t-i}$
* **Sample Standard Deviation:** $\sigma_S = \sqrt{\frac{1}{N} \sum_{i=0}^{N-1} (P_{t-i} - \mu_S)^2}$
**Purpose:** This isolates the magnitude of the price deviation relative to its recent equilibrium, providing the orthogonal $x$-axis for the state space.
---
### 2. Instantaneous Variance Estimation
Continuous-time models rely on instantaneous variance, which is unobservable in discrete time. The algorithm approximates this using the annualized rolling realized variance of geometric returns.
**Mathematical Formulation:**
$$v_t = \frac{252}{N} \sum_{i=0}^{N-1} r_{t-i}^2$$
Where the continuously compounded return $r_t$ is defined as:
$$r_t = \ln\left(\frac{P_t}{P_{t-1}}\right)$$
**Purpose:** Assuming the mean daily return is zero ($\mu \approx 0$), the squared log return $r_t^2$ serves as an unbiased estimator of daily variance. The factor $\frac{252}{N}$ standardizes the sum of these squared returns into an annualized volatility metric ($v_t$).
---
### 3. Variance Process Normalization
Because variance $v_t$ is heteroskedastic and mean-reverting, the empirical variance series must also be standardized to evaluate expansion or compression relative to its own baseline.
**Mathematical Formulation:**
$$Z^{(v)}_t = \frac{v_t - \mu_v}{\sigma_v}$$
Where $\mu_v$ and $\sigma_v$ are the $N$-period sample mean and standard deviation of the variance series $v_t$.
**Purpose:** This yields a unitless metric representing the statistical extremity of the current volatility regime, forming the orthogonal $y$-axis of the state space.
---
### 4. Boundary Evaluation Logic
The discrete optimal stopping conditions approximate the analytical Hamilton-Jacobi-Bellman (HJB) boundaries by evaluating the intersection of the two state variables ($Z^{(S)}_t$ and $Z^{(v)}_t$) against arbitrary static thresholds ($\alpha$ for maxima, $\beta$ for minima).
**Entry Condition (Buy):**
Execution is triggered exclusively at the joint minimum of price and variance, defined by the logical intersection:
$$\tau_B = \inf \{ t \ge 0 \mid (Z^{(S)}_t \le \beta_S) \land (Z^{(v)}_t \le \beta_v) \}$$
*Requires price to be heavily discounted while the market regime is highly compressed.*
**Exit Condition (Sell):**
Liquidation is triggered exclusively at the joint maximum, defined by the logical intersection:
$$\tau_S = \inf \{ t \ge \tau_B \mid (Z^{(S)}_t \ge \alpha_S) \land (Z^{(v)}_t \ge \alpha_v) \}$$
*Requires price to be statistically overextended during a regime of extreme variance expansion.* Indicateur

Efficiency Trailing Stop LossEfficiency TSL is an adaptive trailing stop framework designed to dynamically follow market movement while continuously adjusting stop behavior based on changing price efficiency and directional conditions.
Unlike traditional trailing stop systems that rely on static ATR values or fixed structure levels, Flip TSL evaluates how effectively price is moving and uses that information to expand, tighten, or aggressively reduce risk as market behavior evolves.
The objective is not simply to trail price, but to adapt risk management according to changing market conditions beneath the surface.
By combining market efficiency analysis, directional state detection, adaptive stop expansion logic, and automatic long/short transition behavior into a unified framework, the indicator is designed to provide additional context for trade management and evolving market structure.
Features
• Single adaptive trailing stop line
• Automatic Long ↔ Short transition system
• Dynamic stop expansion and tightening engine
• Market efficiency analysis
• Improvement / deterioration detection
• Automatic direction logic modes:
• Stop Cross
• SMA Direction
• Candle Direction
• Structure Step stop logic
• Swing High / Low fallback logic
• Multi-timeframe calculations
• Adjustable timeframe selection
• Wait-until-close confirmation option
• Dynamic ATR stop sizing
• Real-time dashboard
• Fully customizable colors and display settings
Dashboard Includes
• Current direction mode
• Auto direction method
• Efficiency score
• Market state
• Stop mode
• Active ATR multiplier
• Current trailing stop value
Alerts Included
• Flipped Long
• Flipped Short
• Efficiency crossed below threshold
• Long Mode Activated
• Short Mode Activated
Potential Use Cases
• Dynamically manage open positions
• Adapt stop placement to changing conditions
• Reduce risk during deteriorating environments
• Hold stronger trends longer
• Filter lower-quality market conditions
• Add confluence to existing systems
• Study changing market behavior
Interpretation
Expanded
Market efficiency is elevated and conditions remain supportive of directional continuation.
The trailing stop expands and provides additional room for price movement.
Tightening
Market conditions begin slowing or losing efficiency.
The trailing stop contracts and moves closer to price action.
Cut / Take Profit
Market efficiency falls beneath the defined threshold.
The stop may aggressively tighten or move toward current price to reduce exposure and protect gains.
Direction Modes
Stop Cross
Direction flips when price crosses the active trailing stop.
SMA Direction
Direction follows price relative to moving average positioning.
Candle Direction
Direction adapts based on bullish and bearish candle behavior.
About TrendGenY Indicators
TrendGenY indicators are built from market experience, creative concepts, and a constant pursuit of unique perspectives. Rather than following conventional ideas, the focus is on uncovering alternative insights and viewing market behavior through different angles to reveal information that traditional tools may overlook and help traders build a more meaningful edge in the market. Indicateur

Indicateur

Indicateur
