Ontick() Method with multi Symbol

Created at 02 Nov 2022, 05:32
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!
MI

MinMin

Joined 23.07.2018

Ontick() Method with multi Symbol
02 Nov 2022, 05:32


Hi Team !

As I know that OnTick() will Called on each incoming market tick. But when I run cbot which multi Symbol let say EURUSD and USDJPY. 
The question is:

Which Symbol market tick will apply for Ontick()?
Are there any way to call this method when market tick come first?

Thanks for your help!


@MinMin
Replies

PanagiotisChar
02 Nov 2022, 08:56

Hi MinMin,

OnTick() will be called for the chart symbol. You can subscribe to another symbol's ticks using the following

        protected override void OnStart()
        {
            // Put your initialization logic here
            Symbols.GetSymbol("GBPUSD").Tick += GBPUSD_Tick; 
        }

        private void GBPUSD_Tick(SymbolTickEventArgs obj)
        {
           
        }

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 


@PanagiotisChar