Bollinger.UpperBand

Calculates the Upper Band of the Bollinger indicator.

Accepts the following parameters:

Parameter NameTypeDefault ValueNotes
applyToSeries<Number>
close
-
periodNumber20-
deviationNumber2-

Returns: Series<Number>

Bollinger.UpperBand is a built-in function - you can use it directly. Below is an example implementation:

1 function Bollinger.UpperBand(applyTo = close, period = 20, deviation = 2):
2 SMA(applyTo, period) + deviation * StdDev(applyTo, period)