Rolling Z-Score Trend [QuantAlgo] calculates a rolling Z-score using mean and standard deviation over a user-defined lookback window to evaluate statistical price deviations and momentum.
1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
Plotted in a separate indicator pane, it displays the rolling Z-score line alongside momentum columns that highlight bullish and bearish phases relative to configurable entry thresholds. Users can select predefined presets tailored for scalping, swing trading, or trend following, or configure custom lookback lengths and statistical levels. It also displays an optional info table summarizing current indicator values and state.
Rolling Z-score statistical calculation
Configurable threshold bands and momentum columns
Predefined presets for scalping, swing, and trend following
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Lookback Period
int
20
lookback_period
Entry Threshold
float
1.5
entry_threshold
Preconfigured Input Preset
string
Default
input_preset
Color Preset
string
Custom
color_preset
Bullish Color
color
#00ffaa
bullish_color
Bearish Color
color
#ff0000
bearish_color
Momentum Column Transparency
int
65
momentum_column_transparency
Show Info Table
bool
true
show_info_table
Table Color Preset
string
Custom
table_preset
Table Position
string
Top Right
info_table_position
Table Background Color
color
color.new(#1a1a1a, 0)
table_background_color
Header Background Color
color
color.new(#2d2d2d, 0)
header_background_color
Show all 16 settings
Setting
Type
Default
Variable
Header Text Color
color
color.white
header_text_color
Normal Text Color
color
color.white
normal_text_color
Border Color
color
color.new(#333333, 0)
border_color
Table Text Size
string
Normal
table_text_size
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.
Calculates a composite carry and decay oscillator fusing impulse-autocorrelation half-life, a Hurst exponent approximation, path efficiency, and range expansion ratios. It evaluates whether an impulse is likely to persist or mean-revert, plotting the oscillato
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
KamaFama is an indicator that translates a Freqtrade trading strategy into Pine Script for visualization. It combines Kaufman Adaptive Moving Average (KAMA), MAMA/FAMA calculations derived via Hilbert Transform, Williams %R, and correlation trend filters to ev
Calculates normalized reversal metrics across up to ten Forex currency pairs using user-selected moving average methods, including HarmonicMA, EMA, SMA, or WMA. The indicator identifies overbought, oversold, and mean-crossing conditions using a configurable th
This indicator calculates the statistical autocorrelation coefficient of an input series over a user-defined lookback window at a specified lag. It tracks values using an internal circular buffer, computes sample mean, variance, and autocovariance, and normali
Manias, Panics and Crashes is a separate-pane market regime indicator that quantifies market sentiment and systemic risk. It processes technical metrics including RSI, moving averages, and volume alongside optional intermarket data such as VIX volatility and c