MACD with signal and histogram Experimental
Other platform v5/v6 → Cuprel · converter door 0.1.0 · converted · 14 lines out
Source (Other platform v5/v6)
//@version=5
indicator("MACD")
fastLen = input.int(12, "Fast")
slowLen = input.int(26, "Slow")
sigLen = input.int(9, "Signal")
line = ta.ema(close, fastLen) - ta.ema(close, slowLen)
sig = ta.ema(line, sigLen)
plot(line, "MACD")
plot(sig, "Signal")
plot(line - sig, "Histogram", style=plot.style_columns)
Converted (Cuprel)
// converted by cuprel-convert 0.1.0 from a source written for another charting platform (format v5); original notices above unchanged
indicator "MACD"
edition = 1
input fastLen: int = 12, "Fast"
input slowLen: int = 26, "Slow"
input sigLen: int = 9, "Signal"
let line = tech.ema(close, fastLen) - tech.ema(close, slowLen)
let sig = tech.ema(line, sigLen)
plot(line, "MACD")
plot(sig, "Signal")
plot(line - sig, "Histogram", style = columns)
Experimental means: the converter reads a thin, tested slice, adds warnings, and says no when it is unsure. Run the converted program on your own data before relying on it.
Open in the converter Other platform v5/v6 → Cuprel route All examples