historical Bar

Created at 19 May 2020, 12:27
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!
EY

eynt

Joined 08.05.2020

historical Bar
19 May 2020, 12:27


Is there a way to know if a bar is historical or live? The IsLastBar property is not enough because the first time the last bar is calculated it is historical and not live.

 

Thanks


@eynt
Replies

PanagiotisCharalampous
19 May 2020, 12:31

Hi Yuval,

How did you come to this conclusion?

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

eynt
19 May 2020, 12:37

RE:

i disconnected myself from the internet in order to stop receiving live data. On the Calculate method I printed the IsLastBar value. All the bars return false except 1 which means the last bar is calculated once as historical data.


@eynt

PanagiotisCharalampous
19 May 2020, 12:45

Hi Yuval,

IsLastBar is true when the index points to the last bar. The last bar is always the live bar.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous