Skip to content
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.

Buy_hold is always wrong #2764

Open
Open
@arthurwolf

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.

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions