Closed gabriel-milan closed 3 years ago
Hey! Good idea man - thank you again for contributing. Could you put this sell_on_end inside exit_settings in params ?
Sure, there you go.
I'm actually thinking about starting a code refactor for pyjuque as I'm using it for evolving my genetic algorithms and there are a few other things not working as expected on it and some other stuff I'd probably change. Is that of interest for you?
Absolutely of interest in principle, in practice we have to agree on the best way to do it. But yes it is something of interest!
I've noticed that, sometimes, if neither your short signal nor stop_loss triggers, there's not an exit from positions. For that particular reason, you may bump into something like this
For it to be fixed, I've implemented a flag on the bot config called
sell_on_end
(defaults toFalse
for backwards compatibility) which tells the backtester to sell positions on data end. Beside that, I've also added a friendly message for this kind of error, just in case it still happens: