askmike / gekko

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

Paper Trader - Buying assets without currency #2775

Closed Coriou closed 5 years ago

Coriou commented 5 years ago

I'm submitting a ...

[x] bug report (I think) [ ] question about the decisions made in the repository

Action taken

Using the default provided paperTrader config, tuning for a balance where I have asset, but no currency:

config.paperTrader = {
  simulationBalance: {
    asset: 1,
    currency: 0,
  },
  ...otherOptions
};

Expected result

I'm thinking the bot shouldn't be able to buy assets, even on a long signal from my strategy because I simply have no currency to buy assets with.

Actual result

Each time the strategy emits a long signal, the paper trader "buys" assets, despite an empty currency balance. This kinda ruins the results of the paper trading simulation since it's capable of performing "impossible" trades that it wouldn't be able to do in real life situations.

Am I misunderstanding what's going on here ?

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.