ATAS
Loading...
Searching...
No Matches
ATAS.Indicators.ExtendedIndicator Class Reference

An extended base class for custom indicators that provide additional functionality for drawing, alerts, market data handling, etc. More...

Inheritance diagram for ATAS.Indicators.ExtendedIndicator:
[legend]
Collaboration diagram for ATAS.Indicators.ExtendedIndicator:
[legend]

Public Member Functions

void Draw (RenderContext context, DrawingLayouts layout)
 
override void Dispose ()
 
void ApplyDefaultColors ()
 Applies default colors to the drawing elements.
 
void SubscribeToTimer (TimeSpan period, Action callback)
 Registers the callback and periodically calls it with specified period.
Parameters
periodA period of market data time used to repeatedly invoke the callback.
callbackA method that is called each time a specified period of market data time passes.

 
void UnsubscribeFromTimer (TimeSpan period, Action callback)
 Unregister the callback from periodic invocations.
Parameters
periodSubscribed period of invocations.
callbackA method to be unregistered.

 
- Public Member Functions inherited from ATAS.Indicators.BaseIndicator
virtual void Dispose ()
 
override string ToString ()
 Converts the current instance of the indicator to its string representation.
 
- Public Member Functions inherited from ATAS.Indicators.ChartObject
virtual bool ProcessMouseClick (RenderControlMouseEventArgs e)
 Processes a mouse click event on the chart object.
 
virtual bool ProcessMouseWheel (int delta)
 Processes a mouse wheel event on the chart object.
 
virtual bool ProcessMouseDown (RenderControlMouseEventArgs e)
 Processes a mouse down event on the chart object.
 
virtual bool ProcessMouseUp (RenderControlMouseEventArgs e)
 Processes a mouse up event on the chart object.
 
virtual bool ProcessMouseMove (RenderControlMouseEventArgs e)
 Processes a mouse move event on the chart object.
 
virtual bool ProcessMouseDoubleClick (RenderControlMouseEventArgs e)
 Processes a mouse double click event on the chart object.
 
virtual StdCursor GetCursor (RenderControlMouseEventArgs e)
 Gets the cursor to display when the mouse is over the chart object.
 
virtual bool ProcessKeyDown (CrossKeyEventArgs e)
 Processes a key down event on the chart object.
 
virtual bool ProcessKeyUp (CrossKeyEventArgs e)
 Processes a key up event on the chart object.
 
void SubscribeToTimer (TimeSpan period, Action callback)
 Registers the callback and periodically calls it with specified period.
 
void UnsubscribeFromTimer (TimeSpan period, Action callback)
 Unregister the callback from periodic invocations.
 

Protected Member Functions

 ExtendedIndicator (bool useCandles=false)
 
virtual void OnContainerChanged (IIndicatorContainer container)
 This method is called when the value of the Container property changes.
 
virtual void OnDataProviderChanged (IIndicatorDataProvider oldDataProvider, IIndicatorDataProvider newDataProvider)
 This method is called when the value of the DataProvider property changes.
 
virtual void OnPortfolioChanged (Portfolio portfolio)
 This method is called when the value of the Portfolio changes.
 
virtual void OnPositionChanged (Position position)
 This method is called when the value of the Position changes.
 
virtual void OnNewOrder (Order order)
 This method is called when a new order is received.
 
virtual void OnOrderChanged (Order order)
 Called when an existing order is modified (changed).
 
virtual void OnNewMyTrade (MyTrade myTrade)
 Called when a new trade executed by the indicator's own strategy is received.
 
virtual void OnOrderRegisterFailed (Order order, string message)
 Called when an attempt to register (place) a new order fails.
 
virtual void OnOrderCancelFailed (Order order, string message)
 Called when an attempt to cancel an existing order fails.
 
virtual void OnOrderModifyFailed (Order order, Order newOrder, string error)
 Called when an attempt to modify an existing order fails.
 
virtual void OnRender (RenderContext context, DrawingLayouts layout)
 Override this method for implementing your own data rendering logic.
 
void SubscribeToDrawingEvents (DrawingLayouts flags)
 Method for specifying the list of layouts in which rendering will be performed.
 
void RedrawChart (RedrawArg? redrawArg=null)
 Call to redraw chart.
 
