Topics
Replies
eynt
10 Jun 2020, 10:05
( Updated at: 21 Dec 2023, 09:22 )
RE:
Hi
The steps which led me to the problem were a bit complicated however in order to simplify I would use the following steps and hopefully it will give the same results:
1. Create a cBot and save its bars count
OnStart: _startBarCount = Bars.Count;
2. Make sure the bars count does not go below the initial value
OnTick: if (Bars.Count < _startBarCount ) throw new exception("");
3. Run the bot on 1 pip range chart and make sure it loads history for 30 days at least on the Initialize
This might take some time even a few days until the problem occurs. Maybe loading more than 30 days will reproduce it faster. I would also use a symbol such has GBPNZD which has a lot of movement.
I'm attaching a debug screenshot. As you can the see the Bars.Count equals to 1068 only, which is impossible value for a 1-pip range chart. Moreover, the RightBar value which is held in one of my indicators and often save the last bar index has the value of 357663 which means the Bars.Count value should be at least that.
Besides knowing if you were able to reproduce the problem, I would like to know if the Bars property has some sort of size limitations?
Thanks
@eynt
eynt
04 Jun 2020, 09:16
RE:
Thank you
Please understand the following problem:
My chart has many indicators, and one of them calls the function LoadMoreHistory many times (on a loop until a specific data is reached). As a result, on each call of the LoadMoreHistory ALL of my indicators are refreshing and reloading themselfs again. This cause the load of the chart to last very long time, even minutes.
What do you suggest to solve this issue?
@eynt
eynt
26 May 2020, 08:45
RE:
Than you
In order to close the position I need to use ClosePosition which takes a parameter of type Position which does not has a constructor and therefor even if I have all the data from the files I can't create a new position instance in order to close the open position.
@eynt
eynt
22 May 2020, 12:14
RE:
Thank you
Unfortuanatlly I did not completly understood the way the SyncObjectsInstance works and therefor do not know how to add the ScrollXBy/ScrollXTo. Perhaps you show me the modifications I need to add to the SyncObjectsInstance itself so it not only sync objects but scrolling as well. I'm pretty sure it's a small change and I could take if from there.
@eynt
eynt
10 Jun 2020, 16:01
RE:
Hello
Luckily I was able to reproduce the problem easily using the robot's code at the bottom.
Please run it on a 1-pip range bar, on a live chart as I am not sure if it will work on a back test. I suggest to run it on GBPNZD or even several symbols simultaniously since it might take a few hours before the problem happens.
@eynt