Table of Contents

Class IndicatorDataProvider

Namespace
ATAS.Indicators
Assembly
ATAS.Indicators.dll

Implementation of the IIndicatorDataProvider interface that provides access to various data and services related to an indicator.

public class IndicatorDataProvider : IIndicatorDataProvider
Inheritance
object
IndicatorDataProvider
Implements
Extension Methods

Constructors

IndicatorDataProvider(ITradingStatisticsProvider, IIndicatorServiceProvider, IOnlineDataProvider, IPlatformSettings, IInstrumentInfo, ITradingManager, ICandleCreator, IChart)

Initializes a new instance of the IndicatorDataProvider class.

Added in ATAS 8.0.15.

public IndicatorDataProvider(ITradingStatisticsProvider tradingStatisticsProvider, IIndicatorServiceProvider indicatorServiceProvider, IOnlineDataProvider onlineDataProvider, IPlatformSettings platformSettings, IInstrumentInfo instrumentInfo, ITradingManager tradingManager, ICandleCreator candleCreator, IChart chartInfo)

Parameters

tradingStatisticsProvider ITradingStatisticsProvider

The trading statistics provider used by the indicator.

indicatorServiceProvider IIndicatorServiceProvider

The service provider the indicator looks registered services up in.

onlineDataProvider IOnlineDataProvider

The online data provider instance used by the indicator.

platformSettings IPlatformSettings

The global platform settings used by the indicator.

instrumentInfo IInstrumentInfo

The instrument information associated with the indicator's instrument.

tradingManager ITradingManager

The trading manager used by the indicator.

candleCreator ICandleCreator

The candle creator instance associated with the indicator.

chartInfo IChart

The chart information associated with the indicator.

IndicatorDataProvider(ITradingStatisticsProvider, IIndicatorServiceProvider, IOnlineDataProvider, IPlatformSettings, IInstrumentInfo, ITradingManager, ICandleCreator, IChart, IIndicatorStorage)

Initializes a new instance of the IndicatorDataProvider class.

Not in ATAS 8.0.15 yet: available from the next version.

public IndicatorDataProvider(ITradingStatisticsProvider tradingStatisticsProvider, IIndicatorServiceProvider indicatorServiceProvider, IOnlineDataProvider onlineDataProvider, IPlatformSettings platformSettings, IInstrumentInfo instrumentInfo, ITradingManager tradingManager, ICandleCreator candleCreator, IChart chartInfo, IIndicatorStorage storage)

Parameters

tradingStatisticsProvider ITradingStatisticsProvider

The trading statistics provider used by the indicator.

indicatorServiceProvider IIndicatorServiceProvider

The service provider the indicator looks registered services up in.

onlineDataProvider IOnlineDataProvider

The online data provider instance used by the indicator.

platformSettings IPlatformSettings

The global platform settings used by the indicator.

instrumentInfo IInstrumentInfo

The instrument information associated with the indicator's instrument.

tradingManager ITradingManager

The trading manager used by the indicator.

candleCreator ICandleCreator

The candle creator instance associated with the indicator.

chartInfo IChart

The chart information associated with the indicator.

storage IIndicatorStorage

The path-free storage capability scoped to the indicator.

Fields

CandlesPanel

Represents the name of the candles panel on the chart.

public const string CandlesPanel = "Chart"

Field Value

string

NewPanel

Represents the name of a new panel.

public const string NewPanel = "NewPanel"

Field Value

string

OnNewGuiActionRequested

Gets or sets the action to request a new GUI action.

Added in ATAS 8.0.15.

public Action<Action>? OnNewGuiActionRequested

Field Value

Action<Action>

Properties

CandlesDataProvider

Added in ATAS 8.0.15.

[Obfuscation(Exclude = true)]
public ICandlesDataProvider? CandlesDataProvider { get; set; }

Property Value

ICandlesDataProvider

CandlesDataSeries

Gets or sets the collection of candle part series used by the indicator.

public ObservableCollection<CandlePartSeries> CandlesDataSeries { get; }

Property Value

ObservableCollection<CandlePartSeries>

ChartInfo

Gets the chart information associated with the indicator.

public IChart ChartInfo { get; }

Property Value

IChart

GlobalPlatformSettings

Gets or sets the global platform settings used by the indicator.

public IPlatformSettings GlobalPlatformSettings { get; }

Property Value

IPlatformSettings

InstrumentInfo

Gets or sets the instrument information associated with the indicator's instrument.

public IInstrumentInfo InstrumentInfo { get; set; }

Property Value

IInstrumentInfo

InstrumentMarketDataProvider

Added in ATAS 8.0.15.

[Obfuscation(Exclude = true)]
public IInstrumentMarketDataProvider? InstrumentMarketDataProvider { get; set; }

Property Value

IInstrumentMarketDataProvider

MarketDepthInfoProvider

Gets or sets the market depth information provider used by the indicator to access market depth data.

public MarketDepthInfoProvider MarketDepthInfoProvider { get; }

Property Value

MarketDepthInfoProvider

Name

Gets or sets the name of the indicator data provider.

public string Name { get; }

Property Value

string

OnlineDataProvider

Gets or sets the online data provider used by the indicator to fetch real-time data.

public IOnlineDataProvider OnlineDataProvider { get; }

Property Value

IOnlineDataProvider

OptionsDataProvider

Added in ATAS 8.0.15.

[Obfuscation(Exclude = true)]
public IOptionsDataProvider? OptionsDataProvider { get; set; }

Property Value

IOptionsDataProvider

Panels

Gets or sets the collection of panels associated with the indicator.

public ObservableCollection<string> Panels { get; }

Property Value

ObservableCollection<string>

Storage

Not in ATAS 8.0.15 yet: available from the next version.

[Obfuscation(Exclude = true)]
public IIndicatorStorage Storage { get; }

Property Value

IIndicatorStorage

TradingManager

Gets the trading manager used by the indicator to manage trading-related tasks.

public ITradingManager TradingManager { get; }

Property Value

ITradingManager

TradingStatisticsProvider

Gets the trading statistics provider used by the indicator to access trading-related statistics.

public ITradingStatisticsProvider TradingStatisticsProvider { get; }

Property Value

ITradingStatisticsProvider

Methods

AddAlert(string, string, string, Color, Color, DateTime?)

Added in ATAS 8.0.15.

public void AddAlert(string soundFile, string instrument, string message, Color background, Color foreground, DateTime? time = null)

Parameters

soundFile string

The sound file to play for the alert.

instrument string

The instrument associated with the alert.

message string

The alert message.

background Color

The background color of the alert.

foreground Color

The foreground color of the alert.

time DateTime?

Exact time for alert

AddAlert(string, string, string, Color, Color, DateTime?, bool)

Not in ATAS 8.0.15 yet: available from the next version.

public void AddAlert(string soundFile, string instrument, string message, Color background, Color foreground, DateTime? time, bool showPopup)

Parameters

soundFile string

The sound file to play for the alert.

instrument string

The instrument associated with the alert.

message string

The alert message.

background Color

The background color of the alert.

foreground Color

The foreground color of the alert.

time DateTime?

Exact time for alert; the current market time of the instrument when null.

showPopup bool

Whether the alert also shows a popup notification.

DoActionInGuiThread(Action)

Executes the specified action on the GUI thread.

public void DoActionInGuiThread(Action action)

Parameters

action Action

The action to execute on the GUI thread.

GetCustomStartTime(DateTime, TimeSpan)

Gets custom candle begin time with specified timeframe and current time

public DateTime GetCustomStartTime(DateTime time, TimeSpan timeFrame)

Parameters

time DateTime
timeFrame TimeSpan

Returns

DateTime

true if a new trading session has started; otherwise, false.

GetService<T>()

Gets a service registered for indicators by the host, delegating to the IIndicatorServiceProvider passed to the constructor.

Added in ATAS 8.0.15.

public T GetService<T>()

Returns

T

The instance of the service.

Type Parameters

T

The type of the service.

Exceptions

NotSupportedException

The host does not register a service of type T.

IsNewMonth(DateTime, DateTime)

Checks whether a new trading month has started between the specified previous time and new time.

public bool IsNewMonth(DateTime prevTime, DateTime newTime)

Parameters

prevTime DateTime

The previous time.

newTime DateTime

The new time.

Returns

bool

true if a new trading month has started; otherwise, false.

IsNewSession(DateTime, DateTime)

Checks whether a new trading session has started between the specified previous time and new time.

public bool IsNewSession(DateTime prevTime, DateTime newTime)

Parameters

prevTime DateTime

The previous time.

newTime DateTime

The new time.

Returns

bool

true if a new trading session has started; otherwise, false.

IsNewWeek(DateTime, DateTime)

Checks whether a new trading week has started between the specified previous time and new time.

public bool IsNewWeek(DateTime prevTime, DateTime newTime)

Parameters

prevTime DateTime

The previous time.

newTime DateTime

The new time.

Returns

bool

true if a new trading week has started; otherwise, false.

ToString()

Returns the name of the indicator data provider.

public override string ToString()

Returns

string

The name of the indicator data provider.