void AddAlert (string soundFile, string instrument, string message, CrossColor background, CrossColor foreground)
 Adds an alert for a specific instrument with custom properties.
 
void AddAlert (string soundFile, string message)
 Adds an alert with the specified sound file and message to the chart.
 
DrawingText AddText (string tag, string text, bool isAbovePrice, int bar, decimal price, int yOffset, int xOffset, Color textColor, Color outlineColor, Color fillColor, float fontSize, DrawingText.TextAlign align, bool autoSize=false)
 Adds a drawing text element to the chart at the specified position.
 
override void RecalculateValues ()
 Recalculate the indicator values on each bar.
 
IndicatorCandle GetCandle (int bar)
 Gets the IndicatorCandle object at the specified bar index.
 
override void Calculate (int bar, decimal value)
 Performs the calculation for the indicator at the specified bar and value.
Parameters
barThe bar number for which the calculation is performed.
valueThe input value from the data series at the specified bar.

 
virtual void OnNewTrades (IEnumerable< MarketDataArg > trades)
 Handles a collection of new trade data represented by MarketDataArg objects.
 
virtual void OnNewTrade (MarketDataArg trade)
 Handles an individual trade represented by a MarketDataArg object.
 
virtual void OnBestBidAskChanged (MarketDataArg depth)
 Handles changes in the best bid or ask prices in the market depth represented by a MarketDataArg object.
 
virtual void MarketDepthsChanged (IEnumerable< MarketDataArg > depths)
 Handles changes in multiple market depths represented by an IEnumerable<MarketDataArg>.
 
virtual void MarketDepthChanged (MarketDataArg depth)
 Handles changes in a single market depth represented by a MarketDataArg object.
 
virtual void OnCumulativeTrade (CumulativeTrade trade)
 Handles a cumulative trade event represented by a CumulativeTrade object.
 
virtual void OnUpdateCumulativeTrade (CumulativeTrade trade)
 Handles an update event for a cumulative trade represented by a CumulativeTrade object.
 
virtual void OnCumulativeTradesResponse (CumulativeTradesRequest request, IEnumerable< CumulativeTrade > cumulativeTrades)
 Called when a response for a cumulative trades request is received.
 
void RequestForCumulativeTrades (CumulativeTradesRequest request)
 Sends a request for cumulative trades data to the online data provider.
 
virtual void OnFixedProfilesResponse (IndicatorCandle fixedProfile, FixedProfilePeriods period)
 
virtual void OnFixedProfilesResponse (IndicatorCandle fixedProfileScaled, IndicatorCandle fixedProfileOriginScale, FixedProfilePeriods period)
 This method is called when the online data provider responds with fixed profile data. Override this method in derived classes to handle the received fixed profile data.
 
void GetFixedProfile (FixedProfileRequest request)
 Requests fixed profile data from the online data provider.
 
async Task< FixedProfileResponse?> RequestFixedProfileAsync (FixedProfileRequest request)
 Asynchronously requests a fixed market profile parameterized with FixedProfileRequest.
 
Task SubscribeMarketByOrderData ()
 Subscribes to the market by order data.
 
ITradesCache GetTradesCache (TimeSpan period)
 Returns a trades cache.
 
IMarketByOrdersCache GetMarketByOrdersCache (TimeSpan period)
 Returns a market by order data cache.
 
IMarketByOrdersWithTradesCache GetMarketByOrdersWithTradesCache (TimeSpan period)
 Returns a market by order data and trades cache.
 
virtual void OnMarketByOrdersChanged (IEnumerable< MarketByOrder > values)
 Handles a collection of market by order data represented by MarketByOrder objects.
 
virtual void OnApplyDefaultColors ()
 Invoked to apply default colors to the drawing elements.
 
- Protected Member Functions inherited from ATAS.Indicators.BaseIndicator
 BaseIndicator (bool useCandles=false)
 
virtual void RecalculateValues ()
 Recalculate the indicator values on each bar.
 
virtual void OnInitialize ()
 The method is executed before the first calculation.
 
virtual void OnRecalculate ()
 The method is executed before a new calculation.
 
virtual void OnFinishRecalculate ()
 The method is executed after the end of the calculation.
 
