importclrclr.AddReference("cAlgo.API")fromcAlgo.APIimport*# Attribute, parameters, and outputs are defined the same way as in C# exampleclassTest():definitialize(self):self.baseBars=api.MarketData.GetBars(api.BaseTimeFrame)self.bollingerBands=api.Indicators.BollingerBands(self.baseBars.GetPrices(api.DataSeriesType),api.Periods,api.StandardDeviation,api.MaType)defcalculate(self,index):baseIndex=self.baseBars.OpenTimes.GetIndexByTime(api.Bars.OpenTimes[index])api.Main[index]=self.bollingerBands.Main[baseIndex]api.Top[index]=self.bollingerBands.Top[baseIndex]api.Bottom[index]=self.bollingerBands.Bottom[baseIndex]
Properties
FirstLineName
Summary
The name of the first indicator line.
Signature
1
publicstringFirstLineName{get;}
Return Value
string
SecondLineName
Summary
The name of the second indicator line.
Signature
1
publicstringSecondLineName{get;}
Return Value
string
Opacity
Summary
The cloud opacity. Value can be set from 0 (transparent) to 1 (opaque). Values higher than 1 will be set to 1, values below 0 will be set to 0. Opacity is multiplied by the alpha channel of the active color (first or second color). Default opacity value is 0.2.
Signature
1
publicdoubleOpacity{get;set;}
Return Value
double
FirstColor
Summary
Cloud color when the first line is above the second one. If not specified, the color of the first line is used.
Signature
1
publicstringFirstColor{get;set;}
Return Value
string
SecondColor
Summary
Cloud color when the second line is above the first one. If not specified, color of the second line is used.