How to add multiple indicators on TradingView Chart?

 You can add multiple indicators on TradingView by adding few codes to pinescript editor and merging all indicators in one mega custom indicator. There are two types of indicators 

1) the one which are ploted on price chart it self examples are SAR, Moving Averages, Bollinger's Band,Kelter's Channel and 

2) Set of indicators are drawn below the chart and are mostly oscillator type or momentum type example: RSI, center of gravity, stoch, William's  %R, ADX ,etc.

You can combine one set of indicator with another indicator which is of same type. You cannot combine indicator like SAR with RSI i.e. one that plots on chart and another that plots below chart. You will therefore may require maximum two custom made indicators to add all indicators on your chart irrespective of type of subscription taken by you. Below is example wherein moving average crossover, SAR indicator and Bollinger's Band is added in a single script. 

 

The Code for multiple indicators

//@version=4
study("Demo Multi Indicators",overlay=true)
plot(sma(close,14),color=color.red)
plot(sma(close,7),color=color.red)
mySAR = sar(.02,.02,.2)
plot(mySAR,style=plot.style_circles)
[mean,upperBand, lowerBand] = bb(close,20,2)
plot(upperBand,color=color.blue)
plot(lowerBand,color=color.blue)
plot(mean,color=color.green)

The output from the code

All indicators are in different colors. The red ones are moving averages, dots are for SAR and blue lines are upper and lower bands of Bollinger and green is middle line of Bollinger. These multiple indicators have been merged into one indicator named Demo Multi Indicators. Each indicators can be coloured differently.


Resources

Highest Rated Udemy Course on PineScript - Grab your Seat Now 

Udemy Discount Coupon Code : UDEMY-JAN23 (Valid upto 30th Nov 2023)

Learn more about coding on tradingview in PineScript through Books on pinescript available on amazon and kindle.


200+ pages book100 pages book200+ pages book


Point and Figure Charts : A Time-Tested Tool for Technical Analysis

In the dynamic world of financial markets, investors and traders constantly seek tools that can provide valuable insights into market trends...