virtual void Calculate (int bar, decimal value)
 Performs the calculation for the indicator at the specified bar and value.
 
abstract void OnCalculate (int bar, decimal value)
 The main indicator calculation method is called for each bar on the history, then it is called on each tick.
 
void Add (Indicator indicator)
 Adds an indicator to the list of used indicators by this indicator.
 
void Clear ()
 Clear all data series.
 
virtual void OnSourceChanged ()
 This method is called when the SourceDataSeries property is changed.
 
void RaisePropertyChanged (string propertyName)
 Raises the PropertyChanged event for the specified property name.
 
void RaisePropertyChanged (object sender, PropertyChangedEventArgs e)
 Raises the PropertyChanged event with the specified event arguments.
 
void RaisePanelPropertyChanged (string name)
 Raises the PanelPropertyChanged event with the specified property name.
 
void RaiseBarValueChanged (int bar)
 Raises the BarValueChanged event with the specified bar value.
 
virtual void OnDispose ()
 Called when the indicator is being disposed.
 
override void OnVisibleChanged ()
 Called when the Visible property changes.
 
- Protected Member Functions inherited from ATAS.Indicators.ChartObject
virtual void OnVisibleChanged ()
 Called when the Visible property changes.
 
virtual void LockedOnChanged ()
 Called when the Locked property changes.
 
- Protected Member Functions inherited from ATAS.Indicators.Filters.TrackedPropertyBase
void SetProperty< TProperty > (ref TProperty store, TProperty value, Action onChanged=null, Func< TProperty, bool > onChanging=null, [CallerMemberName] string propertyName="")
 Sets the value of a property and notifies subscribers if the value has changed.
 
void SetTrackedProperty< TProperty > (ref TProperty store, TProperty value, Action< string > onChanged=null, [CallerMemberName] string propertyName="")
 Sets the value of a property that implements the INotifyPropertyChanged interface and notifies subscribers if the value has changed.
 
virtual void OnChangeProperty ([CallerMemberName] string propertyName="")
 Notifies subscribers when a property value changes.
 

Properties

bool FullScreenMode [get, set]
 Gets or sets full screen mode for the indicator. Could be applied only to the vertical indicators('IsVerticalIndicator = true')
 
bool DenyToChangePanel [get, set]
 Gets or sets a value indicating whether changing the indicator's panel is denied. For vertical indicators, it is always denied.
 
bool DrawAbovePrice [get, set]
 Gets or sets a value indicating whether custom painting should be performed on top of rendered bars.
 
bool EnableCustomDrawing [get, protected set]
 Gets or sets a value indicating whether custom drawing is enabled for the indicator.
 
bool ShowDescription [get, set]
 Gets or sets a value indicating whether the description of the indicator should be shown.
 
IIndicatorContainerContainer [get, set]
 Gets or sets the container in which the indicator is hosted.
 
IIndicatorDataProviderDataProvider [get, set]
 Gets or sets the data provider for the indicator.
 
List< LineTillTouchHorizontalLinesTillTouch = new() [get]
 Gets the collection of horizontal lines used to track touch points on the chart.
 
List< TrendLineTrendLines = new() [get]
 Gets the collection of trend lines on the chart.
 
List< DrawingRectangleRectangles = new() [get]
 Gets the collection of rectangles on the chart.
 
SyncDictionary< string, DrawingTextLabels = new() [get, set]
 Gets or sets the collection of named drawing text elements.
 
IEnumerable< MarketByOrderMarketByOrders [get]
 Gets a snapshot of the current market by order data.
 
DateTime MarketTime [get]
 Current market time.
 
DateTime UtcTime [get]
 Current UTC time.
 
- Properties inherited from ATAS.Indicators.BaseIndicator
static ? PerformanceDiagnoser PerformanceDiagnoser [get]
 Indicator performance tracker.
 
static bool UseProfiling [get, set]
 Set to true to measure the performance of all indicators.
 
string Name [get, set]
 Name of the indicator.
 
bool IsDisposed [get, set]
 Gets or sets a value indicating whether the indicator object has been disposed of.
 
List< IDataSeriesDataSeries [get]
 List of data series used by the indicator.
 
List< LineSeriesLineSeries [get]
 List of line series used by the indicator.
 
string Panel [get, set]
 The name of the panel where the indicator is placed.
 
bool IsVerticalIndicator [get, set]
 Gets or sets a value indicating whether the indicator is intended to be displayed as a vertical indicator.
 
bool UseCandles [get]
 Gets a value indicating whether the indicator uses candle data series.
 
int CurrentBar [get]
 Bars number. All bars and the values of the corresponding data series have a serial number. The earliest bar of the chart is assigned the number 0; the next bar is assigned the number 1, and so on.
 
IDataSeries< decimal >? SourceDataSeries [get, set]
 Gets or sets the data series used as the source for the indicator's calculations.
 
decimal this[int index] [get, protected set]
 Gets or sets the value of the first data series of the indicator at the specified index.
 
- Properties inherited from ATAS.Indicators.ChartObject
bool Visible [get, set]
 Gets or sets a value indicating whether the chart object is visible.
 
bool Locked [get, set]
 Gets or sets a value indicating whether the chart object is locked.
 
bool AllowedInteraction [get]
 Gets a value indicating whether interaction with the chart object is allowed.
 
- Properties inherited from ATAS.Indicators.IMarketTimeProvider
DateTime MarketTime [get]
 Current market time.
 
DateTime UtcTime [get]
 Current UTC time.
 

Additional Inherited Members

- Static Protected Member Functions inherited from ATAS.Indicators.BaseIndicator
static PerfCounter MeasurePerformance (string name)
 Measures the performance of a specific operation with the given name. If a performance diagnoser is available, it will be used to measure the performance; otherwise, a default performance counter will be returned.
 
- Protected Attributes inherited from ATAS.Indicators.BaseIndicator
readonly List< IndicatorUsedIndicators = new()
 The list of indicators that are being used by this indicator.
 
- Events inherited from ATAS.Indicators.BaseIndicator
PropertyChangedEventHandler PropertyChanged
 
PropertyChangedEventHandler PanelPropertyChanged
 
Action< int > BarValueChanged
 Event that is raised when the value of a bar in the indicator changes.
 
- Events inherited from ATAS.Indicators.Filters.TrackedPropertyBase
PropertyChangedEventHandler PropertyChanged
 
- Events inherited from ATAS.Indicators.INotifyPanelPropertyChanged
PropertyChangedEventHandler PanelPropertyChanged
 Occurs when a panel property value changes.
 

Detailed Description

An extended base class for custom indicators that provide additional functionality for drawing, alerts, market data handling, etc.

Constructor & Destructor Documentation

◆ ExtendedIndicator()

ATAS.Indicators.ExtendedIndicator.ExtendedIndicator ( bool  useCandles = false)
protected

Member Function Documentation

◆ AddAlert() [1/2]

void ATAS.Indicators.ExtendedIndicator.AddAlert ( string  soundFile,
string  instrument,
string  message,
CrossColor  background,
CrossColor  foreground 
)
protected

Adds an alert for a specific instrument with custom properties.

Parameters
soundFileThe file path or name of the sound file to be played for the alert.
instrumentThe name of the instrument or symbol associated with the alert.
messageThe message or description of the alert.
backgroundThe background color to be used for the alert visualization.
foregroundThe foreground color to be used for the alert visualization.

◆ AddAlert() [2/2]

void ATAS.Indicators.ExtendedIndicator.AddAlert ( string  soundFile,
string  message 
)
protected

Adds an alert with the specified sound file and message to the chart.

Parameters
soundFileThe file path of the sound to be played when the alert is triggered.
messageThe message to be displayed in the alert.

◆ AddText()

DrawingText ATAS.Indicators.ExtendedIndicator.AddText ( string  tag,
string  text,
bool  isAbovePrice,
int  bar,
decimal  price,
int  yOffset,
int  xOffset,
Color  textColor,
Color  outlineColor,
Color  fillColor,
float  fontSize,
DrawingText::TextAlign  align,
bool  autoSize = false 
)
protected

Adds a drawing text element to the chart at the specified position.

