Class SuperTrend
- Namespace
- StockSharp.Algo.Indicators
- Assembly
- StockSharp.Algo.dll
SuperTrend indicator.
[Display(ResourceType = typeof(LocalizedStrings), Name = "SuperTrend", Description = "SuperTrendDesc")]
[Doc("topics/api/indicators/list_of_indicators/supertrend.html")]
[IndicatorIn(typeof(CandleIndicatorValue))]
[IndicatorOut(typeof(SuperTrendIndicatorValue))]
public class SuperTrend : BaseIndicator, IIndicator, IPersistable, ICloneable<IIndicator>, ICloneable
- Inheritance
-
SuperTrend
- Implements
- Inherited Members
- Extension Methods
Remarks
Popular trend-following indicator based on ATR. Changes color/side when price crosses its line.
Constructors
SuperTrend()
Initializes a new instance of the SuperTrend class.
public SuperTrend()
SuperTrend(AverageTrueRange)
Initializes a new instance of the SuperTrend class.
public SuperTrend(AverageTrueRange atr)
Parameters
Properties
Length
ATR period.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Period", Description = "IndicatorPeriod", GroupName = "General")]
public int Length { get; set; }
Property Value
Multiplier
Multiplier for ATR.
[Display(Name = "Multiplier", Description = "AverageTrueRange", GroupName = "General")]
public decimal Multiplier { get; set; }
Property Value
NumValuesToInitialize
Number of values that need to be processed in order for the indicator to initialize (be IsFormed equals true). null if undefined.
public override int NumValuesToInitialize { get; }
Property Value
Methods
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
OnProcess(IIndicatorValue)
To handle the input value.
protected override IIndicatorValue OnProcess(IIndicatorValue input)
Parameters
input
IIndicatorValueThe input value.
Returns
- IIndicatorValue
The resulting value.
Reset()
To reset the indicator status to initial. The method is called each time when initial settings are changed (for example, the length of period).
public override void Reset()
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
ToString()
public override string ToString()