OnBarsReloaded is not called on disconnection at off market
OnBarsReloaded is not called on disconnection at off market
13 Dec 2021, 22:11
Hello
Please view the following scenario:
1. Run cBot during trading hours and do not stop it
2. Wait to market to be closed
3; Disconnect and reconnect connection while market is closed
4. Wait to market to be opened
On this scenario the OnBarsReloaded event will not be called. Not while the market is closed (3) and not while the market is reopen (4).
The fact that OnBarsReloaded is not called despite the disconnection is in my opinion not the wanted behaviour and can cause for problems with the cBot.
For example, after the disconnection the Bars property is reduced to 1000 only. My cBot at the OnBarsReloaded event loads more history since 1000 bars is not enough. However due to the fact that the OnBarsReloaded is not called, when the market is reopened the cBot will continue to run with 1000 bars only which will cause problems.
Please address this issue
amusleh
14 Dec 2021, 12:50
Hi,
We tried to reproduce this issue but we couldn't.
The Bars Reloaded event was triggered on all of your abovementioned cases.
You can also check the Bars count and load more if you needed:
@amusleh