Detect time frame change

Created at 13 Feb 2020, 21:44
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!
TJ

Tj11

Joined 24.10.2019

Detect time frame change
13 Feb 2020, 21:44


Dear Support,

Is there a way for the indicator to immediately detect that the time frame was changed ? Without waiting for a new tick to come.

If there is non, what would you advise as a workaround ?  Double mouse click, button on the chart or ?

API reference is not clear.

 

Thanks in advance.


@Tj11
Replies

Tj11
14 Feb 2020, 10:27

Dear Support, may I have your reply please.


@Tj11

PanagiotisCharalampous
17 Feb 2020, 08:59

Hi Tj11,

No there is no such option. When the timeframe changes, a new indicator is initialized and the Initialize() method is called.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

Tj11
17 Feb 2020, 19:57

RE:

PanagiotisCharalampous said:

Hi Tj11,

No there is no such option. When the timeframe changes, a new indicator is initialized and the Initialize() method is called.

Best Regards,

Panagiotis 

Join us on Telegram

 

Hi Panagiotis,

If I got you right, changing the time frame will immediately execute the code inside Initialize() without waiting for a new tick, right ?

If yes, then this is exactly what I need. You saved my time. Thank you !

 

Regards


@Tj11