Relative chart analysis using arithmetic operators

Relative chart analysis using arithmetic operators.
Release Notes:
  • Now line plots are available and the default option
  • The 50 Period Moving Average is also plotted by default
On can plot a combination of number of mathematical operators. The input source, can itself also be a combination of different scrips. For example, in this example, we compare (divide / ) HDFCBANK with a "synthetic benchmark" of other competing private banks by combining (AXIS + KOTAK + INDUSIND) in the input.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?