Graphs slope of ohlc4 MACD
When it =0, trend change
play with slow&fast lengths as well as the length used to calculate the slope.
-in progress(?)
Vertical lines in the image are as close as I could get them to SMACD=0.
When it =0, trend change
play with slow&fast lengths as well as the length used to calculate the slope.
-in progress(?)
Vertical lines in the image are as close as I could get them to SMACD=0.
study(title="Slope(MACD(ohlc4))", shorttitle="SMACD") source = ohlc4 fastLength = input(13, minval=1), slowLength=input(5,minval=1) fastMA = ema(source, fastLength) slowMA = ema(source, slowLength) macd = fastMA - slowMA //plot(macd, color=blue) source2 = macd length = input(1,minval=1) offset = input(0) roc = (source2 - source2[length])/source2[length] plot(roc, color=red, title="MACDROC", offset=offset) hline(0, title="Zero Line")