Access multi symbol and time frame bars in an multi symbol tick based bot

Created at 27 Nov 2021, 14:13
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
sirinath's avatar

sirinath

Joined 25.11.2021

Access multi symbol and time frame bars in an multi symbol tick based bot
27 Nov 2021, 14:13


Hello,

How can you have a bot which works at the tick level dealing with multiple symbols but being able to access:

  • multiple symbols and
  • bar time frames

such that the last bar is constantly updated until the bar is complete.

Also how do you find out what tick what symbol triggered the call to OnTick in a multi symbol bot. Can custom functions, delegates and/or lambdas be used in place of OnTick and OnBar to differentiate by the symbol and time frame in case of bars?

When the generic OnTick or OnBar is called how do I figure out the symbols the data relates to when there a multiple symbols?

Suminda


@sirinath
Replies

amusleh
29 Nov 2021, 09:06

Hi,

The OnTick/OnBar methods are called only for current chart symbol ticks and bars, not for other symbols.

You can use the Symbol Tick event and Bars BarOpened event for other symbols.


@amusleh