Summary
Sealed Class OutputAttribute
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.
Syntax
public sealed class OutputAttribute : Attribute
Members
Name | Type | Summary |
---|---|---|
IsHistogram | Property | Plots a Histogram. |
LineColor | Property | Gets or sets the Color of the Output property. This Color will be used when the line for this Output is plotted. |
LineStyle | Property | Gets or sets the Line Style for given Output property. By default it is set to Solid |
Name | Property | The plot name |
OutputAttribute | Method | Initializes a new instance of the OutputAttribute and sets the name. |
PlotType | Property | Plot type. |
Thickness | Property | Sets the Width of the Output property. |
Example 1
using cAlgo.API; namespace cAlgo { // This sample shows how to use indicators OuputAttribute [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class OutputAttributeSample : Indicator { [Output("Open", LineColor = "Red", IsHistogram = false, LineStyle = LineStyle.Dots, PlotType = PlotType.Line, Thickness = 2)] public IndicatorDataSeries OpenOutput { get; set; } [Output("High", LineColor = "Blue", IsHistogram = false, LineStyle = LineStyle.Solid, PlotType = PlotType.Line, Thickness = 2)] public IndicatorDataSeries HighOutput { get; set; } [Output("Low", LineColor = "Yellow", IsHistogram = false, LineStyle = LineStyle.Lines, PlotType = PlotType.Line, Thickness = 2)] public IndicatorDataSeries LowOutput { get; set; } [Output("Close", LineColor = "Green", IsHistogram = false, LineStyle = LineStyle.DotsRare, PlotType = PlotType.Line, Thickness = 2)] public IndicatorDataSeries CloseOutput { get; set; } protected override void Initialize() { } 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]; } } }