Parameters
tagA unique tag or identifier for the text element.
textThe actual text to be displayed.
isAbovePriceA boolean flag indicating whether the text should be displayed above the price or not.
barThe index of the bar where the text should be displayed.
priceThe price at which the text should be displayed.
yOffsetThe vertical offset of the text from its default position.
xOffsetThe horizontal offset of the text from its default position.
textColorThe color of the text.
outlineColorThe color used for the outline of the text.
fillColorThe fill color of the text background.
fontSizeThe font size of the text.
alignThe text alignment within its bounding box.
autoSizeA boolean flag indicating whether the text should be auto-sized or not.
Returns
The created DrawingText object.

◆ ApplyDefaultColors()

void ATAS.Indicators.ExtendedIndicator.ApplyDefaultColors ( )

Applies default colors to the drawing elements.

This method triggers the OnApplyDefaultColors virtual method, which can be overridden in derived classes to customize the default color settings for the drawing elements.

◆ Calculate()

override void ATAS.Indicators.ExtendedIndicator.Calculate ( int  bar,
decimal  value 
)
protectedvirtual

Performs the calculation for the indicator at the specified bar and value.

Parameters
barThe bar number for which the calculation is performed.
valueThe input value from the data series at the specified bar.

Reimplemented from ATAS.Indicators.BaseIndicator.

◆ Dispose()

override void ATAS.Indicators.ExtendedIndicator.Dispose ( )
virtual

Reimplemented from ATAS.Indicators.BaseIndicator.

◆ Draw()

void ATAS.Indicators.ExtendedIndicator.Draw ( RenderContext  context,
DrawingLayouts  layout 
)

◆ GetCandle()

IndicatorCandle ATAS.Indicators.ExtendedIndicator.GetCandle ( int  bar)
protected

Gets the IndicatorCandle object at the specified bar index.

Parameters
barThe index of the bar for which to retrieve the IndicatorCandle.
Returns
The IndicatorCandle object at the specified bar index.

◆ GetFixedProfile()

void ATAS.Indicators.ExtendedIndicator.GetFixedProfile ( FixedProfileRequest  request)
protected

Requests fixed profile data from the online data provider.

Parameters
requestThe request object containing information about the fixed profile data to be fetched.

◆ GetMarketByOrdersCache()

IMarketByOrdersCache ATAS.Indicators.ExtendedIndicator.GetMarketByOrdersCache ( TimeSpan  period)
protected

Returns a market by order data cache.

Parameters
periodSpecifies the time period for which Market-by-Order updates are stored in IMarketByOrdersCache.
Returns
The IMarketByOrdersCache object representing the current state and allowing to receive real-time updates.

◆ GetMarketByOrdersWithTradesCache()

IMarketByOrdersWithTradesCache ATAS.Indicators.ExtendedIndicator.GetMarketByOrdersWithTradesCache ( TimeSpan  period)
protected

Returns a market by order data and trades cache.

Parameters
periodSpecifies the time period for which trades are stored in IMarketByOrdersWithTradesCache.
Returns
The IMarketByOrdersWithTradesCache object representing the cache.

◆ GetTradesCache()

ITradesCache ATAS.Indicators.ExtendedIndicator.GetTradesCache ( TimeSpan  period)
protected

Returns a trades cache.

Parameters
periodSpecifies the time period for which trades are stored in ITradesCache.
Returns
The ITradesCache object representing the trades cache.

◆ MarketDepthChanged()

virtual void ATAS.Indicators.ExtendedIndicator.MarketDepthChanged ( MarketDataArg  depth)
protectedvirtual

Handles changes in a single market depth represented by a MarketDataArg object.

Parameters
depthThe MarketDataArg representing the market depth data.

◆ MarketDepthsChanged()

virtual void ATAS.Indicators.ExtendedIndicator.MarketDepthsChanged ( IEnumerable< MarketDataArg depths)
protectedvirtual

Handles changes in multiple market depths represented by an IEnumerable<MarketDataArg>.

Parameters
depthsThe collection of MarketDataArg representing the market depth data.

◆ OnApplyDefaultColors()

virtual void ATAS.Indicators.ExtendedIndicator.OnApplyDefaultColors ( )
protectedvirtual

Invoked to apply default colors to the drawing elements.

This method can be overridden in derived classes to customize or set default color values for the drawing elements. When this method is called, it is an opportunity for the derived class to apply its own default color scheme to the drawing elements used in the specific implementation.

