La soluzione è molto semplice:
Property Periodo as Numeric
Range (1, 500)
Default (0)
EndProperty
Property Shift_Verticale as Numeric
Default (1.5)
EndProperty
Function Main()
dim UpperBand as numeric
dim LowerBand as numeric
dim Media as numeric
UpperBand = Bollinger(Close, Periodo, "U", Shift_Verticale, "S")
LowerBand = Bollinger(Close, Periodo, "D", Shift_Verticale, "S")
Media = MoveAv(Close, Periodo, "S")
return (UpperBand - LowerBand) / Media
Endfunction