Adaptive MAD Supertrend | GForgeAdaptive MAD Supertrend | GForge
The Adaptive MAD Supertrend is a trend-following indicator built on the classic Supertrend framework, but with two core innovations that address well-known weaknesses in the original design: how volatility is measured, and how the indicator behaves across different market conditions.
The Problem With Standard Supertrend
The classic Supertrend uses ATR (Average True Range) as its volatility measure and a fixed multiplier. ATR squares its deviation calculations internally, which means a single spike candle — a news wick, a liquidation cascade — can temporarily blow the bands wide and either trigger a false flip or delay a valid one. On top of that, a fixed multiplier means the indicator behaves identically in a clean trending market and a choppy ranging one. It has no awareness of what the market is actually doing.
Innovation 1 — MAD Replaces ATR
This indicator uses Mean Absolute Deviation as its volatility measure instead of ATR or Standard Deviation.
MAD = mean( |close − mean(close, n)| , n )
The key difference is linearity. Each bar contributes its deviation to the average equally, without squaring. A spike candle influences the band width, but proportionally — it cannot disproportionately dominate the calculation the way it can in ATR or StdDev. The result is a more stable, consistent band width that responds to genuine volatility without overreacting to outlier bars.
An optional EMA smoothing layer can be applied to the raw MAD output before it scales the bands, which further stabilizes band width during volatile periods.
Innovation 2 — Kaufman Efficiency Ratio Scales the Multiplier
The Efficiency Ratio (ER), developed by Perry Kaufman, measures how efficiently price is moving:
ER = |net price change over n bars| / sum(|bar-to-bar changes|, n)
ER → 1.0: price moved efficiently in one direction — a clean trend
ER → 0.0: price moved a lot but went nowhere — chop and noise
The adaptive multiplier uses ER to scale band width dynamically:
adaptive_multiplier = Multiplier_Chop − ER × (Multiplier_Chop − Multiplier_Trend)
During a clean trend, the multiplier contracts toward your Trend setting — bands tighten and the trailing stop follows price closely, capturing more of the move. During choppy conditions, the multiplier expands toward your Chop setting — bands widen and the stop absorbs noise without flipping unnecessarily.
This means the indicator automatically adjusts its sensitivity to what the market is doing, rather than applying the same fixed behaviour to every bar.
Basis MA
The band centre line (basis) is fully configurable. Rather than raw hl2 like the classic Supertrend, any moving average from the menu can serve as the anchor — the band is built outward from it. The default is T3, a Tillson triple-smoothed MA that provides an extremely clean centre line with minimal lag overshoot. Other useful options include DEMA and TEMA for faster response, VWMA for volume-weighted anchoring, or RMA for higher timeframes.
How to Read It
Line colour: green/up colour = bullish trend, red/down colour = bearish trend
Trend fill: shaded area between price and the trailing stop — visual confirmation of which side of the line price is on
Inactive band: the faint dotted line on the opposite side shows where a flip would trigger if price reaches it
Signal diamonds: markers at each trend flip — below bar for long entries, above bar for short/cash exits
Notes
Optimised and tested on Bitcoin 1D. Performs well on trending instruments across higher timeframes (4H and above).
The MAD + ER combination is theoretically complementary: MAD handles what the band width is, ER handles how much of it to apply. They solve orthogonal problems.
As with all trend-following tools, performance degrades in prolonged sideways markets — the Chop multiplier setting mitigates this but does not eliminate it.
⚠️ Disclaimer
This indicator is a technical analysis tool provided for informational and educational purposes only. It is not financial advice, and nothing presented here should be construed as a recommendation to buy, sell, or hold any asset. Past performance does not guarantee future results.
Developed by GForge Indicator

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

Indicator