Reimplemented in ATAS.Indicators.Indicator.

◆ OnBestBidAskChanged()

virtual void ATAS.Indicators.ExtendedIndicator.OnBestBidAskChanged ( MarketDataArg  depth)
protectedvirtual

Handles changes in the best bid or ask prices in the market depth represented by a MarketDataArg object.

Parameters
depthThe MarketDataArg representing the market depth data.

Reimplemented in ATAS.Strategies.Chart.ChartStrategy.

◆ OnContainerChanged()

virtual void ATAS.Indicators.ExtendedIndicator.OnContainerChanged ( IIndicatorContainer  container)
protectedvirtual

This method is called when the value of the Container property changes.

Parameters
containerThe new value of the IIndicatorContainer that the indicator is attached to.

Reimplemented in ATAS.Strategies.Chart.ChartStrategy.

◆ OnCumulativeTrade()

virtual void ATAS.Indicators.ExtendedIndicator.OnCumulativeTrade ( CumulativeTrade  trade)
protectedvirtual

Handles a cumulative trade event represented by a CumulativeTrade object.

Parameters
tradeThe CumulativeTrade representing the cumulative trade data.

◆ OnCumulativeTradesResponse()

virtual void ATAS.Indicators.ExtendedIndicator.OnCumulativeTradesResponse ( CumulativeTradesRequest  request,
IEnumerable< CumulativeTrade cumulativeTrades 
)
protectedvirtual

Called when a response for a cumulative trades request is received.

Parameters
requestThe CumulativeTradesRequest object representing the original request.
cumulativeTradesThe collection of CumulativeTrade representing cumulative trades data.

◆ OnDataProviderChanged()

virtual void ATAS.Indicators.ExtendedIndicator.OnDataProviderChanged ( IIndicatorDataProvider  oldDataProvider,
IIndicatorDataProvider  newDataProvider 
)
protectedvirtual

This method is called when the value of the DataProvider property changes.

Parameters
oldDataProviderThe old IIndicatorDataProvider value.
newDataProviderThe new IIndicatorDataProvider value.

Reimplemented in ATAS.Strategies.Chart.ChartStrategy.

◆ OnFixedProfilesResponse() [1/2]

virtual void ATAS.Indicators.ExtendedIndicator.OnFixedProfilesResponse ( IndicatorCandle  fixedProfile,
FixedProfilePeriods  period 
)
protectedvirtual

◆ OnFixedProfilesResponse() [2/2]

virtual void ATAS.Indicators.ExtendedIndicator.OnFixedProfilesResponse ( IndicatorCandle  fixedProfileScaled,
IndicatorCandle  fixedProfileOriginScale,
FixedProfilePeriods  period 
)
protectedvirtual

This method is called when the online data provider responds with fixed profile data. Override this method in derived classes to handle the received fixed profile data.

Parameters
fixedProfileScaledThe fixed profile data scaled to a specific period.
fixedProfileOriginScaleThe fixed profile data without scaling.
periodThe period of the fixed profile data (e.g., daily, weekly, monthly, etc.).

◆ OnMarketByOrdersChanged()

virtual void ATAS.Indicators.ExtendedIndicator.OnMarketByOrdersChanged ( IEnumerable< MarketByOrder values)
protectedvirtual

Handles a collection of market by order data represented by MarketByOrder objects.

Parameters
valuesAn IEnumerable of MarketByOrder representing the market by order data.

◆ OnNewMyTrade()

virtual void ATAS.Indicators.ExtendedIndicator.OnNewMyTrade ( MyTrade  myTrade)
protectedvirtual

Called when a new trade executed by the indicator's own strategy is received.

Parameters
myTradeThe new trade executed by the indicator's own strategy.

Reimplemented in ATAS.Strategies.Chart.ChartStrategy, and PhantomFlow_SFP.Template.Main.

◆ OnNewOrder()

virtual void ATAS.Indicators.ExtendedIndicator.OnNewOrder ( Order  order)
protectedvirtual

This method is called when a new order is received.

Parameters
orderThe new order that was received.

Reimplemented in PhantomFlow_SFP.Template.Main.

◆ OnNewTrade()

virtual void ATAS.Indicators.ExtendedIndicator.OnNewTrade ( MarketDataArg  trade)
protectedvirtual

