askmike / gekko

A bitcoin trading bot written in node - https://gekko.wizb.it/
MIT License
10.08k stars 3.93k forks source link

asynchronous strategy update function, backward compatible #2801

Closed massaroni closed 5 years ago

massaroni commented 5 years ago

Asynchronous update functions should return "true" to indicate that it's operating in asynchronous mode, and call the provided callback when it's done. For example:

update: function (candle, done) { setTimeout(() => { // do stuff done(); }); return true; }

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you feel this is very a important issue please reach out the maintainer of this project directly via e-mail: gekko at mvr dot me.

massaroni commented 5 years ago

This feature would be super helpful if you need to hit a file, database, web service, ML service, etc, from within your strategy.

Anyone want to review this PR?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you feel this is very a important issue please reach out the maintainer of this project directly via e-mail: gekko at mvr dot me.