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
-
objectIndicatorDataProvider
- 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
tradingStatisticsProviderITradingStatisticsProviderThe trading statistics provider used by the indicator.
indicatorServiceProviderIIndicatorServiceProviderThe service provider the indicator looks registered services up in.
onlineDataProviderIOnlineDataProviderThe online data provider instance used by the indicator.
platformSettingsIPlatformSettingsThe global platform settings used by the indicator.
instrumentInfoIInstrumentInfoThe instrument information associated with the indicator's instrument.
tradingManagerITradingManagerThe trading manager used by the indicator.
candleCreatorICandleCreatorThe candle creator instance associated with the indicator.
chartInfoIChartThe 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
tradingStatisticsProviderITradingStatisticsProviderThe trading statistics provider used by the indicator.
indicatorServiceProviderIIndicatorServiceProviderThe service provider the indicator looks registered services up in.
onlineDataProviderIOnlineDataProviderThe online data provider instance used by the indicator.
platformSettingsIPlatformSettingsThe global platform settings used by the indicator.
instrumentInfoIInstrumentInfoThe instrument information associated with the indicator's instrument.
tradingManagerITradingManagerThe trading manager used by the indicator.
candleCreatorICandleCreatorThe candle creator instance associated with the indicator.
chartInfoIChartThe chart information associated with the indicator.
storageIIndicatorStorageThe 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
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
GlobalPlatformSettings
Gets or sets the global platform settings used by the indicator.
public IPlatformSettings GlobalPlatformSettings { get; }
Property Value
InstrumentInfo
Gets or sets the instrument information associated with the indicator's instrument.
public IInstrumentInfo InstrumentInfo { get; set; }
Property Value
InstrumentMarketDataProvider
Added in ATAS 8.0.15.
[Obfuscation(Exclude = true)]
public IInstrumentMarketDataProvider? InstrumentMarketDataProvider { get; set; }
Property Value
MarketDepthInfoProvider
Gets or sets the market depth information provider used by the indicator to access market depth data.
public MarketDepthInfoProvider MarketDepthInfoProvider { get; }
Property Value
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
OptionsDataProvider
Added in ATAS 8.0.15.
[Obfuscation(Exclude = true)]
public IOptionsDataProvider? OptionsDataProvider { get; set; }
Property Value
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
TradingManager
Gets the trading manager used by the indicator to manage trading-related tasks.
public ITradingManager TradingManager { get; }
Property Value
TradingStatisticsProvider
Gets the trading statistics provider used by the indicator to access trading-related statistics.
public ITradingStatisticsProvider TradingStatisticsProvider { get; }
Property Value
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
soundFilestringThe sound file to play for the alert.
instrumentstringThe instrument associated with the alert.
messagestringThe alert message.
backgroundColorThe background color of the alert.
foregroundColorThe foreground color of the alert.
timeDateTime?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
soundFilestringThe sound file to play for the alert.
instrumentstringThe instrument associated with the alert.
messagestringThe alert message.
backgroundColorThe background color of the alert.
foregroundColorThe foreground color of the alert.
timeDateTime?Exact time for alert; the current market time of the instrument when null.
showPopupboolWhether the alert also shows a popup notification.
DoActionInGuiThread(Action)
Executes the specified action on the GUI thread.
public void DoActionInGuiThread(Action action)
Parameters
actionActionThe 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
timeDateTimetimeFrameTimeSpan
Returns
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
TThe 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
prevTimeDateTimeThe previous time.
newTimeDateTimeThe new time.
Returns
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
prevTimeDateTimeThe previous time.
newTimeDateTimeThe new time.
Returns
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
prevTimeDateTimeThe previous time.
newTimeDateTimeThe new time.
Returns
ToString()
Returns the name of the indicator data provider.
public override string ToString()
Returns
- string
The name of the indicator data provider.