Handles an individual trade represented by a MarketDataArg object.

Parameters
tradeThe MarketDataArg representing the trade data.

◆ OnNewTrades()

virtual void ATAS.Indicators.ExtendedIndicator.OnNewTrades ( IEnumerable< MarketDataArg trades)
protectedvirtual

Handles a collection of new trade data represented by MarketDataArg objects.

Parameters
tradesAn IEnumerable of MarketDataArg representing the new trade data.

◆ OnOrderCancelFailed()

virtual void ATAS.Indicators.ExtendedIndicator.OnOrderCancelFailed ( Order  order,
string  message 
)
protectedvirtual

Called when an attempt to cancel an existing order fails.

Parameters
orderThe order that failed to be canceled.
messageThe error message indicating the reason for the failure.

Reimplemented in PhantomFlow_SFP.Template.Main.

◆ OnOrderChanged()

virtual void ATAS.Indicators.ExtendedIndicator.OnOrderChanged ( Order  order)
protectedvirtual

Called when an existing order is modified (changed).

Parameters
orderThe modified order.

Reimplemented in PhantomFlow_SFP.Template.Main.

◆ OnOrderModifyFailed()

virtual void ATAS.Indicators.ExtendedIndicator.OnOrderModifyFailed ( Order  order,
Order  newOrder,
string  error 
)
protectedvirtual

Called when an attempt to modify an existing order fails.

Parameters
orderThe order that failed to be modified.
newOrderThe new order with the modifications that failed to be applied.
errorThe error message indicating the reason for the failure.

Reimplemented in PhantomFlow_SFP.Template.Main.

◆ OnOrderRegisterFailed()

virtual void ATAS.Indicators.ExtendedIndicator.OnOrderRegisterFailed ( Order  order,
string  message 
)
protectedvirtual

Called when an attempt to register (place) a new order fails.

Parameters
orderThe order that failed to be registered.
messageThe error message indicating the reason for the failure.

Reimplemented in PhantomFlow_SFP.Template.Main.

◆ OnPortfolioChanged()

virtual void ATAS.Indicators.ExtendedIndicator.OnPortfolioChanged ( Portfolio  portfolio)
protectedvirtual

This method is called when the value of the Portfolio changes.

Parameters
portfolioThe new Portfolio value.

Reimplemented in PhantomFlow_SFP.Template.Main.

◆ OnPositionChanged()

virtual void ATAS.Indicators.ExtendedIndicator.OnPositionChanged ( Position  position)
protectedvirtual

This method is called when the value of the Position changes.

Parameters
positionThe new Position value.

Reimplemented in PhantomFlow_SFP.Template.Main.

◆ OnRender()

virtual void ATAS.Indicators.ExtendedIndicator.OnRender ( RenderContext  context,
DrawingLayouts  layout 
)
protectedvirtual

Override this method for implementing your own data rendering logic.

Parameters
contextThe rendering context used to draw on the chart.
layoutThe layout information for the drawing.

Reimplemented in PhantomFlow_SFP.Template.Main.

◆ OnUpdateCumulativeTrade()

virtual void ATAS.Indicators.ExtendedIndicator.OnUpdateCumulativeTrade ( CumulativeTrade  trade)
protectedvirtual

Handles an update event for a cumulative trade represented by a CumulativeTrade object.

Parameters
tradeThe CumulativeTrade representing the updated cumulative trade data.

◆ RecalculateValues()

override void ATAS.Indicators.ExtendedIndicator.RecalculateValues ( )
protectedvirtual

Recalculate the indicator values on each bar.

Reimplemented from ATAS.Indicators.BaseIndicator.

◆ RedrawChart()

void ATAS.Indicators.ExtendedIndicator.RedrawChart ( RedrawArg redrawArg = null)
protected

Call to redraw chart.

◆ RequestFixedProfileAsync()

async Task< FixedProfileResponse?> ATAS.Indicators.ExtendedIndicator.RequestFixedProfileAsync ( FixedProfileRequest  request)
protected

Asynchronously requests a fixed market profile parameterized with FixedProfileRequest.

Parameters
requestThe request containing the fixed profile period.

◆ RequestForCumulativeTrades()

