Show / Hide Table of Contents

    Class Indicator

    Base class for all indicators.

    Namespace: TradingPlatform.BusinessLayer
    Syntax
    public abstract class Indicator : ExecutionEntity, ICustomizable, IIndicatorsCollection

    Constructors

    Indicator()

    Declaration
    protected Indicator()

    Properties

    AllowFitAuto

    Specified, whether indicator should participate into price auto scale system.

    Declaration
    public bool AllowFitAuto { get; set; }
    Property Value
    Type Description
    System.Boolean

    Count

    Amount of items in internal buffers

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    CurrentChart

    Represent access to the chart, that created indicator

    Declaration
    public IChart CurrentChart { get; set; }
    Property Value
    Type Description
    IChart

    Digits

    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

    HelpLink

    Declaration
    public virtual string HelpLink { get; }
    Property Value
    Type Description
    System.String

    HistoricalData

    Represent access to current used historical data.

    Declaration
    public HistoricalData HistoricalData { get; }
    Property Value
    Type Description
    HistoricalData

    IsUpdateTypesSupported

    Declaration
    protected bool IsUpdateTypesSupported { get; set; }
    Property Value
    Type Description
    System.Boolean

    LinesLevels

    Declaration
    public LineLevel[] LinesLevels { get; }
    Property Value
    Type Description
    TradingPlatform.BusinessLayer.LineLevel[]

    LinesSeries

    Represent access indicator series

    Declaration
    public LineSeries[] LinesSeries { get; }
    Property Value
    Type Description
    TradingPlatform.BusinessLayer.LineSeries[]

    OnBackGround

    Specified, whether indicator should draw on chart background by default.

    Declaration
    public bool OnBackGround { get; set; }
    Property Value
    Type Description
    System.Boolean

    SeparateWindow

    Specified, whether indicator should use main or additional window on the chart

    Declaration
    public bool SeparateWindow { get; set; }
    Property Value
    Type Description
    System.Boolean

    Settings

    Indicator's settings

    Declaration
    public override IList<SettingItem> Settings { get; set; }
    Property Value
    Type Description
    IList<TradingPlatform.BusinessLayer.SettingItem>
    Overrides
    TradingPlatform.BusinessLayer.ExecutionEntity.Settings

    ShortName

    Short name of indicator

    Declaration
    public virtual string ShortName { get; protected set; }
    Property Value
    Type Description
    System.String

    SourceCodeLink

    Declaration
    public virtual string SourceCodeLink { get; }
    Property Value
    Type Description
    System.String

    Symbol

    Access to current Symbol of indicator

    Declaration
    public Symbol Symbol { get; }
    Property Value
    Type Description
    Symbol

    TFConfig

    Declaration
    public TimeFrameConfig TFConfig { get; }
    Property Value
    Type Description
    TradingPlatform.BusinessLayer.Utils.TimeFrameConfig

    UpdateType

    Declaration
    public IndicatorUpdateType UpdateType { get; set; }
    Property Value
    Type Description
    TradingPlatform.BusinessLayer.IndicatorUpdateType

    Methods

    AddIndicator(Indicator)

    Declaration
    public void AddIndicator(Indicator indicator)
    Parameters
    Type Name Description
    Indicator indicator

    AddLineLevel(Double, String, Color, Int32, LineStyle)

    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

    AddLineLevel(LineLevel)

    Declaration
    public void AddLineLevel(LineLevel lineLevel)
    Parameters
    Type Name Description
    TradingPlatform.BusinessLayer.LineLevel lineLevel

    AddLineSeries(String, Color, Int32, LineStyle)

    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

    AddLineSeries(LineSeries)

    Declaration
    public void AddLineSeries(LineSeries lineSeries)
    Parameters
    Type Name Description
    TradingPlatform.BusinessLayer.LineSeries lineSeries

    Ask(Int32)

    Get Ask price

    Declaration
    protected double Ask(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset value

    Returns
    Type Description
    System.Double

    BeginCloud(Int32, Int32, Color, Int32)

    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

    Bid(Int32)

    Get Bid price

    Declaration
    protected double Bid(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset value

    Returns
    Type Description
    System.Double

    Calculate(HistoricalData)

    Declaration
    public void Calculate(HistoricalData historicalData)
    Parameters
    Type Name Description
    HistoricalData historicalData

    Clear()

    Declaration
    public void Clear()

    Close(Int32)

    Get Close price

    Declaration
    protected double Close(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset value

    Returns
    Type Description
    System.Double

    EndCloud(Int32, Int32, Color, Int32)

    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

    FormatPrice(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

    FundingRate(Int32)

    Declaration
    protected double FundingRate(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset
    Returns
    Type Description
    System.Double

    GetBarAppearance(Int32)

    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

    GetPrice(PriceType, Int32)

    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

    GetVolumeAnalysisData(Int32)

    Declaration
    protected VolumeAnalysisData GetVolumeAnalysisData(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset
    Returns
    Type Description
    VolumeAnalysisData

    High(Int32)

    Get High price

    Declaration
    protected double High(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset value

    Returns
    Type Description
    System.Double

    Init()

    Declaration
    public void Init()

    Last(Int32)

    Get Last price

    Declaration
    protected double Last(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset value

    Returns
    Type Description
    System.Double

    Low(Int32)

    Get Low price

    Declaration
    protected double Low(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset value

    Returns
    Type Description
    System.Double

    Median(Int32)

    Get Median price

    Declaration
    protected double Median(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset value

    Returns
    Type Description
    System.Double

    OnClear()

    Declaration
    protected virtual void OnClear()

    OnInit()

    Declaration
    protected virtual void OnInit()

    OnPaintChart(PaintChartEventArgs)

    Declaration
    public virtual void OnPaintChart(PaintChartEventArgs args)
    Parameters
    Type Name Description
    PaintChartEventArgs args

    OnSettingsUpdated()

    Declaration
    protected override void OnSettingsUpdated()
    Overrides
    TradingPlatform.BusinessLayer.ExecutionEntity.OnSettingsUpdated()

    OnTryGetMinMax(Int32, Int32, out Double, out Double)

    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

    OnUpdate(UpdateArgs)

    Declaration
    protected virtual void OnUpdate(UpdateArgs args)
    Parameters
    Type Name Description
    TradingPlatform.BusinessLayer.UpdateArgs args

    Open(Int32)

    Get Open price

    Declaration
    protected double Open(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset value

    Returns
    Type Description
    System.Double

    OpenInterest(Int32)

    Declaration
    protected double OpenInterest(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset
    Returns
    Type Description
    System.Double

    PaintChart(PaintChartEventArgs)

    Declaration
    public void PaintChart(PaintChartEventArgs ev)
    Parameters
    Type Name Description
    PaintChartEventArgs ev

    Refresh()

    Recalculate indicator

    Declaration
    public void Refresh()

    RemoveIndicator(Indicator)

    Declaration
    public void RemoveIndicator(Indicator indicator)
    Parameters
    Type Name Description
    Indicator indicator

    RemoveLineBreak(Int32, Int32, SeekOriginHistory)

    Remove line break point.

    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

    SetBarColor(Nullable<Color>, Int32)

    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)

    Set line break point.

    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

    SetValue(Double, Int32, Int32)

    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

    Ticks(Int32)

    Declaration
    protected double Ticks(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset
    Returns
    Type Description
    System.Double

    Time(Int32)

    Declaration
    protected DateTime Time(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset
    Returns
    Type Description
    DateTime

    TryGetMinMax(Int32, Int32, out Double, out Double)

    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

    Typical(Int32)

    Get Typical price

    Declaration
    protected double Typical(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset value

    Returns
    Type Description
    System.Double

    Update(UpdateArgs)

    Declaration
    public void Update(UpdateArgs args)
    Parameters
    Type Name Description
    TradingPlatform.BusinessLayer.UpdateArgs args

    Volume(Int32)

    Get Volume

    Declaration
    protected double Volume(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset value

    Returns
    Type Description
    System.Double

    Weighted(Int32)

    Get Weighted price

    Declaration
    protected double Weighted(int offset = 0)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset value

    Returns
    Type Description
    System.Double
    Back to top Copyright QUANTOWER LLC. © 2017-2021. All rights reserved.