Class Indicator
Base class for all indicators.
public abstract class Indicator : ExecutionEntity, ICustomizable, IIndicatorsCollection
Constructors
Declaration
Properties
Specified, whether indicator should participate into price auto scale system.
Declaration
public bool AllowFitAuto { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Amount of items in internal buffers
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
Represent access to the chart, that created indicator
Declaration
public IChart CurrentChart { get; set; }
Property Value
Precision amount for formatting price (the count of digits after decimal point); By default = -1, which means to use precision from indicator's symbol
Declaration
public int Digits { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Declaration
public virtual string HelpLink { get; }
Property Value
Type |
Description |
System.String |
|
Represent access to current used historical data.
Declaration
public HistoricalData HistoricalData { get; }
Property Value
Declaration
protected bool IsUpdateTypesSupported { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public LineLevel[] LinesLevels { get; }
Property Value
Type |
Description |
TradingPlatform.BusinessLayer.LineLevel[] |
|
Represent access indicator series
Declaration
public LineSeries[] LinesSeries { get; }
Property Value
Type |
Description |
TradingPlatform.BusinessLayer.LineSeries[] |
|
Specified, whether indicator should draw on chart background by default.
Declaration
public bool OnBackGround { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Specified, whether indicator should use main or additional window on the chart
Declaration
public bool SeparateWindow { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public override IList<SettingItem> Settings { get; set; }
Property Value
Type |
Description |
IList<TradingPlatform.BusinessLayer.SettingItem> |
|
Overrides
TradingPlatform.BusinessLayer.ExecutionEntity.Settings
Declaration
public virtual string ShortName { get; protected set; }
Property Value
Type |
Description |
System.String |
|
Declaration
public virtual string SourceCodeLink { get; }
Property Value
Type |
Description |
System.String |
|
Access to current Symbol of indicator
Declaration
public Symbol Symbol { get; }
Property Value
Declaration
public TimeFrameConfig TFConfig { get; }
Property Value
Type |
Description |
TradingPlatform.BusinessLayer.Utils.TimeFrameConfig |
|
Declaration
public IndicatorUpdateType UpdateType { get; set; }
Property Value
Type |
Description |
TradingPlatform.BusinessLayer.IndicatorUpdateType |
|
Methods
Declaration
public void AddIndicator(Indicator indicator)
Parameters
Declaration
public LineLevel AddLineLevel(double level, string lineName = "", Color lineColor = null, int lineWidth = 1, LineStyle lineStyle = default(LineStyle))
Parameters
Type |
Name |
Description |
System.Double |
level |
|
System.String |
lineName |
|
Color |
lineColor |
|
System.Int32 |
lineWidth |
|
LineStyle |
lineStyle |
|
Returns
Type |
Description |
TradingPlatform.BusinessLayer.LineLevel |
|
Declaration
public void AddLineLevel(LineLevel lineLevel)
Parameters
Type |
Name |
Description |
TradingPlatform.BusinessLayer.LineLevel |
lineLevel |
|
Declaration
public LineSeries AddLineSeries(string lineName = "", Color lineColor = null, int lineWidth = 1, LineStyle lineStyle = default(LineStyle))
Parameters
Type |
Name |
Description |
System.String |
lineName |
|
Color |
lineColor |
|
System.Int32 |
lineWidth |
|
LineStyle |
lineStyle |
|
Returns
Type |
Description |
TradingPlatform.BusinessLayer.LineSeries |
|
Declaration
public void AddLineSeries(LineSeries lineSeries)
Parameters
Type |
Name |
Description |
TradingPlatform.BusinessLayer.LineSeries |
lineSeries |
|
Declaration
protected double Ask(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
Returns
Type |
Description |
System.Double |
|
Marks cloud begin between two line series with specific color
Declaration
protected void BeginCloud(int line1Index, int line2Index, Color color, int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
line1Index |
First line series index
|
System.Int32 |
line2Index |
Second line series index
|
Color |
color |
Cloud color
|
System.Int32 |
offset |
Offset
|
Declaration
protected double Bid(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
Returns
Type |
Description |
System.Double |
|
Declaration
public void Calculate(HistoricalData historicalData)
Parameters
Declaration
Declaration
protected double Close(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
Returns
Type |
Description |
System.Double |
|
Marks cloud end between two line series with specific color
Declaration
protected void EndCloud(int line1Index, int line2Index, Color color, int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
line1Index |
First line series index
|
System.Int32 |
line2Index |
Second line series index
|
Color |
color |
Cloud color
|
System.Int32 |
offset |
Offset
|
Formatting price, using precision from assigned symbol or Digits value if specified
Declaration
public string FormatPrice(double price)
Parameters
Type |
Name |
Description |
System.Double |
price |
Price value
|
Returns
Type |
Description |
System.String |
|
Declaration
protected double FundingRate(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
|
Returns
Type |
Description |
System.Double |
|
Declaration
public IndicatorBarAppearance GetBarAppearance(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
|
Returns
Type |
Description |
TradingPlatform.BusinessLayer.IndicatorBarAppearance |
|
GetLineBreak(Int32, Int32, SeekOriginHistory)
Check if the point is a break point.
Declaration
public bool GetLineBreak(int offset = 0, int lineIndex = 0, SeekOriginHistory origin = SeekOriginHistory.End)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
System.Int32 |
lineIndex |
Index of indicator line
|
TradingPlatform.BusinessLayer.SeekOriginHistory |
origin |
Offset start point
|
Returns
Type |
Description |
System.Boolean |
|
Gets the price from historical data
Declaration
protected double GetPrice(PriceType priceType, int offset = 0)
Parameters
Type |
Name |
Description |
PriceType |
priceType |
|
System.Int32 |
offset |
|
Returns
Type |
Description |
System.Double |
|
GetValue(Int32, Int32, SeekOriginHistory)
Gets the value of indicator from internal buffer
Declaration
public double GetValue(int offset = 0, int lineIndex = 0, SeekOriginHistory origin = SeekOriginHistory.End)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
System.Int32 |
lineIndex |
Index of indicator line
|
TradingPlatform.BusinessLayer.SeekOriginHistory |
origin |
Offset start point
|
Returns
Type |
Description |
System.Double |
|
Declaration
protected VolumeAnalysisData GetVolumeAnalysisData(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
|
Returns
Declaration
protected double High(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
Returns
Type |
Description |
System.Double |
|
Declaration
Declaration
protected double Last(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
Returns
Type |
Description |
System.Double |
|
Declaration
protected double Low(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
Returns
Type |
Description |
System.Double |
|
Declaration
protected double Median(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
Returns
Type |
Description |
System.Double |
|
Declaration
protected virtual void OnClear()
Declaration
protected virtual void OnInit()
Declaration
public virtual void OnPaintChart(PaintChartEventArgs args)
Parameters
Declaration
protected override void OnSettingsUpdated()
Overrides
TradingPlatform.BusinessLayer.ExecutionEntity.OnSettingsUpdated()
Declaration
protected virtual bool OnTryGetMinMax(int fromOffset, int toOffset, out double min, out double max)
Parameters
Type |
Name |
Description |
System.Int32 |
fromOffset |
|
System.Int32 |
toOffset |
|
System.Double |
min |
|
System.Double |
max |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
protected virtual void OnUpdate(UpdateArgs args)
Parameters
Type |
Name |
Description |
TradingPlatform.BusinessLayer.UpdateArgs |
args |
|
Declaration
protected double Open(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
Returns
Type |
Description |
System.Double |
|
Declaration
protected double OpenInterest(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
|
Returns
Type |
Description |
System.Double |
|
Declaration
public void PaintChart(PaintChartEventArgs ev)
Parameters
Declaration
Declaration
public void RemoveIndicator(Indicator indicator)
Parameters
RemoveLineBreak(Int32, Int32, SeekOriginHistory)
Declaration
public void RemoveLineBreak(int offset = 0, int lineIndex = 0, SeekOriginHistory origin = SeekOriginHistory.End)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
System.Int32 |
lineIndex |
Index of indicator line
|
TradingPlatform.BusinessLayer.SeekOriginHistory |
origin |
Offset start point
|
Declaration
public void SetBarColor(Color? color = null, int offset = 0)
Parameters
Type |
Name |
Description |
System.Nullable<Color> |
color |
|
System.Int32 |
offset |
|
SetLineBreak(Int32, Int32, SeekOriginHistory)
Declaration
public void SetLineBreak(int offset = 0, int lineIndex = 0, SeekOriginHistory origin = SeekOriginHistory.End)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
System.Int32 |
lineIndex |
Index of indicator line
|
TradingPlatform.BusinessLayer.SeekOriginHistory |
origin |
Offset start point
|
Sets the value of indicator into internal buffer
Declaration
public void SetValue(double value, int lineIndex = 0, int offset = 0)
Parameters
Type |
Name |
Description |
System.Double |
value |
Value
|
System.Int32 |
lineIndex |
Index of indicator line
|
System.Int32 |
offset |
Offset value
|
Declaration
protected double Ticks(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
|
Returns
Type |
Description |
System.Double |
|
Declaration
protected DateTime Time(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
|
Returns
Type |
Description |
DateTime |
|
Declaration
public bool TryGetMinMax(int fromOffset, int toOffset, out double min, out double max)
Parameters
Type |
Name |
Description |
System.Int32 |
fromOffset |
|
System.Int32 |
toOffset |
|
System.Double |
min |
|
System.Double |
max |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
protected double Typical(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
Returns
Type |
Description |
System.Double |
|
Declaration
public void Update(UpdateArgs args)
Parameters
Type |
Name |
Description |
TradingPlatform.BusinessLayer.UpdateArgs |
args |
|
Declaration
protected double Volume(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
Returns
Type |
Description |
System.Double |
|
Declaration
protected double Weighted(int offset = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
Offset value
|
Returns
Type |
Description |
System.Double |
|