OPEN-SOURCE SCRIPT

RatioMACD

Ratio based MACD

This indicator is used to calculate MACD of ratio of prices of 2 symbols. Given the inputs for Symbol A and Symbol B, the ratio used is SymbolA/SymbolB.
MACD is then calculated using this ratio value. Inputs for MACD are standard ones - Fast length, Slow length, Signal Smoothing. Additional MACD inputs are provided if you wish to use Simple MA instead of default Exponential MA for the oscillator and signal line
Moving AveragesOscillators

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer