Class Indicator
Base class for all indicators.
public abstract class Indicator : ExecutionEntity, IModule, IDisposable, ICustomizable, IIndicatorsCollection
Constructors
Declaration
Properties
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 |
|
Represent access to current used historical data.
Declaration
public HistoricalData HistoricalData { get; }
Property Value
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 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 |
System.Collections.Generic.IList<TradingPlatform.BusinessLayer.SettingItem> |
|
Overrides
TradingPlatform.BusinessLayer.ExecutionEntity.Settings
Declaration
public string ShortName { get; protected set; }
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 |
|
Methods
Declaration
public void AddIndicator(Indicator indicator)
Parameters
Declaration
public void AddLineLevel(double level, string lineName = "", Color lineColor = default(Color), int lineWidth = 1, LineStyle lineStyle = LineStyle.Solid)
Parameters
Type |
Name |
Description |
System.Double |
level |
|
System.String |
lineName |
|
System.Drawing.Color |
lineColor |
|
System.Int32 |
lineWidth |
|
LineStyle |
lineStyle |
|
Declaration
public void AddLineLevel(LineLevel lineLevel)
Parameters
Type |
Name |
Description |
TradingPlatform.BusinessLayer.LineLevel |
lineLevel |
|
Declaration
public void AddLineSeries(string lineName = "", Color lineColor = default(Color), int lineWidth = 1, LineStyle lineStyle = LineStyle.Solid)
Parameters
Type |
Name |
Description |
System.String |
lineName |
|
System.Drawing.Color |
lineColor |
|
System.Int32 |
lineWidth |
|
LineStyle |
lineStyle |
|
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 |
|
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 |
|
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 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 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 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
public void PaintChart(PaintChartEventArgs ev)
Parameters
Declaration
Declaration
public void RemoveIndicator(Indicator indicator)
Parameters
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 |
System.DateTime |
|
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 |
|