A separate-pane momentum indicator that measures how far price sits from a selectable moving average and sums that deviation over a for-loop range of lookbacks, from a start to an end value.
1Copy the scriptPress Copy script above, or the copy button on the code below.
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
138 lines of Pine Script v6 from indicator/olg_7_6_26/LyroRS/12.txt, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
The result is compared with a long threshold and a short threshold to mark uptrend and downtrend states, and the line is colored by state. It supports sixteen moving average types and several color palettes.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Source
source
close
source
Select Moving Average
string
SMA
MA_Type
MA Length
int
30
MA_len
From
int
100
a_
To
int
600
b_
Threshold Long
int
150
Threshold_L
Threshold Short
int
-150
Threshold_S
Custom Color Palette
string
Mystic
ColMode
Use Custom Palette
bool
true
cpyn
Custom Up
color
#00ff00
cp_UpC
Custom Down
color
#ff0000
cp_DnC
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
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
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