thetradeengine
New member
- Platform
-
- TradingView
I converted German Burrito's MACD RMS Bands to Pine Script. There should be a post soon from him in the ThinkScript section with his recommendations on how to use it.
From my personal observations:
Look for a long (using other indicators) after the histogram has gone below the lower band and the histogram has crossed back above 0.
Look for a short (using other indicators) after the histogram has gone above the upper band and the histogram has crossed back below 0.
From my personal observations:
Look for a long (using other indicators) after the histogram has gone below the lower band and the histogram has crossed back above 0.
Look for a short (using other indicators) after the histogram has gone above the upper band and the histogram has crossed back below 0.
Code:
//@version=5
indicator("MACD RMS Bands", overlay=false)
fastLength = input(12, "Fast Length")
slowLength = input(26, "Slow Length")
MACDLength = input(9, "MACD Length")
showBreakoutSignals = input(false, "Show Breakout Signals")
[_, _, histLine] = ta.macd(close, fastLength, slowLength, MACDLength)
plot(histLine, "Diff", style=plot.style_columns, linewidth=4, color=histLine >= 0 ? histLine > histLine[1] ? color.teal : color.lime : histLine < histLine[1] ? color.red : color.maroon)
UpSignal = ta.crossover(histLine, 0)
DownSignal = ta.crossunder(histLine, 0)
rms = math.sqrt(ta.sma(histLine*histLine, 34))
plot(rms, "+RMS", color=color.yellow, linewidth=2)
plot(-rms, "-RMS", color=color.yellow, linewidth=2)
plotshape(UpSignal, "Up Signal", style=shape.triangleup, location=location.bottom, color=color.green)
plotshape(DownSignal, "Down Signal", style=shape.triangledown, location=location.top, color=color.red)
