SuperTrend
StockSharp.Algo.Indicators
SuperTrend indicator.
Inherits: BaseIndicator
Constructors
SuperTrend
public SuperTrend()
superTrend = SuperTrend()
Initializes a new instance of the SuperTrend class.
SuperTrend
public SuperTrend(AverageTrueRange atr)
superTrend = SuperTrend(atr)
Initializes a new instance of the SuperTrend class.
- atr
- AverageTrueRange
Properties
Length
public int Length { get; set; }
value = superTrend.Length
superTrend.Length = value
ATR period.
Multiplier
public decimal Multiplier { get; set; }
value = superTrend.Multiplier
superTrend.Multiplier = value
Multiplier for ATR.
NumValuesToInitialize
public override int NumValuesToInitialize { get; }
value = superTrend.NumValuesToInitialize
Number of values that need to be processed in order for the indicator to initialize (be IsFormed equals ). if undefined.
Methods
LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = superTrend.LoadAsync(storage, cancellationToken)
Load settings.
- storage
- Settings storage.
- cancellationToken
- CancellationToken
Returns: Task
OnProcess
protected override IIndicatorValue OnProcess(IIndicatorValue input)
result = superTrend.OnProcess(input)
To handle the input value.
- input
- The input value.
Returns: The resulting value.
Reset
public override void Reset()
superTrend.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).
SaveAsync
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = superTrend.SaveAsync(storage, cancellationToken)
Save settings.
- storage
- Settings storage.
- cancellationToken
- CancellationToken
Returns: Task
ToString
public override string ToString()
result = superTrend.ToString()
Returns a string representation of the tuple, with values separated by commas.
Returns: A string representing the tuple's values.