Clarification on MarketData.GetBars

Created at 24 Oct 2020, 13:29
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!
CT

ctid2032775

Joined 03.05.2020

Clarification on MarketData.GetBars
24 Oct 2020, 13:29


Hi Panagiotis,

I'm just a little bit confused and wanted to clarify if this is a bug or a feature:

When using MarketData.GetBars in a cBot to fetch historical bar data I sometimes get the exception "cTrader.Automate.Small.V1.Exceptions.AlgoAbortedException". But when iterating through the bars it seems that even so all data is available.

Is this the nornmal behavior - e. g. when bar data was not changed in the meantime - or is there anything to be done to "reset" the connection to get the actual data?
Or could this be based on the garbage collector and classes using this function need to implement the IDisposable interface and manually "dispose" the bars object?

Thanks in advance and best regards,
Christian


@ctid2032775
Replies

PanagiotisCharalampous
26 Oct 2020, 08:08

Hi Christian,

It is not clear to me what is the problem here. Can you provide steps to reproduce this behavior? 

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

ctid2032775
26 Oct 2020, 11:08

RE:

PanagiotisCharalampous said:

Hi Christian,

It is not clear to me what is the problem here. Can you provide steps to reproduce this behavior? 

Best Regards,

Panagiotis 

Join us on Telegram

Hi Panagiotis,

thanks for your reply - I guess it was something in my code. Because after changing the logic even I cannot reproduce the issue...

BR,
Christian


@ctid2032775