Market Condition Oscillator [HexaTrades]Market Condition Oscillator classifies price action into three simple states: Bullish Trend, Bearish Trend, and Consolidation, and paints them as a color-coded histogram below your chart. It is built to answer one question at a glance: should I be trend-trading right now, or is the market just chopping sideways?
What it shows
🟢 Green histogram above zero → confirmed bullish trend. Taller bars = stronger trend.
🔴 Red histogram below zero → confirmed bearish trend. Deeper bars = stronger trend.
⚪ Gray histogram near zero → consolidation/range (no clear trend).
How it works
The indicator combines four classic, well-understood concepts so that no single signal can produce a false trend on its own:
1. ADX (trend strength): measures how strongly the market is trending. Below the threshold, the market is treated as consolidation regardless of direction.
2. DI+ / DI− (direction) : the Directional Movement pair decides whether strength is to the upside or downside.
3. EMA position + slope (confirmation) : price must be on the correct side of the EMA and the EMA must be sloping the right way. This filters out counter-trend spikes.
4. ATR & EMA-distance (range detection) : consolidation is flagged when volatility compresses or price hugs the EMA, even if ADX hasn't fully dropped yet.
A phase only changes after the condition holds for a configurable number of candles (Confirmation Bars). This is the key to removing the constant flip-flopping that plagues most trend indicators.
Trend rules
✏️ Bullish = ADX above threshold and DI+ > DI− and price above EMA and EMA rising — held for N bars.
✏️Bearish = ADX above threshold and DI− > DI+ and price below EMA and EMA falling — held for N bars.
✏️Consolidation = weak ADX, or compressed ATR, or price hugging the EMA — anything that is not a confirmed trend.
Features
- Bullish, bearish, and consolidation market phase detection.
- Separate oscillator panel for clean chart reading.
- Color-coded histogram.
- Optional histogram smoothing.
- Confirmation bars to reduce false flips.
- Phase label on the latest candle.
- Legend table for easy interpretation.
- Alert conditions for bullish, bearish, consolidation, and trend-flip events.
- Uses confirmed candle data only and does not use future references.
How to use it
- Trend traders: only take longs while the histogram is green, shorts while it is red. Stand aside on gray.
- Mean-reversion traders: the gray phase highlights range conditions where fade/scalp setups work best.
- Filter: combine with your existing entry system and ignore signals that fight the MCO color.
- Works on any market and any timeframe. For higher timeframes, consider raising the ADX threshold and Confirmation Bars.
Alerts
Five ready-to-use alert conditions:
Bullish Trend Started
Bearish Trend Started
Consolidation Started
Bullish → Bearish Shift
Bearish → Bullish Shift
This indicator is designed to help identify market conditions. It should be combined with price action, support and resistance, volume, and proper risk management. No indicator can guarantee profitable trades.
We would love to hear your suggestions. If you have ideas for new features, indicators, analytics, or improvements, please share your feedback. Your input helps guide future updates and improve the indicator for all traders.
This indicator is for educational and analytical purposes only. It should not be considered financial advice. Always use proper risk management and make trading decisions based on your own analysis
Indicator

Apex Edge - Trend BreakoutApex Edge — Trend Breakout
A with-trend channel breakout system with a 30-symbol radar and a dual-window, cost
adjusted backtest.
Indicator Guide - Apex Edge
This guide explains exactly what the indicator does, how every number is calculated, why the backtest is built the way it is, and how to trade it. Nothing here is hidden behind a black box — the whole point of the tool is that you can see the workings and judge the edge for yourself.
1. What it is
Apex Edge — Trend Breakout is a single overlay indicator that does four jobs at once:
Signals trades when price breaks the recent range in the direction of the dominant trend.
Manages the trade with a chandelier trailing stop, so winners are allowed to run and losers are cut quickly.
Scans a 30-symbol watchlist (the Radar), ranking what is trending and flagging what is about to break.
Tests the rules on the chart symbol across two separate date windows and reports the result as average R and sample size — then auto-grades it Red, Amber or Green.
The thesis.
Most price action is noise. Occasionally a market trends, and when it does, a break of the
recent range tends to continue. The edge of such a system does not come from being right often — it comes from a fat right tail: many small losses when breaks fail, paid for by the occasional large runner that the trailing stop rides for multiples of the initial risk. The tool is built end-to-end to find that behaviour and to stop you fooling yourself about whether it is really there.
2. What appears on your chart
Green and red rails — the upper and lower edges of the breakout channel. A close beyond a
rail is a potential trigger.
Up / down triangles — confirmed entries (a close-break that agrees with the trend).
Orange line — the live trailing stop for the most recent signal. This is where your protective
order goes.
HUD (top-right by default) — the chart symbol's trend, distance to its rail, current setup state, last signal and a running long/short signal count.
Radar — the 30-symbol scanner with score, direction, state and a Red/Amber/Green
“Go” column.
Backtest panel — two date windows side by side, each showing average R and
trade count per side, plus an automatic verdict.
3. The entry signal — how it is calculated
3.1 The breakout channel
The rails are the highest high and lowest low of the last N bars (default 20), measured up to the
previous bar so they never repaint:
upBreak = highest(high, 20) of the prior bar
dnBreak = lowest(low, 20) of the prior bar
A long trigger is a close crossing above the upper rail; a short trigger is a close crossing below the lower rail. Because the test is on the close, an intrabar wick through a rail that closes back inside does not trigger — only a genuine close beyond the range counts.
3.2 The dominant-trend filter
A breakout alone is not enough; it must agree with the trend. Trend is defined by a long EMA (default 200) and that EMA's slope, so a flat market counts as no trend:
Uptrend = close > EMA(200) AND EMA(200) rising over the last 5 bars
Downtrend = close < EMA(200) AND EMA(200) falling over the last 5 bars
Requiring both price position and EMA slope filters out the chop that ruins most breakout systems: if the EMA is flat, neither condition is true and no trades are taken.
3.3 Optional higher-timeframe agreement
You can additionally require the higher timeframe (default daily) to agree, using its last closed bar's EMA so it cannot repaint. With it on, a 4H long also needs the daily to be pointing up. Off by default.
3.4 The final rule
Long = close-break of the upper rail AND dominant uptrend
Short = close-break of the lower rail AND dominant downtrend
With “with-trend only” enabled (the default), counter-trend and flat-market breaks are blocked entirely. The triangle only prints when both halves line up.
4. The exit — chandelier trailing stop, and what “R” means
Risk is defined the moment you enter. The initial stop sits a multiple of Average True Range away from entry (default 1.5 × ATR(14)). That distance — entry to initial stop — is one R. Every outcome the tool reports is measured in multiples of that initial risk.
Once in the trade, the stop trails using a chandelier: it hangs a multiple of ATR (default 3 × ATR)
below the highest high reached since entry (mirrored for shorts). It only ever moves in your favour — it ratchets, never loosens. You exit when price touches the line.
A loss is roughly −1R: the break fails and price falls back to the initial stop.
A win is whatever the trail captures — often small, occasionally very large when a real trend
develops. There is no fixed profit target; capping the winners would throw away the exact tail
the system exists to harvest.
Note Live, you place a resting stop on the orange line and step it along as the line moves. The
backtest exits on the same intrabar touch, so what you test is what you trade.
5. The Market Radar — how the scan is built
The Radar pulls 30 symbols on the scan timeframe (default 4H) and ranks them so you watch the right markets. Four numbers drive it.
5.1 Trend-strength score
The score blends how cleanly a market is moving with how strongly:
Efficiency Ratio (ER) — net distance travelled divided by the total path taken, over a lookback
(default 20). A straight move scores high; a market that thrashes back and forth to end up in the same place scores low.
ER = |close − close | / sum of |bar-to-bar moves over 20 (as a %)
ADX — the standard directional-strength index (default 14).
The two are scaled and blended 55% ER / 45% ADX, calibrated so a market in a genuine trend reads roughly 60–70. Only symbols above the score threshold (default 50) are shown, strongest first.
5.2 Direction, NEAR and the Go grade
Direction comes from the same dominant-EMA logic as the chart (up, down, or flat).
NEAR flags a symbol that is trending and within a set distance of its breakout rail in the trend
direction (default 0.5 × ATR) — i.e. about to trigger.
Go (Red / Amber / Green) is read from your own curated lists. You tell the indicator which
symbols you trade long and short at Green (confirmed) and Amber (testing) confidence; the Go
column then lights up only for those symbols in that direction.
Note The Radar does not grade edges for you — you populate the Green/Amber lists from your own backtest sweep (Section 6). The Go column simply surfaces your decisions on the live scan.
6. The backtest engine and the Auto verdict
This is where you decide whether a symbol earns a place on your lists. For the chart symbol, the engine replays every historical signal forward (up to 60 bars), simulates the exact chandelier trail with intrabar touch exits, deducts your cost per trade, and records each result in R.
It does this across two independent date windows and reports, for each window and each side
(long / short / all):
Avg R — the average result per trade, net of cost. This is the system's expectancy.
N — the number of trades in that window. This tells you whether to believe the Avg R.
The Auto column then turns that into a verdict using two thresholds (defaults shown), applied to both windows:
Verdict/Condition:
GREEN
Avg R ≥ 0.10 AND N ≥ 50 in BOTH windows — a real, repeatable edge
AMBER
Qualifies in one window, or only marginally — promising, not proven
no
Fails the bar — no demonstrated edge this way
A Green therefore is not a single good run; it is an edge that survived two separate market periods with a large enough sample in each. That is the bar a symbol must clear before it goes on your Green list.
Note - Cost is entered in price units and applies to the chart symbol, so set it to that instrument's realistic round-trip spread before trusting a marginal (Amber) result. A couple of pips is what flips a thin edge from positive to negative — which is exactly the truth you want before risking money.
7. Why those default backtest dates?
The two windows default to 2019–2021 and 2022–present, and the split is deliberate. These are not two halves of one stretch — they are two genuinely different market regimes:
2019–2021 spans the late-cycle calm, the COVID crash and the violent recovery — a high
volatility, strong-trend era.
2022–present is the rate-hiking regime: broad USD strength, a real equity bear in 2022, and a
different volatility character.
A set of rules that prints a profit in one regime might simply be tuned, by luck or by hand, to that regime. The only honest test is whether the same untouched rules also work in a different one.
Requiring an edge to clear the bar in both windows is the out-of-sample check built directly into the panel. The dates are adjustable — what matters is that the two windows cover different conditions, not the exact years.
8. Why we judge by R and N, not win rate
Win rate is the most quoted and least useful statistic in trading. On its own it tells you almost nothing, and for a system like this it actively misleads.
8.1 Win rate hides the size of wins and losses
Two systems can have wildly different win rates and the opposite profitability. Expectancy — average R per trade — is what actually ties to your account:
Example:
System - “High win rate” (avg win +0.5R, avg loss −5R)
Win rate - 90%
Expectancy -0.05R
Reality - Loses money
System - Trend breakout (avg win +3R, avg loss −1R)
Win rate - 40%
Expectancy - 0.60R
Reality - Strong edge
The 90%-winner loses on the rare 5R disaster; the 40%-winner thrives because its winners dwarf its losers. Judge either by win rate and you draw the wrong conclusion. Expectancy = (win% × avg win) − (loss% × avg loss), expressed in R, is the number that matters.
8.2 This system is meant to be a low win-rate system
A trend-breakout-with-trail design is designed to win less than half the time. Most breakouts fail and cost ~1R; a minority become trends and the trail rides them for many R. The profit lives entirely in those few big winners — the fat right tail. Win rate cannot see that tail; only average R can.
Optimising for win rate would push you to cap winners and widen stops, destroying the very edge this tool is built to capture.
8.3 N is what makes the average believable
An average R is only as trustworthy as the number of trades behind it. A +0.8R average on 8 trades is a coin landing heads a few times in a row — it tells you nothing. The same average on 120 trades is a genuine signal. That is why the Auto grade refuses to certify anything below N ≥ 50 per window, no matter how attractive the Avg R looks. Small samples are where traders fool themselves most, so the tool simply will not show Green there.
8.4 How to read an Avg R figure
Avg R (net of cost) Read it as
≤ 0 No edge
+0.05 to +0.10 Marginal — cost and slippage can erase it
+0.10 to +0.20 Workable edge
+0.20 to +0.40 Strong
+0.40 and up Suspect — check for look-ahead, tiny N, or an error
Bigger is not automatically better. A sustained average above ~+0.40R on a simple system is more often a sign of a mistake than a goldmine, and should be interrogated, not celebrated.
9. How to trade it
The workflow separates the slow, careful job (deciding what to trade) from the fast one (executing when it triggers).
1. Weekly — curate. Flick through your watchlist. On each symbol read the Auto panel and note
the verdict per side. Add Green symbols to the matching Green list (long or short) in settings,
and Amber symbols to the Amber lists. Skip the reds.
2. Set once — the blanket alert. On a 4H chart create the “Watchlist near breakout” alert, set to Once Per Bar Close. It pings only for your Green/Amber symbols when one is trending and
nearing its rail.
3. On the ping — find the trade. Open the Radar. Confirm the symbol shows Green/Amber Go +
NEAR + the right direction.
4. Arm the entry. On that symbol's chart set the “Breakout Long/Short” alert, also Once Per Bar
Close, so only a close beyond the rail can fire it (no wicks).
5. Enter. When the triangle prints, take the trade and place your stop on the orange trailing line.
6. Manage. Step the stop along with the line as it moves your way — never against you. Exit on the touch. No fixed target; let the trail decide.
10. Trading rules and risk discipline
Trade Green in the validated direction. Amber is watch-and-small-size. Red is no trade.
A break against the trend is not your trade. Skip it, however tempting.
Judge over a batch of trades, never one. A single loss says nothing about a positive
expectancy system; variance is the cost of admission.
One settings set for all symbols. Never tune the inputs per symbol to flatter the past — that is
curve-fitting. If you change a strategy setting, re-test both date windows before trusting it again.
Size correlated instruments as one position. A basket of yen crosses, or a basket of equity
indices, is one bet wearing several names. Three 1% longs that all rise and fall together is a 3%
bet on one theme, not three diversified trades.
11. Settings reference
Setting Default What it does
Breakout channel 20 Bars used for the high/low rails
Near-break heads-up 0.5 ATR How close to the rail counts as NEAR
Dominant EMA 200 The trend reference line
EMA slope lookback 5 Bars used to judge the EMA's slope
With-trend only On Blocks counter-trend and flat-market breaks
Higher timeframe Off / 1D Optionally require the daily to agree
Initial stop 1.5 ATR Defines one R (entry to stop)
Chandelier trail 3.0 ATR Trailing distance below the running extreme
Trade window 60 bars How far the backtest follows each signal
Cost per trade 0 Round-trip cost in price units (set per instrument)
Test windows A / B 2019–21 / 22–now The two regimes the Auto grade checks
Qualify Avg R / N 0.10 / 50 Thresholds for a Green verdict, per window
Scan timeframe 4H Timeframe the Radar evaluates
Score threshold 50 Minimum trend score to appear on the Radar
12. Non-repainting, and honest limitations
Non-repainting by design. Signals use closed-bar prices and the prior-bar channel, the higher
timeframe pull uses the last closed bar, and the backtest only ever replays bars that were already in the past relative to each signal. What you see on history is what you would have seen live.
What a backtest can and cannot tell you. The replay is a simulation. It assumes fills at the touched price and a fixed cost; live trading adds variable spread, slippage, gaps and partial fills. Treat the Avg R as an estimate of edge and direction, not a promise of returns. Forward-test before you scale.
The Green/Amber lists are your own settings inputs — the tool surfaces your decisions, it does not validate them for you.
Correlated symbols inflate the apparent number of edges; the count is not the same as
diversification.
A strong directional drift in an asset class (equities up, for example) can make a one-sided
system look better than the rule itself is.
This indicator is a decision-support and research tool. It is not financial advice and does not place trades. Markets carry risk; past performance does not guarantee future results. You are responsible for your own decisions and risk.
Apex Edge — Trend Breakout Radar finds the trend Auto/Go says if it pays Arrow times entry Orange line manages Exit Indicator

Polar Auto Fibonacci Pro - [Rehan Khanani]Polar AutoFib Pro
Polar AutoFib Pro is a professional all-in-one trading indicator that combines two powerful systems into a single clean overlay—a trend-following buy/sell signal engine and an automatic Fibonacci retracement tool. No need to juggle multiple indicators; everything you need is right here on the chart.
─────────────────────────────
HOW IT WORKS
─────────────────────────────
This indicator runs two engines simultaneously:
Engine 1 — PolarEdge Signal System
Generates high-probability Buy and Sell signals by combining three confirmations:
1. EMA 200 — The primary trend filter. When the price is above the EMA, the system looks for Buy setups. When the price is below, it looks for Sell setups. This keeps you trading with the dominant trend at all times.
2. Supertrend — A dynamic volatility-based band that confirms trend direction. The green band confirms bullish momentum; the red band confirms bearish momentum.
3. RSI (Relative Strength Index) — Used as a momentum trigger. A BUY signal fires when RSI crosses up from the oversold zone (default 30). A SELL signal fires when RSI crosses down from the overbought zone (default 70).
All three conditions must align simultaneously—this triple-confirmation logic filters out weak and false signals.
Engine 2 — Auto Fibonacci Retracement
Automatically detects the most recent swing high and swing low using pivot point calculations, then draws the complete Fibonacci retracement grid in real time — no manual drawing required.
The indicator identifies whether the last major pivot was a high or a low, determines the swing direction, and plots all key levels accordingly. When a new swing forms, the levels update automatically.
─────────────────────────────
FIBONACCI LEVELS INCLUDED
─────────────────────────────
0 / 0.236 / 0.382 / 0.5 / 0.618 / 0.786 / 1
1.618 / 2.618 / 3.618 / 4.236
Each level is independently toggleable with its own color control. You can show values as decimals or as percentages. Labels can be positioned on the left or right side of the chart. Line extension can be set to Left, Right, or Both directions.
─────────────────────────────
KEY FEATURES
─────────────────────────────
- Triple-confirmation Buy/Sell signals (EMA + Supertrend + RSI)
- Automatic Fibonacci retracement — no manual drawing needed
- Real-time swing detection using pivot high/low logic
- Dynamic trend background (subtle green/red shading behind candles)
- 11 fully customizable Fibonacci levels with individual color pickers
- Toggle each Fib level on/off independently
- Show prices and/or level values on labels
- Labels position: Left or Right
- Line extension: Left, Right, or Both
- Reverse Fib direction toggle
- Works on all assets: Forex, Crypto, Commodities, Indices, Stocks
- Works on all timeframes
- 6 built-in alert conditions (see Alerts section below)
─────────────────────────────
SETTINGS GUIDE
─────────────────────────────
Group 1 — PolarEdge Signal Settings
- Trend Baseline EMA: Period for the main trend filter (default 200)
- RSI Length: RSI calculation period (default 14)
- RSI Overbought Level: Sell trigger threshold (default 70)
- RSI Oversold Level: Buy trigger threshold (default 30)
- Show EMA 200: Toggle the EMA line on/off
- Show Supertrend Bands: Toggle the Supertrend lines on/off
Group 2 — Auto Fibonacci Settings
- Pivot Depth: Number of bars to look back for swing detection (default 10). Lower = more sensitive, Higher = fewer but stronger pivots
- Reverse Fib Direction: Flips the Fib measurement direction
- Extend Left / Right: Controls how far Fib lines extend on the chart
- Show Prices: Displays exact price on each level label
- Show Level Values: Displays the Fib ratio on each level label
- Level Format: Choose between decimal values or percentage display
- Labels Position: Place labels on the Left or Right side
Group 3 — Fibonacci Levels
- Toggle each of the 11 levels individually
- Customize the value and color of every level
─────────────────────────────
ALERT CONDITIONS (6 Total)
─────────────────────────────
1. BUY Alert — fires on every confirmed Buy signal
2. SELL Alert — fires on every confirmed Sell signal
3. Any Signal — fires on either Buy or Sell
4. Fib 0.618 Cross — price crosses the Golden Ratio level
5. Fib 0.5 Cross — price crosses the midpoint level
6. Fib 0.382 Cross — price crosses the key retracement level
To activate: click the alarm clock icon on the indicator, select your desired condition, and set your notification method.
─────────────────────────────
HOW TO USE
─────────────────────────────
Step 1 — Identify trend direction using the EMA 200 and the background color. Green background means bullish bias; red background means bearish bias.
Step 2 — Watch for a BUY or SELL label to appear. This confirms all three conditions (EMA, Supertrend, RSI) have aligned.
Step 3 — Use the automatically drawn Fibonacci levels to plan your entry, stop loss, and take profit targets. Common setups: enter near the 0.382 or 0.5 retracement, target the 0 or -0.236 extension, stop below the 0.618 or 0.786 level.
Step 4 — Set alerts on your preferred Fibonacci levels to be notified when price reaches key zones.
─────────────────────────────
RECOMMENDED TIMEFRAMES
─────────────────────────────
- Scalping: 1m, 5m, 15m
- Intraday: 30m, 1H
- Swing Trading: 4H, Daily
- Position Trading: Weekly
The indicator adapts to any timeframe automatically.
─────────────────────────────
DISCLAIMER
─────────────────────────────
This indicator is a technical analysis tool designed to assist in identifying potential trading opportunities. It does not guarantee future results. Always apply proper risk management and conduct your own analysis before entering any trade. Past signal performance is not indicative of future results. Indicator

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. Indicator

Multi-Factor Regime Engine Pro [MarkitTick]💡 This indicator represents a robust framework designed to quantify market regimes by analyzing an array of price action, volatility, and momentum metrics. By synthesizing ten distinct market features into a unified confidence score, it dynamically adjusts its threshold bands, providing a highly adaptive approach to trend identification on any standard chart.
✨ Originality and Utility
Standard trend-following tools often rely on static lookback periods and fixed multipliers, which can lead to delayed signals during sudden market shifts or excessive false signals during consolidation. This indicator diverges from traditional methods by introducing a dynamic, feature-engineered confidence score. Instead of relying on a single data point like closing price or standard volatility, it aggregates inputs from momentum oscillators, directional movement indices, volume profiles, and standard deviation bands. This multi-dimensional analysis allows the indicator's bands to compress during high-confidence trends and expand during uncertain, low-confidence environments, offering a highly responsive and adaptive utility for modern chart analysis. Furthermore, it incorporates strict internal safeguards to prohibit execution on non-standard charts, ensuring the integrity of the data and preventing repainting vulnerabilities.
🔬 Methodology and Concepts
● The Feature Engineering Engine
The core of this indicator is built upon extracting ten distinct normalized features from the market data, evaluating multiple dimensions of price action simultaneously:
Momentum Normalization: Utilizes relative strength metrics, centered and scaled, to gauge underlying momentum bias without relying on absolute thresholds.
Directional Strength: Analyzes directional movement indices to quantify the strength of the current trajectory, applying directional penalties when negative movement overpowers positive movement.
Moving Average Distances: Measures the current price relative to fast and slow moving averages, standardizing the distance using the Average True Range to identify structural overextension.
Rate of Change Standardization: Normalizes the rate of change against its own rolling standard deviation to detect statistical anomalies in speed and acceleration.
Standard Deviation Extremes: Evaluates the position of the price relative to upper and lower Bollinger Bands, calculating the precise percentile of the close within the volatility envelope.
Volatility Stability: Compares short-term volatility against long-term volatility baselines to measure market stress and detect rapid expansions.
Volume Anomalies: Assesses current volume against its simple moving average, clamping the result to identify participation spikes that validate price movement.
Price Action Consistency: Calculates the ratio of bullish to bearish closes within the defined lookback period, serving as a raw footprint of buyer versus seller control.
● The Confidence Score Assembly
These standardized features are separated into distinct sub-components. A Directional Score identifies the probable path of the trend by weighting momentum and moving average slopes. A Quality Score measures the structural integrity of that trend by analyzing volume participation and volatility stability. These are mathematically combined to produce a Raw Confidence value. This raw output undergoes an adaptive smoothing process using a dynamic moving average, resulting in a highly stable, final Confidence Score bounded precisely between 0% and 100%.
● Adaptive Ratcheting Bands
The calculated Confidence Score directly influences the width of the trend bands. When the confidence is high, the internal multiplier decreases, tightening the bands closer to the price action to capture shifts quickly and protect accumulated distance. Conversely, when confidence is low, the bands expand to avoid noise and erratic whipsaws. The bands utilize a state-machine logic that only ratchets in the direction of the trend, acting as a trailing threshold that reacts to both price crosses and sudden regime shifts identified by extreme volatility spikes.
🎨 Visual Guide
● Heatmap Candles
The indicator actively repaints the chart candles based on a calculated mathematical "stress" metric.
Colors transition dynamically from a baseline trend color (Deep Sky Blue for bullish conditions, Radical Red for bearish conditions) to a bright orange "Regime Alert" color when underlying volatility spikes significantly.
Candle body opacity is heavily controlled by the alignment of the price action with the overall trend direction, fading to a darker tone during contrary movements or low-confidence pullbacks.
● ML Supertrend Band
Displayed as a prominent, solid line representing the adaptive trailing threshold on the chart.
This band is colored Deep Sky Blue during bullish market phases and Radical Red during bearish phases, updating in real-time as the state machine ratchets.
● Confidence Gradient Cloud
This visual element fills the spatial gap between the median price baseline and the trailing Supertrend band.
The exact opacity and gradient of this cloud are mapped directly to the Confidence Score. A highly opaque, solid cloud represents high confidence, while a highly transparent, fading cloud visually indicates low confidence and potential market transition.
● Visual Labels
Small directional visual markers appear directly above or below the price action when a trend flip occurs.
These labels display an arrow alongside a precise percentage value, representing the exact calculated Confidence Score at the moment the signal was generated.
● Info Table
Located statically in the top right corner, this dashboard displays crucial real-time internal metrics.
It includes the current trend direction, a visual text-based progress bar for the Confidence Score, the live Adaptive Multiplier value adjusting in real-time, the selected Model configuration, and a dynamic text alert that triggers during active Regime Shifts.
📖 How to Use
● Trend Identification
Observe the dominant color of the ML Supertrend Band and the Confidence Gradient Cloud. Deep Sky Blue strongly indicates a bullish environment, while Radical Red suggests a bearish environment. The visibility and thickness of the cloud serve as your primary visual gauge of the trend's structural health.
● Interpreting the Confidence Metric
Monitor the Confidence Score inside the Info Table or at signal generation. A high percentage (e.g., above 70%) suggests that multiple underlying market factors (volume, momentum, standard deviation) are in full agreement with the current directional bias. A rapidly dropping confidence score often precedes a period of choppy consolidation or warns of a potential reversal, allowing for tighter risk parameters.
● Reading Heatmap Candles for Shifts
When the standard colored candles begin transitioning toward the bright orange Regime Alert color, it indicates an abnormal spike in volatility combined with a directional momentum shift. This visually warns the user of a potential "Regime Shift" where the market is undergoing severe internal stress. These specific visual cues often signal an impending breakout from a range or a violent capitulation event.
⚙️ Inputs and Settings
● Model Configuration
Strategic Cycle Mode: Allows the choice between an "Auto" mode and a "Custom" mode. Auto mode dynamically selects the most mathematically optimal lookback lengths, thresholds, and weighting coefficients based purely on the current timeframe in seconds.
Strategic Cycle: When in custom mode, this determines the core lookback period for all volatility and momentum calculations. Smaller values drastically increase reactivity, while larger values provide smoother, long-term macroeconomic analysis.
Macro Trend Threshold: Sets the baseline mathematical width of the threshold bands. Higher values require significantly larger price movements to trigger a trend flip, reducing noise.
Prediction Weight: Controls the internal sensitivity of the bands to rapid changes in the Confidence Score, determining how aggressively the bands compress.
● Visual Settings & Colors
Dedicated toggles are provided to enable or disable the Confidence Labels, the Info Table, and the Heatmap Candles to keep the chart interface as clean as desired.
All core graphical colors, including the specific bands, gradient clouds, table text, and alert highlights, are fully customizable by the user via hex selection.
● Webhook Settings
The indicator is pre-configured to output detailed, formatted JSON payloads designed for external execution automation.
Users can securely define specific action strings for entering and closing both long and short positions directly within the settings menu, mapping exactly to their webhook parser logic.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Multi-Variate Feature Standardization
The mathematical foundation of this tool relies heavily on statistical normalization techniques designed to process heterogeneous data. Financial time series data is notoriously non-stationary and spans vastly different numerical scales. To effectively combine disparate metrics like Volume (often measured in millions) and relative strength oscillators (strictly bounded between 0 and 100), the indicator employs rigorous Min-Max scaling and localized Z-score approximations. For instance, the rate of change is evaluated against its own rolling standard deviation over a defined period, successfully standardizing the momentum readout into a continuous, comparable spectrum bounded cleanly between -1.0 and 1.0.
● Linear Weighted Ensembles
The internal architecture utilizes a deterministic linear weighted model to synthesize the final output. By assigning highly specific fractional coefficients to directional features (like the exponential moving average slope and relative strength) and structural features (like Bollinger Band width extremes and volatility stability), the script constructs a singular composite index. This mirrors standard ensemble methodologies found in data science, where the consensus of multiple independent weak learners generates a stronger, more reliable predictive metric than any single indicator could achieve in isolation.
● Volatility-Adjusted State Machines
The adaptive threshold logic operates as a strict finite-state machine incorporating the Average True Range metric. The specific mathematical innovation lies in rendering the ATR multiplier as an inverse linear function of the composite confidence index. In quantitative terms, this produces a dynamically dampened volatility envelope. When the composite index approaches a maximum value indicating high convergence, the dampening factor aggressively compresses the envelope, mathematically acknowledging that high-conviction trends exhibit less erratic mean-reversion behavior and therefore require drastically tighter invalidation levels to preserve structural alpha.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

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

Smart Trader, Episode 06, Isotropic Trend Lines🔷 WHAT IS ST-EP06 — ISOTROPIC TREND LINES?
ST-EP06 is a multi-scale structural trend channel indicator built on a σ-normalized coordinate system. It is designed to solve one of the oldest unaddressed problems in technical analysis:
trend angles that cannot be compared across instruments, timeframes, or volatility regimes.
A trend line drawn on a chart appears to carry a measurable angle — yet that angle is an artifact of the display window, not a property of the market. Resize the chart horizontally and the slope flattens; compress it and the slope steepens. A given price movement on Gold daily and Bitcoin 1-hour may produce visually identical slopes on screen while reflecting entirely different structural conditions. This happens because traditional charts use a coordinate space where the vertical axis (price) and the horizontal axis (time) share no fixed dimensional relationship.
The consequence is not merely cosmetic. A trader cannot meaningfully compare the steepness of a trend on one instrument with another — or even across timeframes on the same instrument — because the weight of "one unit of price per bar" varies with the instrument's current volatility.
As the author of this indicator, I sought a coordinate system where trend angles would be an intrinsic structural property of the market, independent of charting software or display settings. The goal: a space where a 30° uptrend on EUR/USD weekly carries the same structural meaning as a 30° uptrend on NASDAQ 5-minute — indicating that each market is moving at the same rate relative to its own realized volatility.
The solution draws on the principle of dimensional analysis, well established in physics and engineering. Just as the Reynolds number normalizes fluid flow to make behavior comparable across different pipe sizes and fluid viscosities, this indicator normalizes price movement by realized volatility, producing a dimensionless space we call the Isotropic Coordinate System (ICS).
In ICS, price is expressed in natural logarithmic form and scaled by a volatility estimate (σ) derived from the Yang-Zhang (2000) method — a drift-invariant estimator that incorporates Open, High, Low, and Close data. The resulting vertical axis is dimensionless: one unit equals one standard deviation of recent realized price behavior. When trend angles are measured in this space, 45° indicates approximately one σ of movement per bar — whether the chart shows a penny stock, a major currency pair, or a commodity index.
Traditional chart coordinates assign no fixed relationship between the price axis and the time axis. Resizing the chart window changes the visual slope of the same price movement — a compressed view may show 52° while a stretched view of the same data shows 25°. The angle is a display artifact, not a market property. The Isotropic Coordinate System (ICS) addresses this by normalizing log-price by realized volatility (σ). In this space, the trend angle is designed to remain constant regardless of how the chart is displayed — because it measures price displacement in units of σ per bar, not in pixels per pixel.
🔷 HOW THE MODULES WORK TOGETHER
ST-EP06 operates as a deterministic pipeline where each stage consumes the output of the one before it:
Realized volatility estimation (σ) → Structural block construction → Monotonic direction detection → ICS angle measurement → Channel boundary fitting → Six-scale parallel analysis → Consensus aggregation → Breakout and retest state tracking → Dashboard narrative generation
The Yang-Zhang σ provides the normalization constant for every downstream computation. Price history is then partitioned into structural blocks, each distilled to a single central tendency that resists close-price bias. Consecutive block centers are compared to identify the longest uninterrupted directional segment. The slope of that segment, measured in σ-normalized space, yields the ICS angle. Four price extremes located within the segment define two log-linear channel boundaries. This complete pipeline runs independently at six temporal scales, and their independent outputs are aggregated into a structural consensus. A finite-state machine then tracks the evolving relationship between price and the primary channel — breakout, retest, confirmation, or failure — and translates it into a single-line human-readable narrative.
ST-EP06 operates as a deterministic sequential pipeline. Yang-Zhang volatility (σ) provides the normalization constant that flows into every downstream stage. Price history is partitioned into structural blocks, each reduced to a geometric mean. The longest monotonic segment determines direction, and its slope in σ-normalized space yields the ICS angle. Four price extremes define the channel boundaries. This complete pipeline runs independently at six scales — 3, 7, 13, 19, 29, and 47 bars per block — all prime numbers, chosen to minimize harmonic overlap so that multiple scales are unlikely to lock onto the same cyclical artifact. Scale 19 (highlighted) serves as the primary engine: it is the only scale that maps to the user's Trend Block Period input, and the only scale whose output drives the chart-overlay channel lines, the projection, the diamond markers, and the breakout/retest state machine. The other five scales operate at fixed periods and contribute exclusively to the cross-scale consensus count — providing structural context that a single scale cannot offer alone. When 5 or 6 of the 6 scales agree on direction, it suggests a structural trend visible across a broad range of temporal resolutions.
🔷 DATA ANCHORING
Every structural computation in ST-EP06 — volatility, block means, direction, channel coordinates, state machine transitions, and dashboard narrative — is governed by a single anchoring reference, selected through the Calculation Bar input.
Live Bar mode (default): the anchor is the current forming bar. Values update with each incoming tick. This is standard PulseWire behavior and means the indicator may exhibit intra-bar repaint — the live bar's data enters all computations as it evolves.
Close Bar mode: the anchor shifts to the last fully confirmed (closed) bar. The forming bar is excluded from every computation. Values lock once a bar closes and do not change retroactively. This mode is intended for structural analysis, back-testing, and any workflow where historical consistency is a priority.
One deliberate exception is maintained in both modes: the dashboard header always displays the current live closing price (Live Exception protocol), preserving real-time price awareness regardless of how the indicator's structural engine is anchored.
Two modes, same chart moment. In Live Bar the anchor sits on the forming bar, so every value updates tick-by-tick and may repaint within the bar. In Close Bar the anchor shifts to the last closed bar, locking all structural values once the bar closes. The only exception is the dashboard header row, which always displays the live closing price in both modes, so real-time price awareness is never lost.
🔷 YANG-ZHANG VOLATILITY (σ)
The foundation of the ICS is a robust volatility estimate. ST-EP06 uses the Yang-Zhang (2000) realized volatility estimator, an academically established method that combines three variance components:
Overnight variance — capturing the gap between consecutive sessions, measured from the prior close to the current open.
Intraday variance — capturing the movement from open to close within each session.
Range-based variance — using the Rogers-Satchell (1991) estimator, which extracts additional information from the high and low prices without assuming zero drift.
These three components are blended using an optimal weight that is designed to minimize estimation error. The resulting σ updates every bar, adapts to changing market conditions, and — crucially — is drift-invariant: it is intended to remain unbiased whether the market is trending strongly or mean-reverting.
🔷 BLOCK CONSTRUCTION
Rather than analyzing individual bars, ST-EP06 partitions recent price history into consecutive non-overlapping blocks. Each block spans a user-defined number of bars (the Trend Block Period input) and is reduced to a single representative value: the geometric mean of the block's highest high and lowest low, computed in logarithmic space.
This log-midpoint serves as the block's central tendency. Unlike a simple average of closing prices, it captures the structural center of the entire price range within the block, avoiding bias toward any single price point. The number of consecutive blocks compared is controlled by the Trend Block Groups input — more groups means deeper lookback and the ability to detect longer structural trends.
Price history is partitioned into consecutive non-overlapping blocks. Each block reduces to a single log-midpoint — the geometric mean of its highest high and lowest low. Connecting the midpoints forms the representative chain used for trend detection.
🔷 DIRECTION DETECTION + ICS ANGLE
Once blocks are constructed, the engine compares their geometric means in sequence, starting from the most recent. It identifies the longest consecutive segment where each block's central tendency moves in the same direction — either consistently rising or consistently falling. A single reversal terminates the segment.
The slope of this segment is then measured in ICS space: the logarithmic price difference between the oldest and newest blocks in the segment, divided by σ, divided by the number of bars between them. The arctangent of this normalized slope produces the ICS angle in degrees.
If the absolute angle falls within the Range Threshold (a user-configurable dead zone in degrees), the direction is classified as ranging rather than trending. This threshold acts as a sensitivity filter — wider values require steeper moves before declaring a trend, narrower values respond to subtler directional shifts.
An ICS angle of 45° indicates approximately one σ of price movement per bar. An angle near 0° suggests the market may be structurally flat. Because σ adjusts for volatility and the logarithm adjusts for price level, these angles are intended to be directly comparable across any instrument and any timeframe.
🔷 CHANNEL FITTING
Within the identified trending segment, the engine locates four price extremes: the highest high, the lowest high, the highest low, and the lowest low — each paired with its bar position. These four points define two linear boundaries in ICS space.
During an uptrend, the upper boundary is fitted through the lowest high and highest high (capturing the rising ceiling), while the lower boundary is fitted through the lowest low and highest low (capturing the rising floor). During a downtrend, the fitting order reverses to capture descending structure. During a ranging market, the channel uses horizontal boundaries at the segment's absolute high and low.
All boundary computations occur in the σ-normalized logarithmic coordinate system, meaning the channel lines represent geometric (log-linear) paths in price space — curves that naturally follow multiplicative price behavior rather than additive assumptions.
Within the trending segment, four extremes — HH, LH, HL, LL — define two log-linear boundaries. In an uptrend, the upper line fits through LH and HH, the lower through LL and HL. The direction reverses the fitting order for downtrends, and a ranging market uses horizontal boundaries.
🔷 6-SCALE PARALLEL ANALYSIS
A single temporal scale may capture the trend at one resolution but miss structure at others. ST-EP06 runs the complete pipeline — volatility normalization, block construction, direction detection, ICS angle, and channel fitting — independently at six different scales: 3, 7, 13, 19, 29, and 47 bars per block. These values were chosen as prime numbers to minimize harmonic overlap between scales.
Scale 19 serves as the primary engine and maps to the user's Trend Block Period input. The other five scales use fixed periods, providing a structural context that the primary engine alone cannot offer.
The dashboard displays each scale's independent trend direction. A consensus count shows how many of the six scales agree: 5/6 or 6/6 agreement suggests a structural trend that is visible across multiple temporal resolutions, while low agreement may indicate transitional or conflicting structure.
🔷 BREAKOUT / RETEST STATE MACHINE
ST-EP06 includes a 5-state finite automaton that tracks price's structural relationship to the primary channel boundaries:
Inside — price is observed between the channel floor and ceiling. The dashboard shows the position as a percentage: distance from floor and distance to ceiling (summing to 100%).
Breakout Up / Breakout Down — price has exited above the ceiling or below the floor. The dashboard shows the breakout price and the percentage of channel width that price has moved beyond the boundary.
Retest Up / Retest Down — after a breakout, price has moved at least one σ away from the boundary (establishing distance), then returned to test it. The dashboard shows both the original breakout price and the current retest level.
Transitions between states use dynamic σ-based thresholds rather than fixed percentages, meaning the sensitivity automatically adjusts with market volatility. Additional flags track:
✓ Confirmed — a breakout that has been retested and bounced at least one σ away from the boundary.
(gap) — price crossed the entire channel width in a single transition.
Failed breakout — price re-entered the channel after initially breaking out.
Direction reset — the primary trend direction changed, wiping all breakout state.
🔷 VISUAL TOOLS
All chart-overlay elements are drawn from the primary engine (scale 19):
Channel lines — solid upper and lower boundaries from the segment start to the anchor bar, colored by trend direction (configurable up/down/range colors, width, and line style).
Projection lines — dotted forward extension of the channel slopes beyond the anchor bar, providing a visual reference for potential future support and resistance. The projection offset, width, and style are independently configurable.
Channel fill — semi-transparent shading between channel boundaries, with independent color selection and adjustable transparency. Applies to both the solid channel and projection segments.
Diamond markers (◆) — placed at the channel endpoints on the anchor bar. Hovering reveals a tooltip with the anchored close price, ceiling level, floor level, and the price's position as a percentage of channel width.
Direction label — positioned at the midpoint between segment start and projection end. Displays the trend arrow, direction text, and ICS angle (e.g., "▲ UP +7.3°"). Tooltip includes block count.
🔷 DASHBOARD
A compact information table appears at the top-right corner of the chart, organized in 5 rows:
Header — indicator name, ticker symbol, timeframe, and live price (always live under the Live Exception protocol, even in Close Bar mode).
Period — the six scale values (3, 7, 13, user's period, 29, 47) displayed across columns. The primary engine column is highlighted.
Trend — per-scale trend direction with directional arrows (▲ UP, ▼ DN, ◈ RNG) and color coding.
Agreement — consensus count (e.g., "5/6 UP") with the primary channel ceiling (▲) and floor (▼) price levels.
Narrative — a single merged row presenting the breakout/retest state machine output as a human-readable sentence with distance measurements. This row updates dynamically as price interacts with the channel.
All dashboard text, tooltips, and narrative phrases are fully localized.
🔷 ALERT CONDITIONS
ST-EP06 provides 19 alert conditions organized in 5 categories, all gated by a master Enable Alerts toggle:
D · Direction (3 alerts) — fires when the primary engine trend changes to uptrend, downtrend, or range.
B · Breakout (4 alerts) — fires on initial breakout above ceiling or below floor, and separately on confirmed breakout (retested and bounced).
R · Retest (2 alerts) — fires when price returns to test the boundary after establishing distance.
S · Structural (5 alerts) — fires on gap-through events (price crosses entire channel), failed breakouts (price re-enters channel), and direction resets (trend change wipes state).
A · Agreement (5 alerts) — fires when cross-scale consensus reaches significant thresholds: full bullish (6/6), strong bullish (5/6), full bearish (6/6), strong bearish (5/6), or range consensus (≥4/6).
Important: alerts require Calculation Bar = Live Bar. In Close Bar mode, all alert conditions are automatically suppressed and a visual warning is displayed on the chart — because Close Bar mode intentionally lags by one bar, which is semantically incompatible with live alert delivery.
🔷 LANGUAGE SUPPORT
The dashboard, all tooltips, the breakout/retest narrative, and the alert warning label are available in 7 languages:
English · Türkçe · العربية · Русский · Italiano · Português (BR) · 中文
Select the preferred language from the Language dropdown in the Display settings group. All structural and numerical outputs remain unchanged — only the display language of text elements is affected.
🔷 HOW TO USE
Apply ST-EP06 to any chart — the indicator is designed to work across instruments (equities, forex, crypto, commodities, indices) and timeframes without parameter re-optimization, because the ICS framework normalizes for volatility and price level automatically.
Start with the default settings (Period 26, Groups 5, Sigma Length 20) and observe how the channel captures the dominant structural trend. The 6-scale consensus in the dashboard may help assess whether the observed trend is isolated to one temporal resolution or confirmed across multiple scales.
The Calculation Bar setting is a structural decision: use Live Bar for real-time monitoring and alert-driven workflows; use Close Bar for analysis and back-testing where historical stability is prioritized.
The ICS angle on the direction label provides a quantitative measure of trend intensity. Comparing angles across different instruments or timeframes is one of the intended use cases of the ICS framework — a 15° angle on one chart and a 15° angle on another may suggest similar structural momentum relative to each market's own volatility.
The breakout/retest narrative in the dashboard bottom row is designed to provide context-rich status updates without requiring manual chart reading. The σ-based thresholds ensure that breakout sensitivity adapts to current market conditions rather than relying on fixed values.
🔷 SETTINGS
Calculation — Calculation Bar (Live/Close Bar anchoring), Trend Block Period (bars per block), Trend Block Groups (consecutive blocks compared), Range Threshold (ICS dead zone in degrees), Yang-Zhang Sigma Length (volatility lookback).
Channel Lines — Up Color, Down Color, Range Color, Line Width, Line Style.
Projection Lines — Projection Offset (forward bars), Projection Width, Projection Style.
Display — Language (7 options), Show Channel (toggle overlay), Show Fill (toggle shading), Show Dashboard (toggle table), Dashboard Font Size.
Channel Fill — Fill Up Color, Fill Down Color, Fill Range Color, Fill Transparency.
Alerts — Enable Alerts (master toggle, requires Live Bar mode).
🔷 DISCLAIMER
ST-EP06 is an educational and analytical tool. It is designed to provide structural context through σ-normalized trend channels and multi-scale analysis. It does not generate buy or sell signals, does not predict future price movement, and is not intended as financial advice. Historical patterns observed through this indicator do not guarantee future outcomes. All trading decisions remain the sole responsibility of the trader.
Indicator

Alpha Signal Engine [MarkitTick]💡 The Alpha Signal Engine is an advanced, multi-dimensional trend-following system designed to provide traders with highly filtered, high-probability market signals. At its core, it dynamically calculates a volatility-adjusted trailing band to determine the primary market direction. However, unlike traditional trend indicators that rely on a single data point, this engine passes every potential trend reversal through a rigorous, six-layer filtering mechanism. By requiring confluence across higher timeframe trends, momentum, volume, volatility regimes, and price action strength, it drastically reduces the noise and false signals inherent in choppy markets. It also features a built-in heads-up dashboard and fully formatted JSON webhook capabilities for automated trading integration.
✨ Originality and Utility
● A Dynamic, Adaptive Baseline
Standard trailing stop or trend indicators, such as the classic Supertrend, typically use a static multiplier against the Average True Range (ATR). The Alpha Signal Engine innovates by introducing a "Dynamic Factor." This factor continuously adapts the band's distance from price by factoring in the current baseline multiplier, the relative volatility (ATR normalized by price), and the immediate price change momentum. This allows the bands to tighten during periods of strong, directional momentum and widen during erratic volatility, providing a more responsive and intelligent trailing mechanism.
● The Six-Pillar Filtering Gateway
The true utility of this indicator lies in its modular filtering engine. Traders often have to clutter their charts with half a dozen indicators to confirm a setup. This script centralizes that logic. Users can selectively enable or disable filters based on their specific asset and trading style, turning the indicator into a customizable algorithmic engine. Whether you need volume confirmation, ADX trend strength, or simple RSI momentum, the script handles the complex boolean logic internally and only outputs a signal when your precise market conditions are met.
🔬 Methodology and Concepts
● Dynamic Factor Calculation
The indicator establishes its baseline trend using an upper and lower band. The distance of these bands from the median price is dictated by a dynamically calculated factor. This factor is the sum of a base value, a volatility component (ATR divided by Close, scaled by a user weight), and a price movement component (percentage change of the close, scaled by a user weight). This raw factor is then smoothed using a Simple Moving Average (SMA) to prevent erratic band shifts.
● Trend Determination
The trend direction flips when the closing price crosses the active dynamic band. If the price closes above the upper band, the trend shifts bullish, and the lower band becomes the active support. Conversely, closing below the lower band shifts the trend bearish, making the upper band the active resistance.
● The Filter Matrix
A signal is only generated when a trend flip aligns with all activated filters:
HTF Alignment: Uses the request context to pull the trend direction from a higher timeframe, ensuring you are not trading against the macro trend.
ADX Trending: Measures the Average Directional Index to ensure the market is in an active trending phase (above a defined threshold) rather than a sideways chop.
Volume Surge: Compares current volume against a Volume SMA. The current bar must exhibit a volume spike greater than the defined multiplier to confirm institutional participation.
RSI Momentum: A simple but effective gatekeeper requiring the Relative Strength Index to be above 50 for longs and below 50 for shorts.
ATR Volatility Regime: Compares the current ATR against a 50-period SMA of the ATR. It ensures the market is operating within a "normal" volatility ratio, preventing entries during extreme, unpredictable volatility spikes or dead, illiquid periods.
Candle Body Strength: Calculates the absolute size of the candle body (Open to Close) and mandates it must be larger than a specific fraction of the ATR, ensuring the signal candle has true directional conviction.
🎨 Visual Guide
● Chart Elements
Up Trend Line: Displayed as a solid, teal-colored line trailing below the price action during a bullish phase. It acts as dynamic support.
Down Trend Line: Displayed as a solid, bright pink/red line trailing above the price action during a bearish phase. It acts as dynamic resistance.
Trend Cloud (Fill): A colored gradient fill exists between the median price and the active trend line. A teal cloud visually represents bullish dominance, while a pink/red cloud represents bearish dominance.
Buy Signals: Indicated by small, teal "B" labels positioned below the signal candle.
Sell Signals: Indicated by small, pink/red "S" labels positioned above the signal candle.
● Filter Dashboard
Located in the top right corner of the chart, this HUD (Heads-Up Display) provides a real-time status check of your system.
The left column lists the available filters (HTF Align, ADX Trend, Vol Surge, RSI Gate, ATR Regime, Body Str).
The right column displays the current status of each filter.
A gray "OFF" indicator means the user has disabled the filter in the settings.
A green "ON" or "Aligned" text indicates the condition is currently met.
A red "Opposed" or unlit indicator means the condition is active but currently failing to meet the required criteria.
The bottom rows clearly state the current overarching trend direction and whether a signal is pending or waiting.
📖 How to Use
• Interpreting the System
To effectively use the Alpha Signal Engine, begin by observing the main trend lines and the color of the cloud. This provides your baseline bias. Do not take trades purely on the band flipping. Instead, rely on the explicit "B" and "S" labels.
• Signal Execution
When a "B" (Buy) or "S" (Sell) label appears, it means the price has successfully flipped the trend AND all user-activated filters in the dashboard are glowing green. This is your entry trigger. The active trend line (the teal line for longs, the pink line for shorts) serves as an ideal, dynamic stop-loss placement.
• Customizing the Engine
The system is designed to be tuned. If you are trading a highly liquid asset like major forex pairs, you may want to enable the ADX and HTF filters to catch long, sustained moves. If you are trading volatile crypto assets, enabling the Volume Surge and Candle Body filters can help you avoid fake-outs and trap wicks. Monitor the on-chart dashboard to see which filters are keeping you out of bad trades and adjust your settings accordingly.
⚙️ Inputs and Settings
• Supertrend Settings
ATR Length: The lookback period for calculating the Average True Range.
Base Factor: The starting multiplier for the dynamic bands.
Volatility & Price Change Weights: Determines how aggressively the bands react to sudden spikes in relative volatility and price momentum.
Factor Smoothing: Applies an SMA to the final dynamic multiplier to keep the bands stable.
• Filter Settings
Enable HTF Alignment: Toggle and define the higher timeframe (e.g., Daily) to align with.
ADX Settings: Toggle the filter, define the lookback length, and set the minimum trend strength threshold (default is 20).
Volume Settings: Toggle the filter, define the Volume MA length, and set the multiplier required to classify as a "surge."
RSI Settings: Toggle the filter and set the RSI lookback length.
ATR Regime Settings: Define the minimum and maximum acceptable ratios of current ATR versus historical ATR.
Candle Body Settings: Define the minimum required size of the candle body as a fraction of the current ATR.
• Webhook Action Names
These text inputs allow you to define specific payload strings (e.g., "long", "closeshort") that the indicator will output via JSON alerts, perfectly formatting the data for third-party automation services like 3Commas or PineConnector.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The Alpha Signal Engine is grounded in several well-documented tenets of quantitative financial analysis and statistical market theory.
● Volatility-Adjusted Trailing Stops
The foundation of the indicator relies on the Average True Range (ATR), introduced by J. Welles Wilder Jr. The ATR is a measure of the degree of price volatility. By tying the trailing stop (the dynamic band) to the ATR, the system acknowledges the statistical reality of market variance. The innovation here is the dynamic multiplier. By adjusting the distance based on the normalized rate of change (momentum), the script attempts to solve the lagging nature of fixed-multiplier trailing stops, utilizing principles found in adaptive moving averages (like Kaufman's AMA), where sensitivity increases alongside directional conviction.
● Multi-Dimensional Confluence Theory
The filtering engine operates on the academic principle of conditional probability and confluence. In market microstructure, no single indicator holds a permanent statistical edge.
The HTF filter is rooted in Dow Theory, prioritizing the primary trend over secondary reactions.
The ADX filter utilizes Wilder's Directional Movement Index to mathematically separate trending environments from mean-reverting environments, applying a statistical threshold to directional strength.
The Volume Surge filter relies on the Volume Price Trend concepts, positing that significant price movements must be sponsored by outsized volume to validate institutional participation and avoid anomalous low-liquidity spikes.
The ATR Regime filter applies mean-reverting principles to volatility itself (volatility clustering), ensuring that entries are only taken when the variance of the asset is within historically "normal" parameters, avoiding the fat tails of extreme market shocks.
By chaining these disparate mathematical models (trend, momentum, volume, volatility) via Boolean logic, the system mathematically reduces the frequency of trades while theoretically increasing the probability of the remaining sample size.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Breakout Trend Bar AlertsEvery trend has a starting point. It's rarely a gradual drift — it's one massive, decisive candle that breaks the market out of consolidation and kicks off a sustained move. Breakout Bar Alerts is built to catch that exact moment.
The indicator monitors price action in real time and identifies when a bar forms that dwarfs everything around it — the largest high-to-low range of any candle in the last 250 bars. These are the bars where conviction enters the market, weak hands get flushed, and a new trend begins. When one appears, you get an instant alert so you're never late to the move.
Why these bars matter:
Big range bars represent a sudden surge of momentum and volume-backed commitment from one side of the market. Bulls or bears have taken control decisively. What follows is often the beginning of a trend leg — not a random spike.
Built to filter out the noise:
The opening bar of every session is excluded entirely. That first chaotic candle never skews your data or triggers a false signal.
Only bars within your active session window are counted. Off-hours price action is completely ignored, so your benchmark is always built from real, tradeable market conditions.
Three alert conditions — Bull Breakout Bar, Bear Breakout Bar, or Both — so you only get notified for the setups you actually trade.
Inputs:
Lookback Period — how many bars back to measure the largest range (default: 250)
Enable Time Filter — restricts detection and calculations to your active trading session
Active Session — define your session window in exchange time
Bull / Bear colors — fully customizable
Best used on intraday timeframes (1m – 15m) on futures, forex, or high-volume equities. When this fires, pay attention — the trend may already be starting. Indicator

Indicator

Sentiment SquareThe Sentiment Square is a multi-timeframe (MTF) and multi-length volume analysis tool designed for PulseWire. It provides a top-down visualization of market conviction by calculating the ratio of bullish volume to total volume across 16 different data points simultaneously.
1.Core Logic: How it Works
The indicator calculates a Bullish Volume Ratio (BVR) for every square in the grid.
BVR = sum ( Volume of Up Candles)/ sum(Total Volume) X 100
Up Candle: Any candle where Close > Open .
Total Volume: The sum of all volume within the lookback window.
Each percentage represents the "Share of Power" held by buyers. For example, a value of 70% means bulls provided 70% of the volume, while bears provided the remaining 30%.
2. Visual Interface
The indicator uses a Transposed Matrix layout to match standard top-down trading analysis:
X-Axis: Timeframes : Moves from your lowest selected timeframe (Left) to your highest (Right).
Y-Axis: Lookback Windows: Moves from short-term momentum (Top) to long-term structure (Bottom).
Color Definitions
Green (Bullish): The percentage is above your Neutral Max (default 55%). Brighter green indicates extreme conviction (>70%).
Red (Bearish): The percentage is below your Neutral Min (default 45%). Brighter red indicates extreme selling (<30%).
Gray (Neutral): The percentage falls between 45% and 55%. This indicates a "tug-of-war" or sideways consolidation where neither side has a decisive majority.
Input Settings
Timeframes Window: Select four different intervals (e.g., 15m, 1h, 4h, 1D).
Speed Window: Set four different lookback lengths (e.g., 20, 50, 100, 200 bars).
Neutral Zone: Adjust the sensitivity of the Gray boxes. A wider range (e.g., 40%–60%) filter out more noise but responds slower to new trends.
How to Interpret the Data
Vertical Alignment (Columns): If a whole column is Green, that specific timeframe is bullish across all horizons (from fast momentum to slow structure).
Horizontal Alignment (Rows): If a whole row is Green, it means that specific "window length" is showing buying pressure across all timeframes.
The "Waiting Time" Signal: When a box is Gray, the volume is balanced. Traders typically wait for the percentage to move out of the 45%–55% range before confirming an entry.
Trend Resilience: If the 15M (tactical) squares turn Red while the 1D (structural) squares remain Green, the market is likely undergoing a healthy pullback rather than a total reversal.
Technical Limitations
Data Lag: Higher timeframe squares (like 1D or 4H) only update when their respective candles close.
Volume Requirement: This indicator requires volume data. It is most effective on Centralized Exchanges (Stocks, Crypto, Futures). On Forex, it uses "Tick Volume," which serves as a proxy for activity.
Common Trade Setup Examples
By observing the transition of colors and percentages across the matrix, you can identify high-probability market conditions.
1.The Trend Continuation (The "Dip-Buy")
Condition: The right-most columns (4H and 1D) and the bottom rows (100 and 200) are solid Green.
Setup: The top-left squares (15M / 20 Window) flip to Red or Gray.
Trigger: Wait for the 15M / 20 square to flip back to Green (above 55%).
Logic: The macro structure is bullish; the red squares indicate a temporary pullback that has now found buyers.
2. The Volatility Squeeze (The "Wait for Breakout")
Condition: A cluster of Gray squares (45%–55%) appears in the middle of the matrix.
Logic: Volume is perfectly balanced between buyers and sellers. This often precedes a massive "expansion" move.
Strategy: Avoid entering while the cluster is Gray. Wait for the majority of the cluster to flip to either solid Green or solid Red.
3. The Top/Bottom Exhaustion
Condition: All 16 squares are Vibrant Green (above 70%) or Vibrant Red (below 30%).
Logic: The market is "over-extended." While the trend is strong, the probability of a reversal increases because there are few buyers/sellers left to push the price further.
Strategy: Tighten stop-losses or look for "Divergence" where the price makes a new high but the percentages in the 20-window start dropping toward 60%.
Summary of the "Wait Time" Metric
The closer a number is to 50%, the more "waiting time" is required. As the numbers move toward 0% or 100%, the market conviction is increasing, and the "actionable" window is opening.
Additional Information:
1. Core Logic
The Sentiment Square calculates the Bullish Volume Ratio (BVR) across 16 data points. It measures "Share of Power" by dividing the volume of "Up Candles" (where Close > Open) by the total volume within a lookback window.
2. Visual Grid Layout
X-Axis (Timeframes): Displays user-selected intervals from lowest (Left) to highest (Right).
Y-Axis (Lookback Windows): Displays "Speeds" from short-term momentum (Top) to long-term structural sentiment (Bottom).
3. Color Definitions
Green (>55%): Bullish conviction. Bright green (>70%) signals extreme strength.
Red (<45%): Bearish conviction. Bright red (<30%) signals extreme selling.
Gray (45%–55%): Neutral "Waiting Time." Indicates volume balance or consolidation.
4. Common Trade Setups
The Dip-Buy: Occurs when macro columns (Right) are Green but tactical squares (Top-Left) temporarily turn Red/Gray. Entry is triggered when tactical squares flip back to Green.
Volatility Squeeze: Identified by a cluster of Gray squares. Traders wait for a majority of the cluster to flip to a solid color before entering.
Exhaustion: When all 16 squares reach extreme vibrant colors, the market is over-extended, increasing the probability of a reversal.
Indicator

Smart SafeZone Stops [MarkitTick]💡 This script represents a sophisticated evolution of volatility-based trailing stop methodologies. It is designed to assist traders in managing trend-following positions by dynamically adjusting stop-loss levels based on market noise, directional momentum, and volume flows. Unlike static trailing stops that move by a fixed percentage or simple ATR multiples, this tool calculates the "safe zone" by analyzing how far price has penetrated against the trend over a specific lookback period, offering a granular approach to risk management that adapts to changing market conditions.
✨ Originality and Utility
The primary utility of this indicator lies in its ability to filter out market noise while remaining tight enough to protect profits during strong trends. While the classic SafeZone concept (popularized by Dr. Alexander Elder) is effective, this script introduces several modern enhancements that increase its robustness:
● Dynamic ADX Integration Standard SafeZone stops use a fixed multiplier. This script integrates the Average Directional Index (ADX) to gauge trend strength. When the trend is strong, the stop tightens (Aggressive Multiplier) to lock in profits rapidly. When the trend is weak or choppy, the stop widens (Conservative Multiplier) to prevent premature shakeouts. ● Volume-Weighted Noise Price movement on low volume is often considered "noise," while high-volume movement signifies conviction. This script optionally weights the noise calculation by Relative Volume. A downward spike on low volume will affect the stop level less than a downward spike on high volume.
● 3-Day Smoothing Mechanism To prevent the stop line from becoming too jagged or reacting to single-bar anomalies, the script applies a 3-day smoothing algorithm. It utilizes the "worst-case" scenario of the last three calculated stop levels, ensuring the stop only moves when the trend structure genuinely shifts.
🔬 Methodology and Concepts
The underlying logic operates on a "Ratchet" mechanism, meaning the stop line can only move in the direction of the trade (up for longs, down for shorts) and never retraces until a trend reversal occurs.
● Directional Noise Calculation The script separates market noise into two components: Downside Penetration (for Longs): The distance the price dips below the previous bar's low. Upside Penetration (for Shorts): The distance the price spikes above the previous bar's high. The average of these penetrations is calculated over the Noise Lookback Period .
● The SafeZone Formula The raw stop level is derived as follows: Long Stop = Previous Low - (Average Downside Noise × Multiplier) Short Stop = Previous High + (Average Upside Noise × Multiplier)
● Adaptive Multiplier Logic If Dynamic ADX is enabled: If ADX > Strong Threshold: Use Aggressive Multiplier (e.g., 1.5x). If ADX < Weak Threshold: Use Conservative Multiplier (e.g., 3.5x). Otherwise: Use the Base Safety Coefficient.
● Exhaustion Detection The script calculates the distance between the current Close price and the Active Stop. If this distance exceeds a specific multiple of the ATR (Average True Range), it flags a "Mean Reversion" or "Exhaustion" warning, suggesting price has extended too far from equilibrium.
🎨 Visual Guide
The indicator plots distinct visual elements to guide decision-making without cluttering the chart excessively.
● Trailing Stop Lines Green Line (Solid): Represents the SafeZone Long Stop. This line appears below price during an uptrend. As long as price closes above this line, the bullish bias is intact. Red Line (Solid): Represents the SafeZone Short Stop. This line appears above price during a downtrend. A close above this line signals a potential short exit or reversal.
● Trend Signals Green Triangle (Below Bar): Marks the "Bull Start." This occurs when the price crosses above the Trend Filter EMA and the trend logic flips to bullish. Red Triangle (Above Bar): Marks the "Bear Start." Indicates the start of a downtrend sequence.
● Exhaustion Warnings Yellow Labels (⚠️): These appear when price has extended significantly away from the stop line (based on the ATR Exhaustion Multiplier). This is not an immediate sell signal but a warning that the trend may be overextended and a pullback is probable.
● MTF Consensus Cloud Background Color: If enabled, the chart background changes color to reflect the Higher Timeframe (HTF) trend. Green Background: Current trend matches HTF Uptrend. Red Background: Current trend matches HTF Downtrend. Gray Background: Trends are mismatched (Consolidation/Conflict).
● Quantitative Dashboard A table located in the top-right corner displays real-time statistics: Trend: Current state (BULLISH/BEARISH). Age: Number of bars since the trend began. Stop Price: Exact price level of the trailing stop. Risk %: The percentage distance from the current Close to the Stop. If this exceeds 3%, the text turns red to highlight elevated risk. Active Mult: The current multiplier being used (Dynamic or Fixed). ADX State: Shows if the trend is Strong, Weak, or Normal.
📖 How to Use
1. Entry Timing Wait for a Trend Switch signal (Triangle). For a long entry (Green Triangle), ensure the price is above the Trend Baseline (EMA). Ideally, look for confluence with the MTF Cloud (Green Background).
2. Position Management Once in a trade, use the Trailing Stop Line as your hard exit or invalidation point. Do not manually move the stop away from price; the script automatically "ratchets" the stop tighter as the trend progresses.
3. Taking Profits Use the "Exhaustion Warnings" (⚠️) as opportunities to scale out of positions. When price moves parabolically away from the stop line, the probability of a snap-back increases.
4. Managing Chop If the dashboard shows "ADX State: WEAK," expect the stop line to remain wider. This allows the asset "room to breathe" without stopping you out on random volatility.
⚙️ Inputs and Settings
The script is highly customizable to fit different asset classes (Crypto, Forex, Stocks).
● Trend Definitions Trend Filter (EMA Length): Determines the baseline trend bias (Default: 22). Price must be above this EMA to initiate a long calculation.
● Noise Calculation Noise Lookback Period: The number of bars used to calculate average penetration (Default: 10). Base Safety Coefficient: The standard multiplier applied to the noise average (Default: 2.5). Higher values = wider stops. Use Volume Weighting: Enables the volume-adjustment logic. Use 3-Day Smoothing: Recommended keeping this TRUE to avoid stop-hunts.
● Dynamic Multiplier (ADX) Enable Dynamic ADX: Toggles the adaptive multiplier. Strong/Weak Thresholds: The ADX levels that trigger aggressive or conservative multipliers.
● Multi-Timeframe Consensus Higher Timeframe: Select the TF for the cloud background (e.g., Daily or Weekly).
● Exhaustion Warning ATR Multiplier: Defines how far price must be from the stop to trigger a warning (Default: 3.0).
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The "Smart SafeZone" indicator is grounded in the statistical analysis of market noise versus signal.
● Theory of Noise Penetration Conventional stops often use Standard Deviation (Bollinger Bands) or Average True Range (Keltner Channels/Chandelier Stops). While effective, these measures assume volatility is symmetrical. This script adopts the view that directional volatility matters more. In an uptrend, upside volatility is "good" signal, while downside volatility is "noise." By explicitly calculating the average downside penetration (Low - Low), the script isolates the specific counter-trend force acting on the asset. ● Volume-Weighted Price Analysis (VWPA) The inclusion of volume weighting draws upon Dow Theory principles, which state that volume must confirm the trend. Math: Penetration × (Volume / AverageVolume) This formula asserts that a price drop on low volume is statistically less significant than a drop on high volume. By dampening the impact of low-volume moves, the stop becomes more resistant to liquidity vacuums and algorithmic stop-hunts.
● Trend Efficiency (ADX) The integration of J. Welles Wilder’s ADX (Average Directional Index) adds a dimension of Trend Efficiency. High ADX values indicate a highly efficient trend with little retracement. Mathematically, this justifies a lower standard deviation (or noise multiplier) for the stop, as the probability of a deep retracement without a trend change is lower in high-momentum environments.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Trend Harmony🚀 Trend Harmony: Multi-Timeframe Momentum & Trend Dashboard
Trend Harmony is a sophisticated multi-timeframe (MTF) analysis tool designed to help traders identify high-probability setups by spotting "Market Harmony." Instead of flipping through charts, this indicator synthesizes RSI momentum and EMA trend structures from four different time horizons into a single, intuitive dashboard.
🔍 How It Works
The core philosophy of this indicator is that the most powerful moves happen when short-term momentum aligns with long-term trend structure. The script tracks four user-defined timeframes simultaneously.
1. The Trend Scoring Engine
The indicator evaluates the relationship between a Fast EMA (default 20) and a Slow EMA (default 50) across all active timeframes.
Bullish Alignment: Fast EMA > Slow EMA.
Bearish Alignment: Fast EMA < Slow EMA.
2. The Harmony Summary
At the bottom of the dashboard, the "Summary" status calculates the total "Harmony" of the market:
🚀 FULL BULL HARMONY: All selected timeframes are in a bullish trend.
📉 FULL BEAR HARMONY: All selected timeframes are in a bearish trend.
⚠️ CAUTION (Overbought/Oversold): Triggered when the market is in "Full Harmony" but RSI levels suggest the price is overextended (>70 or <30). This warns you not to "chase" the trade.
Neutral/Mixed: Timeframes are in conflict (e.g., 15m is bullish but Daily is bearish).
🛠 Key Features
Unified RSI Pane: View four RSI lines on one chart to spot divergences or "clusters" where all timeframes bottom out at once.
Dynamic Table: Real-time tracking of:
Price vs EMA: Instant visual (▲/▼) showing if price is above/below your key averages.
Smart RSI Coloring: RSI values turn Green during "Power Zones" (0–30 or 50–70) and Red otherwise.
Full Customization: Change timeframes (1m, 5m, 1H, D, etc.), EMA lengths, and RSI parameters to fit your strategy.
📈 Trading Strategy Tips
Wait for the Sync: The "Full Harmony" status is your signal that the "tide" is moving in one direction. Look for long entries when the status is Green and short entries when it is Red.
The Pullback Entry: When the summary says "Caution (Overbought)," wait for the RSI lines to cool down toward the 50 level before entering the trend again.
RSI Clustering: When all four RSI lines converge at extreme levels (30 or 70), a massive volatility expansion is usually imminent. Indicator

Trend Stress Quant [MarkitTick]💡This indicator combines a liquidity-based stress model with a dynamic linear regression channel to identify potential market exhaustion points and assess trend quality. By merging volume impact analysis with statistical deviation, this tool aims to highlight moments where price action may be overextended relative to the underlying liquidity conditions.
● Originality and Utility
Standard volatility indicators often rely solely on price range (like Bollinger Bands). This script introduces a Stress Engine that normalizes the relationship between Price Range (True Range) and Volume. This helps distinguish between healthy price movements and liquidity-stress events (illiquidity). Furthermore, instead of using a fixed-length channel, this tool offers a Dynamic Mode that anchors the regression channel to recent pivot points, ensuring the statistical analysis aligns with the current market structure rather than an arbitrary timeframe.
● Methodology
The script operates on two distinct mathematical models:
• Illiquidity Stress Engine
The core formula calculates a raw illiquidity metric based on the log-normal distribution of the ratio between True Range and Volume. A Z-Score (standard score) is then derived from this data over a specific lookback period. High Z-Scores indicate that price is moving disproportionately fast relative to the available volume, often a signature of panic selling or euphoric buying (exhaustion).
• Linear Regression Channel
The script calculates an Ordinary Least Squares (OLS) regression line (the line of best fit) to determine the mean price trend.
Standard Deviation Bands are plotted parallel to this mean.
Pearson Correlation Coefficient (R) is calculated to quantify the strength of the linear trend. Values closer to 1 or -1 indicate a strong trend, while values near 0 indicate a chaotic or ranging market.
📑 How to Use
Traders can utilize the visual outputs for mean reversion or trend continuation context:
• Exhaustion Signals (SE / BE Labels)
SE (Seller Exhaustion): Appears when the market is in a downtrend, but the Stress Engine detects a statistical anomaly (High Z-Score) on a down candle. This suggests panic selling may be peaking.
BE (Buyer Exhaustion): Appears when the market is in an uptrend, but the Stress Engine detects high stress on an up candle, suggesting a potential blow-off top.
• Regression Channel
The dashed middle line represents the fair value (mean) of the current trend.
The outer bands represent statistical extremes. Price interacting with the outer bands (default 2 Standard Deviations) while coincident with an Exhaustion Signal provides a high-confluence area of interest.
• Metrics Dashboard
A dashboard displays the current Trend Regime, Exhaustion Status, and Channel Width (volatility percentage).
● Settings
• Exhaustion Model
Trend Filter Length: Sets the baseline EMA to determine if the market is bullish or bearish.
Stress Threshold (Sigma): The Z-Score required to trigger an exhaustion signal (default is 2.0).
• Channel Configuration
Dynamic Pivot Mode: If enabled, automatically calculates the channel length based on recent pivots. If disabled, uses the Fixed Length.
Standard Deviations: Controls the width of the inner and outer channel bands.
📖This guide explains how to interpret and utilize signals for trading:
The script is designed primarily for Mean Reversion and Exhaustion trading strategies.
● The Core Strategy: Volatility Exhaustion
The script uses a "Stress Engine" to identify when price movement is statistically overextended relative to the available liquidity (Volume).
• Setup A: The "Seller Exhaustion" (Bullish Bounce)
Look for this setup during a downtrend to catch a temporary bottom or a reversal.
Trend Condition: The dashboard shows Bearish (Price is below the trend filter).
Trigger: The label SE (Seller Exhaustion) appears below a candle.
Why? This indicates that selling pressure was intense but likely panic-driven (High Z-Score/Stress) and may be drying up.
Confluence: Ideally, this signal appears when the price is touching or piercing the Lower Channel Band (dotted or solid lines).
Action: Traders often use this as a signal to close Short positions or enter a speculative Long (counter-trend) targeting the middle line.
• Setup B: The "Buyer Exhaustion" (Bearish Pullback)
Look for this setup during an uptrend to catch a local top.
Trend Condition: The dashboard shows Bullish .
Trigger: The label BE (Buyer Exhaustion) appears above a candle.
Why? This indicates euphoric buying on low liquidity or extreme volatility that is statistically unsustainable.
Confluence: Look for price rejection at the Upper Channel Band.
Action: Traders often use this to close Long positions or enter a Short targeting the mean.
● The Filter: Trend & Correlation
The script includes a Linear Regression Channel that quantifies the quality of the trend.
• Channel Slope
If the channel is angling steeply up or down, the trend is strong.
• Pearson R (Correlation)
The script calculates the Pearson R coefficient.
Weak Correlation: If the channel turns Gray/Neutral (or the fill becomes weak), it means the correlation is below the threshold (default 0.5).
Trading Rule: Avoid trading exhaustion signals when the channel is Gray/Neutral, as the market is likely chopping sideways with no clear direction.
● Risk Management & Targets
• Stop Loss
Since this is a volatility tool, a common technique is to place stops just outside the Outer Deviation Band (the widest line). If price expands beyond the outer band with no exhaustion signal, the trend may be entering a "runaway" phase.
• Take Profit
Target 1: The Middle Regression Line (The dashed center line). Prices tend to revert to this mean after an exhaustion event.
Target 2: The opposite channel band (e.g., if you bought at the bottom, hold until the top).
● Summary of Dashboard Metrics
The table on your chart provides a quick snapshot:
Trend Regime: Tells you if you should fundamentally look for Shorts (Bearish) or Longs (Bullish).
Seller/Buyer Status: Alerts you if the current bar is EXHAUSTED or Normal .
Channel Width %: Indicates volatility. If the width is very low (percentage is small), a breakout might be imminent (squeezing). If high, be careful of chop.
⚙️ Indicator settings
• Signal Parameters
Exhaustion & Stress Model: Controls signal sensitivity.
Trend Filter: Decides if the market is Bullish or Bearish.
Stress Threshold (Sigma): Higher values (e.g., 2.5) make the script stricter, showing fewer but potentially stronger signals.
• Channel Configuration
Dynamic Pivot Mode: If ON, the channel length auto-adjusts to recent market pivots. If OFF, it uses the Fixed Length you set.
Channel Bands: Adjusts the channel width.
Outer Deviation: The boundary for "extreme" moves. Price hitting this often signals a reversal.
• Quality Filter
Filter Weak Correlations: If enabled, the channel turns gray during choppy/sideways markets to warn you not to trust trend signals.
• Visuals
Display Options: Toggles the "Stats" dashboard and adjusts volatility coloring.
● Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Dynamic EMA Stack Support & ResistanceEvery trader needs reliable support and resistance — but static zones and lagging indicators won't cut it in fast-moving markets. This script combines a Fibonacci-based 5-EMA stacking system and left/right pivots that create dynamic support & resistance logic to uncover real-time structural shifts & momentum zones that actually adapt to price action. This isn’t just a mashup — it’s a complete built-from-the-ground-up support & resistance engine designed for scalpers, intraday traders, and trend followers alike.
🧠 🧠 🧠What It Does🧠 🧠 🧠
This script uses two powerful engines working in sync:
1️⃣ EMA Stack (5-EMA Framework)
Built on Fibonacci-based lengths: 5, 8, 13, 21, 34, (configurable) this stack identifies:
🔹 Bullish Stack: EMAs aligned from fastest to slowest (uptrend confirmation)
🔹 Bearish Stack: EMAs aligned inversely (downtrend confirmation)
🟡 Narrowing Zones: When EMAs compress within ATR thresholds → possible breakout or reversal zone
🎯 Labels identify key transitions like:
✅"Begin Bear Trend?"
✅"Uptrend SPRT"
✅"RES?" (resistance test)
2️⃣ Pivot-Based Projection Engine
Using classic Left/Right Bar pivot logic, the script:
📌 Detects early-stage swing highs/lows before full confirmation
📈 Projects horizontal S/R lines that adapt to market structure
🔁 Keeps lines active until a new pivot replaces them
🧩 Syncs beautifully with EMA stack for confluence zones
🎯🎯🎯Key Features for Traders🎯🎯🎯
✅ Trend Detection
→ EMA order reveals real-time bias (bullish, bearish, compression)
✅ Dynamic S/R Zones
→ Historical support/resistance levels auto-draw and extend
✅ Smart Labeling
→ “SPRT”, “RES”, and “Trend?” labels for live context + testing logic
✅ Custom Candle Coloring
→ Choose from Bar Color or Full Candle Overlay modes
✅ Scalper & Swing Compatible
→ Use fast confirmations for scalping or stack consistency for longer trends
⚙️⚙️⚙️How to Use⚙️⚙️⚙️
✅Use Top/Bottom (trend state) Line Colors to quickly read trend conditions.
✅Use Pivot-based support/resistance projections to anticipate where price might pause or reverse.
✅Watch for yellow/blue zones to prepare for volatility shifts/reversals.
✅Combine with volume or momentum indicators for added confirmation.
📐📐📐Customization Options📐📐📐
✅EMA lengths (5, 8, 13, 21, 34) — fully configurable - try 21,34,55, 89, 144 for longer term trend states
✅Left/Right bar pivot settings (default: 21/5)
✅Label size, visibility, and color themes
✅Toggle line and label visibility for clean layouts
✅“Max Bars Back” to control how deep history is scanned safely
🛠🛠🛠Built-In Safeguards🛠🛠🛠
✅ATR-based filters to stabilize compression logic
✅Guarded lookback (max_bars_back) to avoid runtime errors
✅Works on any asset, any timeframe
🏁🏁🏁Final Word🏁🏁🏁
This script is not just a visual tool, it’s a complete trend and structure framework. Whether you're looking for clean trend alignment, dynamic support/resistance, or early warning labels, this system is tuned to help you react with confidence — not hindsight.
Rembember, no single indicator should be used in isolation. For best results, combine it with price action analysis, higher-timeframe context, and complementary tools like trendlines, moving averages etc Use it as part of a well-rounded trading approach to confirm setups — not to define them alone.
💡💡💡Turn logic into clarity. Structure into trades. And uncertainty into confidence.💡💡💡 Indicator

Indicator

Indicator

Correlation Confluence Trend IndicatorCorrelation Confluence Trend Indicator
Overview
The Correlation Confluence Trend Indicator combines exponential moving averages (EMAs) and statistical correlation measures to identify high-confidence trend alignments between an asset and a benchmark. By filtering signals through correlation strength, this indicator highlights opportunities when the asset and benchmark move together. In other words, it defines a trend and then uses correlation strength and the trend of a second asset to identify high-confidence trends.
Key Features
Dual EMA Trend Analysis :
Calculates fast and slow EMAs for both the asset and the selected benchmark (e.g., SPY) to identify bullish and bearish trends.
Correlation Strength Filtering :
Evaluates correlation between the asset and benchmark, identifying stronger-than-average relationships based on the mean and standard deviation.
Background Color Coding :
- Green : Strong correlation, both asset and benchmark bullish.
- Aqua : Weak correlation, both asset and benchmark bullish.
- Red : Strong correlation, both asset and benchmark bearish.
- Fuchsia : Weak correlation, both asset and benchmark bearish.
- Orange : Strong correlation, benchmark bullish, asset bearish.
- Yellow : Weak correlation, benchmark bullish, asset bearish.
- Purple : Strong correlation, benchmark bearish, asset bullish.
- Lime : Weak correlation, benchmark bearish, asset bullish.
Visual Trend Indicators :
Plots fast and slow EMAs for the asset, dynamically colored based on aggregate trend signals. The color of this corresponds to the main trend signal.
Inputs
Benchmark Symbol : Symbol of the benchmark asset to compare against.
Fast EMA Length : Period for the fast EMA calculation.
Slow EMA Length : Period for the slow EMA calculation.
Correlation Length : Number of bars for correlation calculation.
Correlation Mean Length : Number of bars for mean and standard deviation calculation.
Std Dev Multiplier : Multiplier for standard deviation to define correlation strength. When the correlation is Std Dev Multiplier standard deviations above the mean, it counts as a strong correlation.
Set Background Color : Toggle background coloring on or off.
Notes
This indicator is primarily designed for trend-following strategies. By combining trend analysis and correlation filtering, it ensures that signals occur during aligned market conditions, reducing false signals.
Before incorporating this indicator into your trading strategy:
Always backtest on historical data to evaluate its performance before committing capital.
Use proper risk management to control position sizes and mitigate potential losses.
Remember that no indicator guarantees success. I'm quite proud of this one, but it's not the holy grail.
Indicator

Cross-Asset Correlation Trend IndicatorCross-Asset Correlation Trend Indicator
This indicator uses correlations between the charted asset and ten others to calculate an overall trend prediction. Each ticker is configurable, and by analyzing the trend of each asset, the indicator predicts an average trend for the main asset on the chart. The strength of each asset's trend is weighted by its correlation to the charted asset, resulting in a single average trend signal. This can be a rather robust and effective signal, though it is often slow.
Functionality Overview :
The Cross-Asset Correlation Trend Indicator calculates the average trend of a charted asset based on the correlation and trend of up to ten other assets. Each asset is assigned a trend signal using a simple EMA crossover method (two customizable EMAs). If the shorter EMA crosses above the longer one, the asset trend is marked as positive; if it crosses below, the trend is negative. Each trend is then weighted by the correlation coefficient between that asset’s closing price and the charted asset’s closing price. The final output is an average weighted trend signal, which combines each trend with its respective correlation weight.
Input Parameters :
EMA 1 Length : Sets the period of the shorter EMA used to determine trends.
EMA 2 Length : Sets the period of the longer EMA used to determine trends.
Correlation Length : Defines the lookback period used for calculating the correlation between the charted asset and each of the other selected assets.
Asset Tickers : Each of the ten tickers is configurable, allowing you to set specific assets to analyze correlations with the charted asset.
Show Trend Table : Toggle to show or hide a table with each asset’s weighted trend. The table displays green, red, or white text for each weighted trend, indicating positive, negative, or neutral trends, respectively.
Table Position : Choose the position of the trend table on the chart.
Recommended Use :
As always, it’s essential to backtest the indicator thoroughly on your chosen asset and timeframe to ensure it aligns with your strategy. Feel free to modify the input parameters as needed—while the defaults work well for me, they may need adjustment to better suit your assets, timeframes, and trading style.
As always, I wish you the best of luck and immense fortune as you develop your systems. May this indicator help you make well-informed, profitable decisions! Indicator

Indicator

Indicator

Indicator

Indicator