void ATAS.Indicators.ExtendedIndicator.RequestForCumulativeTrades ( CumulativeTradesRequest  request)
protected

Sends a request for cumulative trades data to the online data provider.

Parameters
requestThe CumulativeTradesRequest object representing the request to be sent.

◆ SubscribeMarketByOrderData()

Task ATAS.Indicators.ExtendedIndicator.SubscribeMarketByOrderData ( )
protected

Subscribes to the market by order data.

◆ SubscribeToDrawingEvents()

void ATAS.Indicators.ExtendedIndicator.SubscribeToDrawingEvents ( DrawingLayouts  flags)
protected

Method for specifying the list of layouts in which rendering will be performed.

Parameters
flagsThe drawing layout flags indicating which events to subscribe to.

◆ SubscribeToTimer()

void ATAS.Indicators.ExtendedIndicator.SubscribeToTimer ( TimeSpan  period,
Action  callback 
)

Registers the callback and periodically calls it with specified period.

Parameters
periodA period of market data time used to repeatedly invoke the callback.
callbackA method that is called each time a specified period of market data time passes.

Implements ATAS.Indicators.IMarketTimeProvider.

◆ UnsubscribeFromTimer()

void ATAS.Indicators.ExtendedIndicator.UnsubscribeFromTimer ( TimeSpan  period,
Action  callback 
)

Unregister the callback from periodic invocations.

Parameters
periodSubscribed period of invocations.
callbackA method to be unregistered.

Implements ATAS.Indicators.IMarketTimeProvider.

Property Documentation

◆ Container

IIndicatorContainer? ATAS.Indicators.ExtendedIndicator.Container
getset

Gets or sets the container in which the indicator is hosted.

◆ DataProvider

IIndicatorDataProvider? ATAS.Indicators.ExtendedIndicator.DataProvider
getset

Gets or sets the data provider for the indicator.

◆ DenyToChangePanel

bool ATAS.Indicators.ExtendedIndicator.DenyToChangePanel
getset

Gets or sets a value indicating whether changing the indicator's panel is denied. For vertical indicators, it is always denied.

◆ DrawAbovePrice

bool ATAS.Indicators.ExtendedIndicator.DrawAbovePrice
getset

Gets or sets a value indicating whether custom painting should be performed on top of rendered bars.

◆ EnableCustomDrawing

bool ATAS.Indicators.ExtendedIndicator.EnableCustomDrawing
getprotected set

Gets or sets a value indicating whether custom drawing is enabled for the indicator.

◆ FullScreenMode

bool ATAS.Indicators.ExtendedIndicator.FullScreenMode
getset

Gets or sets full screen mode for the indicator. Could be applied only to the vertical indicators('IsVerticalIndicator = true')

◆ HorizontalLinesTillTouch

List<LineTillTouch> ATAS.Indicators.ExtendedIndicator.HorizontalLinesTillTouch = new()
get

Gets the collection of horizontal lines used to track touch points on the chart.

◆ Labels

SyncDictionary<string, DrawingText> ATAS.Indicators.ExtendedIndicator.Labels = new()
getset

Gets or sets the collection of named drawing text elements.

◆ MarketByOrders

IEnumerable<MarketByOrder> ATAS.Indicators.ExtendedIndicator.MarketByOrders
getprotected

Gets a snapshot of the current market by order data.

◆ MarketTime

DateTime ATAS.Indicators.ExtendedIndicator.MarketTime
get

Current market time.

Implements ATAS.Indicators.IMarketTimeProvider.

◆ Rectangles

List<DrawingRectangle> ATAS.Indicators.ExtendedIndicator.Rectangles = new()
get

Gets the collection of rectangles on the chart.

◆ ShowDescription

bool ATAS.Indicators.ExtendedIndicator.ShowDescription
getset

Gets or sets a value indicating whether the description of the indicator should be shown.

◆ TrendLines

List<TrendLine> ATAS.Indicators.ExtendedIndicator.TrendLines = new()
get

Gets the collection of trend lines on the chart.

◆ UtcTime

DateTime ATAS.Indicators.ExtendedIndicator.UtcTime
get

Current UTC time.

Implements ATAS.Indicators.IMarketTimeProvider.


The documentation for this class was generated from the following file: