Skip to content

OutputAttribute.LineStyle

property · OutputAttribute · cAlgo.API

DesktopCLICloud

Gets or sets the Line Style for given Output property. By default it is set to Solid

Definition

public LineStyle LineStyle {get; set;}
outputAttribute.LineStyle: LineStyle

Returns LineStyle

Examples

public partial class OutputSample : Indicator
{
    private SimpleMovingAverage _sma;

    protected override void Initialize()
    {
        _sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 20);
    }

    public override void Calculate(int index)
    {
        Sma[index] = _sma.Result[index];
    }
}
class OutputSample():
    def initialize(self):
        self.sma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 20)

    def calculate(self, index):
        api.Sma[index] = self.sma.Result[index]
{
  "AccessRights": "None",
  "IsOverlay": true,
  "LineOutputs": [
    {
      "Name": "Sma",
      "DisplayName": "Simple Moving Average",
      "Style": "Lines"
    }
  ]
}