This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
Open
Description
Buy_hold changes from execution to execution (at least in simulations)
This is because the code that is used to remember the initial trade value is not always executed at the same time (in lolex/simulation terms), random amounts of time can have happened (due to the exchange's simulated latency) by the time we get to the code (in SyncBalance()) that takes note of the initial value (in s.start_capital).
I made a dirty fix by moving that code into initBuffer() but I doubt that's the right way to do this.
I'm looking for advice in how to fix this properly, will do a PR once I have a good enough solution.