MAD Adaptive Trend Score calculates a robust trend persistence oscillator in a separate chart pane using a Median Absolute Deviation (MAD) adaptive filter.
MAD Adaptive Trend Score [BackQuant] computes a rolling median and scaled MAD envelope to constrain price noise, then evaluates the filter's directional persistence over a specified lookback range. The resulting score is compared against customizable long and short thresholds to identify trend shifts and signals. Key settings adjust MAD length, MAD multiplier, lookback bounds, signal thresholds, and bar or background coloring.
Median Absolute Deviation adaptive price filter
Directional persistence trend score calculation
Customizable long and short signal thresholds
Optional candlestick and chart background coloring
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Source
source
close
src
MAD Length
int
15
madLen
MAD Multiplier
float
5.2
madMult
Score Lookback Start
int
1
scoreStart
End
int
45
scoreEnd
Show Reference Lines
bool
true
showRefs
Show Signals on Chart?
bool
true
showSignals
Long Threshold
int
40
longThres
Short Threshold
int
-6
shortThres
Long Color
color
GREEN
longCol
Short Color
color
RED
shortCol
Line Width
int
5
lineW
Show all 15 settings
Setting
Type
Default
Variable
Show MAD Filter on Chart?
bool
false
showSmooth
Paint Candles to Trend?
bool
true
paintCandles
Background Color?
bool
false
bgCol
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This indicator plots the Schaff Trend Cycle in a separate pane. It subtracts a slow exponential moving average from a fast one, applies a stochastic cycle twice, and smooths each result to form a 0–100 oscillator. Line color follows the slope, or the upper and
This indicator calculates a modified MACD oscillator and signal line alongside a trend EMA filter, plotting the output as a stylized column histogram in a separate pane. Instead of plotting true MACD distance, it quantifies positive and negative histogram mome
This indicator plots the Average Directional Index in a separate pane and colors the line teal or maroon according to whether plus DI is above minus DI. A horizontal key level and a silver background mark periods when ADX exceeds that threshold. With labels en
Standardized Trend Map calculates series momentum relative to active price range across 40 distinct lookback periods ranging from 2 to 80 bars on an exponential moving average source. Each standardized calculation rounds to an integer values of -1, 0, or 1 to
Multi-Timeframe Analysis Suite calculates trend direction and momentum conditions across five user-selected timeframes using moving averages, RSI, and Stochastic oscillators. It evaluates moving average slope and oscillator levels to compute trend alignment, m
This indicator calculates and displays the Average Directional Index (ADX) as a column histogram in a separate pane. It evaluates market trend strength by calculating directional movement metrics based on specified smoothing and DI length inputs. When the ADX