---
id: "T:cAlgo.API.CloudAttribute"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# CloudAttribute (class)

Represents the cloud between the indicator lines.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public class CloudAttribute : Attribute
```

## Examples

C#:

```csharp
using cAlgo.API;
using cAlgo.API.Indicators;

namespace cAlgo
{
    // This indicator fills the area between two outputs with the Clouds entry of config.json
    public partial class BollingerBandsCloudSample : Indicator
    {
        private BollingerBands _bollingerBands;

        protected override void Initialize()
        {
            _bollingerBands = Indicators.BollingerBands(Bars.ClosePrices, Periods, 2, MovingAverageType.Simple);
        }

        public override void Calculate(int index)
        {
            Top[index] = _bollingerBands.Top[index];
            Bottom[index] = _bollingerBands.Bottom[index];
        }
    }
}
```

Python:

```python
class BollingerBandsCloudSample():
    def initialize(self):
        self.bollingerBands = api.Indicators.BollingerBands(api.Bars.ClosePrices, api.Periods, 2, MovingAverageType.Simple)

    def calculate(self, index):
        api.Top[index] = self.bollingerBands.Top[index]
        api.Bottom[index] = self.bollingerBands.Bottom[index]
```

config.json:

```json
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true,
  "Parameters": [
    {
      "Name": "Periods",
      "Type": "Integer",
      "DefaultValue": 20,
      "MinValue": 2
    }
  ],
  "LineOutputs": [
    {
      "Name": "Top",
      "Color": "Red"
    },
    {
      "Name": "Bottom",
      "Color": "Red"
    }
  ],
  "Clouds": [
    {
      "FirstLineName": "Top",
      "SecondLineName": "Bottom",
      "Opacity": 0.2
    }
  ]
}
```

## Constructors

- `public CloudAttribute(string firstLineName, string secondLineName)` — The cloud between the indicator lines. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/Constructor/index.md)

## Properties

- `public string FirstColor {get; set;}` — Cloud color when the first line is above the second one. If not specified, the color of the first line is used. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/FirstColor/index.md)
- `public string FirstLineName {get;}` — The name of the first indicator line. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/FirstLineName/index.md)
- `public double Opacity {get; set;}` — 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. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/Opacity/index.md)
- `public string SecondColor {get; set;}` — Cloud color when the second line is above the first one. If not specified, color of the second line is used. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/SecondColor/index.md)
- `public string SecondLineName {get;}` — The name of the second indicator line. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/SecondLineName/index.md)

