Skip to content

CloudAttribute.Opacity

property · CloudAttribute · cAlgo.API

DesktopCLICloud

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.

Definition

public double Opacity {get; set;}
cloudAttribute.Opacity: float

Returns double

Examples

public partial class CloudSample : Indicator
{
    public override void Calculate(int index)
    {
        High[index] = Bars.HighPrices[index];
        Low[index] = Bars.LowPrices[index];
    }
}
def calculate(self, index):
    api.High[index] = api.Bars.HighPrices[index]
    api.Low[index] = api.Bars.LowPrices[index]
{
  "AccessRights": "None",
  "IsOverlay": true,
  "LineOutputs": [
    {
      "Name": "High",
      "Color": "Green"
    },
    {
      "Name": "Low",
      "Color": "Red"
    }
  ],
  "Clouds": [
    {
      "FirstLineName": "High",
      "SecondLineName": "Low",
      "Opacity": 0.5
    }
  ]
}