StrategyCoder History

← Examples

Bollinger Bands Experimental

Other platform v5/v6 → Cuprel · converter door 0.1.0 · converted · 14 lines out

Source (Other platform v5/v6)
//@version=5
indicator("Bollinger Bands", overlay=true)
len = input.int(20, "Length", minval=1)
mult = input.float(2.0, "Multiplier", minval=0.1)
basis = ta.sma(close, len)
dev = mult * ta.stdev(close, len)
plot(basis, "Basis")
plot(basis + dev, "Upper")
plot(basis - dev, "Lower")
Converted (Cuprel)
// converted by cuprel-convert 0.1.0 from a source written for another charting platform (format v5); original notices above unchanged

indicator "Bollinger Bands"
    edition = 1
    display = price

input len: int = 20, "Length", min = 1
input mult: float = 2.0, "Multiplier", min = 0.1
let basis = tech.sma(close, len)
let dev = mult * tech.stdev(close, len)
plot(basis, "Basis")
plot(basis + dev, "Upper")
plot(basis - dev, "Lower")
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