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
182 lines of Pine Script v5 from Tradingview/7-in-1.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Traders can toggle each moving average on or off, selecting between Simple Moving Average (SMA) and Exponential Moving Average (EMA) types. Each moving average line offers full control over its length, plot color, source price calculation, or higher timeframe resolution ranging from minute to monthly bars. This allows for multi-timeframe trend analysis and moving average ribbon visualization.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
MA 1
bool
true
use_ma1
ma_1_type
string
EMA
ma_1_type
ma_1_val
int
9
ma_1_val
ma1_res
string
Normal MA
ma1_res
color_ma1
color
color.blue
color_ma1
MA 2
bool
true
use_ma2
ma_2_type
string
EMA
ma_2_type
ma_2_val
int
13
ma_2_val
ma2_res
string
Normal MA
ma2_res
color_ma2
color
color.orange
color_ma2
MA 3
bool
true
use_ma3
ma_3_type
string
EMA
ma_3_type
Show all 34 settings
Setting
Type
Default
Variable
ma_3_val
int
21
ma_3_val
ma3_res
string
Normal MA
ma3_res
color_ma3
color
color.yellow
color_ma3
MA 4
bool
true
use_ma4
ma_4_type
string
EMA
ma_4_type
ma_4_val
int
55
ma_4_val
ma4_res
string
Normal MA
ma4_res
color_ma4
color
color.purple
color_ma4
MA 5
bool
true
use_ma5
ma_5_type
string
EMA
ma_5_type
ma_5_val
int
100
ma_5_val
ma5_res
string
Normal MA
ma5_res
color_ma5
color
color.lime
color_ma5
MA 6
bool
true
use_ma6
ma_6_type
string
EMA
ma_6_type
ma_6_val
int
200
ma_6_val
ma6_res
string
Normal MA
ma6_res
color_ma6
color
color.new(#311b92,0)
color_ma6
VWAP
bool
true
use_vwap
anchor
string
Session
anchor
source_vwap
source
hlc3
source_vwap
color_vwap
color
color.silver
color_vwap
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.
The Adaptive Laguerre Filter calculates a smoothed, dynamically adjusted trendline plotted directly on the main price chart. It dynamically adjusts its damping factor (alpha) based on recent price range variations and median percentile calculations over a spec
This script plots three moving averages on the price chart: a fast EMA or SMA with 10 periods, a slow EMA or SMA with 20 periods, and a trend EMA or SMA with 100 periods. It signals trend changes by drawing a white cross when the fast moving average crosses ab
This indicator plots four customizable moving averages directly on the main price chart using default lengths of 3, 8, 21, and 50 periods. It fills the space between adjacent averages in green or maroon depending on trend alignment. Additionally, it computes B
This indicator plots three exponential moving averages and ATR volatility envelopes on the price chart. It compares the fast and slow EMAs to shade a trend ribbon and marks confirmed upward and downward crossovers with triangle labels. Settings change the thre
Donald SPX - Options Trading is an overlay indicator designed for intraday SPX analysis. It plots a 200-period Weighted Moving Average (WMA) on the price chart while evaluating multi-timeframe market structure across Daily, 15-minute, 5-minute, and 2-minute ba
This indicator computes moving average and RSI bias signals across the current timeframe and four higher timeframes. It sums biases from the MA and RSI to derive an overall bullish or bearish signal. The results appear in a configurable table that displays eac