IndicatorAttribute


Summary

Indicator Attribute. Applies metadata to enable the indicator plot.

Remarks

To make it effective apply enclosed in square brackets, e.g. [Indicator] before the indicator class declaration. Cannot be ommited.

Syntax

public sealed class IndicatorAttribute : Attribute

Members

NameTypeSummary
AccessRights PropertyAccessRights required for Indicator
AutoRescale PropertyIndicates whether this instance automatically rescales the chart or not
IndicatorAttribute MethodInitializes a new instance of the IndicatorAttribute and sets the name of the indicator.
IsOverlay PropertyIndicates whether this instance is overlayed on the chart or plotted on a separate indicator panel
Name PropertyThe name of the Indicator.
ScalePrecision PropertyThe price scale precision.
TimeZone PropertyThe chart timezone of the displayed indicator

Example 1

namespace cAlgo.Indicators
   [Indicator()]
   public class SampleIndicator : Indicator
   {
       //...
   }

Example 2

[Indicator("Custom Indicator" )]
public class SampleIndicator : Indicator

Example 3

[Indicator("IndicatorName", ScalePrecision = 5, IsOverlay = false, TimeZone = TimeZones.UTC)] 
public class SampleIndicator : Indicator