CloudAttribute.FirstColor
property · CloudAttribute · cAlgo.API
DesktopCLICloud
Cloud color when the first line is above the second one. If not specified, the color of the first line is used.
Definition
public string FirstColor {get; set;}
cloudAttribute.FirstColor: str
Returns string
Examples
public partial class CloudSample : Indicator
{
private SimpleMovingAverage _fastMa;
private SimpleMovingAverage _slowMa;
protected override void Initialize()
{
_fastMa = Indicators.SimpleMovingAverage(Bars.ClosePrices, 10);
_slowMa = Indicators.SimpleMovingAverage(Bars.ClosePrices, 30);
}
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.SimpleMovingAverage(api.Bars.ClosePrices, 10)
self.slowMa = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 30)
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": "Gray"
},
{
"Name": "Slow",
"Color": "Gray"
}
],
"Clouds": [
{
"FirstLineName": "Fast",
"SecondLineName": "Slow",
"FirstColor": "Green",
"SecondColor": "Red"
}
]
}