SMA MAD SuperTrend | OquantThe SMA MAD SuperTrend | Oquant is an trend-following indicator designed to help traders identify potential trend directions and reversals using a unique combination of a Simple Moving Average (SMA), Mean Absolute Deviation (MAD), and a SuperTrend mechanism. This script aims to provide clear visual signals for trend entries and exits, making it suitable for traders looking to capture trends.
This indicator innovatively combines the smoothing properties of an SMA with the volatility-adaptive qualities of MAD to create dynamic SuperTrend bands. Unlike traditional SuperTrend indicators that rely on Average True Range (ATR) for volatility, this script uses Mean Absolute Deviation(MAD) to measure the average absolute deviation from the mean price, providing a different perspective on price volatility. The result is a SuperTrend system that adapts to market conditions with a focus on price deviation, offering a unique tool for trend detection.
Components and Calculations
Simple Moving Average (SMA):
The SMA is a widely used indicator that calculates the average of a specified number of closing prices. It smooths price data to identify the overall trend direction. In this script, the SMA serves as the baseline for calculating dynamic upper and lower bands.
Mean Absolute Deviation (MAD):
MAD measures the average absolute deviation of the price from its mean. It quantifies volatility by calculating how far prices deviate from the mean price, offering an alternative to ATR.
SuperTrend Mechanism:
This SuperTrend indicator generates dynamic upper and lower bands around the Simple Moving Average (SMA) using mean absolute deviation as measure of volatility.
It tracks trend direction by comparing the close price to the bands:
If the price crosses above the upper band, the trend turns bullish, and the SuperTrend follows the lower band.
If the price crosses below the lower band, the trend turns bearish, and the SuperTrend follows the upper band.
The bands adjust based on their previous values, updating only when the price crosses a band or the band shifts in the correct direction, reducing false signals and ensuring stable trend detection.
How to Use the Indicator
Trend Signals:
Green Line: Indicates a bullish trend (price above the SuperTrend line).
Purple Line: Indicates a bearish trend (price below the SuperTrend line).
Bar and Candle Coloring: Bars and candles are colored green for bullish trends and purple for bearish trends, making it easy to visualize trend direction.
Filled Areas: The area between the price and the SuperTrend line is filled with transparent colors (green for bullish, purple for bearish) to highlight trend.
Inputs:
Source: Choose the price data for calculations.
SMA Length: Adjust the period for the SMA. Longer periods smooth the trend further.
MAD Length: Set the period for MAD calculation. Shorter periods make the MAD more sensitive.
Factor: Control the distance of the SuperTrend bands from the SMA. Higher values widen the bands, reducing sensitivity to price fluctuations.
Alerts:
The script includes alert conditions for trend changes:
SMA MAD SuperTrend Long: Triggered when the trend turns bullish.
SMA MAD SuperTrend Short: Triggered when the trend turns bearish.
Set up alerts in PulseWire to receive notifications for these conditions.
Why Use This Script?
The SMA MAD SuperTrend | Oquant offers a fresh take on trend-following by integrating SMA as baseline and MAD for volatility measurement, providing an alternative to ATR-based SuperTrend indicators. Its clear visual signals, customizable inputs, and alert conditions make it versatile for traders of all levels.
⚠️ Disclaimer: This indicator is intended for educational and informational purposes only. Trading/investing involves risk, and past performance does not guarantee future results. Always test and evaluate indicators/strategies before applying them in live markets. Use at your own risk.
Indicator

Inter-Exchanges Crypto Price Spread Deviation (Tartigradia)Measures the deviation of price metrics between various exchanges. It's a kind of realized volatility indicator, as the idea is that in times of high volatility (high emotions, fear, uncertainty), it's more likely that market inefficiencies will appear for the same asset between different market makers, ie, the price can temporarily differ a lot. This indicator will catch these instants of high differences between exchanges, even if they lasted only an instant (because we use high and low values).
Both standard deviation and median absolute deviation (more robust to outliers, ie, exchanges with a very different price from others won't influence the median absolute deviation, but the standard deviation yes).
Compared to other inter-exchanges spread indicators, this one offers two major features:
* The symbol automatically adapts to the symbol currently selected in user's chart. Hence, switching between tickers does not require the user to modify any option, everything is dynamically updated behind the scenes.
* It's easy to add more exchanges (requires some code editing because PineScript v5 does not allow dynamical request.security() calls).
Limitations/things to know:
* History is limited to what the ticker itself display. Ie, even if the exchanges specified in this indicator have more data than the ticker currently displayed in the user's chart, the indicator will show only a timeperiod as long as the chart.
* The indicator can manage multiple exchanges of different historical length (ie, some exchanges having more data going way earlier in the past than others), in which case they will simply be ignored from calculations when far back in the past. Hence, you should be aware that the further you go in the past, the less exchanges will have such data, and hence the less accurate the measures will be (because the deviation will be calculated from less sources than more recent bars). This is thanks to how the array.* math functions behave in case of na values, they simply skip them from calculations, contrary to math.* functions. Indicator

Variety N-Tuple Moving Averages w/ Variety Stepping [Loxx]Variety N-Tuple Moving Averages w/ Variety Stepping is a moving average indicator that allows you to create 1- 30 tuple moving average types; i.e., Double-MA, Triple-MA, Quadruple-MA, Quintuple-MA, ... N-tuple-MA. This version contains 2 different moving average types. For example, using "50" as the depth will give you Quinquagintuple Moving Average. If you'd like to find the name of the moving average type you create with the depth input with this indicator, you can find a list of tuples here: Tuples extrapolated
Due to the coding required to adapt a moving average to fit into this indicator, additional moving average types will be added as they are created to fit into this unique use case. Since this is a work in process, there will be many future updates of this indicator. For now, you can choose from either EMA or RMA.
This indicator is also considered one of the top 10 forex indicators. See details here: forex-station.com
Additionally, this indicator is a computationally faster, more streamlined version of the following indicators with the addition of 6 stepping functions and 6 different bands/channels types.
STD-Stepped, Variety N-Tuple Moving Averages
STD-Stepped, Variety N-Tuple Moving Averages is the standard deviation stepped/filtered indicator of the following indicator
Last but not least, a big shoutout to @lejmer for his help in formulating a looping solution for this streamlined version. this indicator is speedy even at 50 orders deep. You can find his scripts here: www.pulsewire.com
How this works
Step 1: Run factorial calculation on the depth value,
Step 2: Calculate weights of nested moving averages
factorial(depth) / (factorial(depth - k) * factorial(k); where depth is the depth and k is the weight position
Examples of coefficient outputs:
6 Depth: 6 15 20 15 6
7 Depth: 7 21 35 35 21 7
8 Depth: 8 28 56 70 56 28 8
9 Depth: 9 36 34 84 126 126 84 36 9
10 Depth: 10 45 120 210 252 210 120 45 10
11 Depth: 11 55 165 330 462 462 330 165 55 11
12 Depth: 12 66 220 495 792 924 792 495 220 66 12
13 Depth: 13 78 286 715 1287 1716 1716 1287 715 286 78 13
Step 3: Apply coefficient to each moving average
For QEMA, which is 5 depth EMA , the calculation is as follows
ema1 = ta. ema ( src , length)
ema2 = ta. ema (ema1, length)
ema3 = ta. ema (ema2, length)
ema4 = ta. ema (ema3, length)
ema5 = ta. ema (ema4, length)
In this new streamlined version, these MA calculations are packed into an array inside loop so Pine doesn't have to keep all possible series information in memory. This is handled with the following code:
temp = array.get(workarr, k + 1) + alpha * (array.get(workarr, k) - array.get(workarr, k + 1))
array.set(workarr, k + 1, temp)
After we pack the array, we apply the coefficients to derive the NTMA:
qema = 5 * ema1 - 10 * ema2 + 10 * ema3 - 5 * ema4 + ema5
Stepping calculations
First off, you can filter by both price and/or MA output. Both price and MA output can be filtered/stepped in their own way. You'll see two selectors in the input settings. Default is ATR ATR. Here's how stepping works in simple terms: if the price/MA output doesn't move by X deviations, then revert to the price/MA output one bar back.
ATR
The average true range (ATR) is a technical analysis indicator, introduced by market technician J. Welles Wilder Jr. in his book New Concepts in Technical Trading Systems, that measures market volatility by decomposing the entire range of an asset price for that period.
Standard Deviation
Standard deviation is a statistic that measures the dispersion of a dataset relative to its mean and is calculated as the square root of the variance. The standard deviation is calculated as the square root of variance by determining each data point's deviation relative to the mean. If the data points are further from the mean, there is a higher deviation within the data set; thus, the more spread out the data, the higher the standard deviation.
Adaptive Deviation
By definition, the Standard Deviation (STD, also represented by the Greek letter sigma σ or the Latin letter s) is a measure that is used to quantify the amount of variation or dispersion of a set of data values. In technical analysis we usually use it to measure the level of current volatility .
Standard Deviation is based on Simple Moving Average calculation for mean value. This version of standard deviation uses the properties of EMA to calculate what can be called a new type of deviation, and since it is based on EMA , we can call it EMA deviation. And added to that, Perry Kaufman's efficiency ratio is used to make it adaptive (since all EMA type calculations are nearly perfect for adapting).
The difference when compared to standard is significant--not just because of EMA usage, but the efficiency ratio makes it a "bit more logical" in very volatile market conditions.
See how this compares to Standard Devaition here:
Adaptive Deviation
Median Absolute Deviation
The median absolute deviation is a measure of statistical dispersion. Moreover, the MAD is a robust statistic, being more resilient to outliers in a data set than the standard deviation. In the standard deviation, the distances from the mean are squared, so large deviations are weighted more heavily, and thus outliers can heavily influence it. In the MAD, the deviations of a small number of outliers are irrelevant.
Because the MAD is a more robust estimator of scale than the sample variance or standard deviation, it works better with distributions without a mean or variance, such as the Cauchy distribution.
For this indicator, I used a manual recreation of the quantile function in Pine Script. This is so users have a full inside view into how this is calculated.
Efficiency-Ratio Adaptive ATR
Average True Range (ATR) is widely used indicator in many occasions for technical analysis . It is calculated as the RMA of true range. This version adds a "twist": it uses Perry Kaufman's Efficiency Ratio to calculate adaptive true range
See how this compares to ATR here:
ER-Adaptive ATR
Mean Absolute Deviation
The mean absolute deviation (MAD) is a measure of variability that indicates the average distance between observations and their mean. MAD uses the original units of the data, which simplifies interpretation. Larger values signify that the data points spread out further from the average. Conversely, lower values correspond to data points bunching closer to it. The mean absolute deviation is also known as the mean deviation and average absolute deviation.
This definition of the mean absolute deviation sounds similar to the standard deviation (SD). While both measure variability, they have different calculations. In recent years, some proponents of MAD have suggested that it replace the SD as the primary measure because it is a simpler concept that better fits real life.
For Pine Coders, this is equivalent of using ta.dev()
Bands/Channels
See the information above for how bands/channels are calculated. After the one of the above deviations is calculated, the channels are calculated as output +/- deviation * multiplier
Signals
Green is uptrend, red is downtrend, yellow "L" signal is Long, fuchsia "S" signal is short.
Included:
Alerts
Loxx's Expanded Source Types
Bar coloring
Signals
6 bands/channels types
6 stepping types
Related indicators
3-Pole Super Smoother w/ EMA-Deviation-Corrected Stepping
STD-Stepped Fast Cosine Transform Moving Average
ATR-Stepped PDF MA
Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator
