CloudAttribute.SecondColor
property · CloudAttribute · cAlgo.API
DesktopCLICloud
Cloud color when the second line is above the first one. If not specified, color of the second line is used.
Definition
public string SecondColor {get; set;}
cloudAttribute.SecondColor: str
Returns string
Examples
public partial class CloudSample : Indicator
{
private ExponentialMovingAverage _fastMa;
private ExponentialMovingAverage _slowMa;
protected override void Initialize()
{
_fastMa = Indicators.ExponentialMovingAverage(Bars.ClosePrices, 12);
_slowMa = Indicators.ExponentialMovingAverage(Bars.ClosePrices, 26);
}
public override void Calculate(int index)
{
Fast[index] = _fastMa.Result[index];
Slow[index] = _slowMa.Result[index];
}
}
class CloudSample():
def initialize(self):
self.fastMa = api.Indicators.ExponentialMovingAverage(api.Bars.ClosePrices, 12)
self.slowMa = api.Indicators.ExponentialMovingAverage(api.Bars.ClosePrices, 26)
def calculate(self, index):
api.Fast[index] = self.fastMa.Result[index]
api.Slow[index] = self.slowMa.Result[index]
{
"AccessRights": "None",
"IsOverlay": true,
"LineOutputs": [
{
"Name": "Fast",
"Color": "Green"
},
{
"Name": "Slow",
"Color": "Red"
}
],
"Clouds": [
{
"FirstLineName": "Fast",
"SecondLineName": "Slow",
"SecondColor": "#80FF0000"
}
]
}