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

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

# OutputAttribute (class)

This attribute is used for marking an indicator IndicatorDataSeries property as a line Output.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public sealed class OutputAttribute : Attribute
```

## Remarks

Marks a IndicatorDataSeries property as output to be displayed on the chart or panel below. To make it effective please apply this attribute in front of the declaration of the IndicatorDataSeries to be displayed.

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo
{
    // This sample declares the indicator outputs with the LineOutputs entry of config.json
    public partial class OutputAttributeSample : Indicator
    {
        public override void Calculate(int index)
        {
            OpenOutput[index] = Bars.OpenPrices[index];
            HighOutput[index] = Bars.HighPrices[index];
            LowOutput[index] = Bars.LowPrices[index];
            CloseOutput[index] = Bars.ClosePrices[index];
        }
    }
}
```

Python:

```python
class OutputAttributeSample():
    def calculate(self, index):
        api.OpenOutput[index] = api.Bars.OpenPrices[index]
        api.HighOutput[index] = api.Bars.HighPrices[index]
        api.LowOutput[index] = api.Bars.LowPrices[index]
        api.CloseOutput[index] = api.Bars.ClosePrices[index]
```

config.json:

```json
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": false,
  "LineOutputs": [
    {
      "Name": "OpenOutput",
      "DisplayName": "Open",
      "Color": "Red",
      "Style": "Dots",
      "PlotType": "Line",
      "Thickness": 2
    },
    {
      "Name": "HighOutput",
      "DisplayName": "High",
      "Color": "Blue",
      "Style": "Solid",
      "PlotType": "Line",
      "Thickness": 2
    },
    {
      "Name": "LowOutput",
      "DisplayName": "Low",
      "Color": "Yellow",
      "Style": "Lines",
      "PlotType": "Line",
      "Thickness": 2
    },
    {
      "Name": "CloseOutput",
      "DisplayName": "Close",
      "Color": "Green",
      "Style": "DotsRare",
      "PlotType": "Line",
      "Thickness": 2
    }
  ]
}
```

## Constructors

- `public OutputAttribute(string lineName)` — Initializes a new instance of the OutputAttribute and sets the name. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/Constructor/index.md)

## Properties

- `public string Description {get; set;}` — Gets or sets description for output that will be shown in UI. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/Description/index.md)
- `public bool IsColorCustomizable {get; set;}` — Gets or sets if Output line color is customizable or not. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/IsColorCustomizable/index.md)
- `public bool IsLastValueVisibleInTitle {get; set;}` — Gets or sets if output last value should be visible or not in instance title (default: true). [details](https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/IsLastValueVisibleInTitle/index.md)
- `public bool IsVisible {get; set;}` — Gets or sets default visibility of output. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/IsVisible/index.md)
- `public string LineColor {get; set;}` — Gets or sets the Color of the Output property. This Color will be used when the line for this Output is plotted. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/LineColor/index.md)
- `public LineStyle LineStyle {get; set;}` — Gets or sets the Line Style for given Output property. By default it is set to Solid [details](https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/LineStyle/index.md)
- `public string Name {get;}` — The plot name [details](https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/Name/index.md)
- `public PlotType PlotType {get; set;}` — Plot type. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/PlotType/index.md)
- `public float Thickness {get; set;}` — Sets the Width of the Output property. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/Thickness/index.md)

## Deprecated members

- `public Colors Color {get; set;}` — Use LineColor instead.
- `public bool IsHistogram {get; set;}` — Use PlotType instead.

