-
Notifications
You must be signed in to change notification settings - Fork 2k
Save history of executed trades (trade & sim mode) in a json file #1131
Comments
@defkev I see that you just submitted a pull request to load previous trades: #1243 So I was wondering if that could help maybe in regards of this suggestion? Are previous trades saved only in live mode or also in simulation / paper? Thought / ideas? Thx for sharing |
Trades are only saved/loaded in live/paper mode. Including sim would clutter up the mongo collection as each simulation would generate more and more new trades, including possible duplicates, we definitely don't want to pop up in live mode. Any specific reason you want to store this from a simulation? I am personally more interested in the result of a sim run than its trade history 😄 But i actually was thinking about implementing some kind of trade log for executed/open orders (including slippage/loss protection, sell-stop and re-orders) to get an idea what the bot did between two trades but then again the moment you would look at this info its already outdated and you wouldn't be able to do anything about it anyway. |
Now, the simulations are saved in the simulations folder as html file called e.g. sim_result_exchange.XYZ-BTC_180113_195655_UTC.html
trades are also saved in the simulations folder, but the file has a name e.g. trade_result_binance.XYZ-BTC_180114_UTC.html which I think should be saved under "stats" (I think this is a minor bug, I think I'll fix that: paper trades should be saved under simulations, but real trades under stats).
When opening the HTML I see many little green arrows and red arrows showing when zenbot did buy and when it sold.
What I'd like to see is to see a history of executed trades, at best as a JSON file.
In paper mode I can receive a notification on telegram to know what the bot would have done, so it's possible to append the data also to a json.
Ideally it should show everything, also failed attempts to buy e.g. when placing a limit order that was not filled. So e.g. the object should have a property called "executed" : true, false if not executed (so you see probably another request a few seconds later where executed is true, because thew previous one didn't go through, is this how the slippage works?)
The HTML should load the json and display the history at the bottom, just after "error rates".
The advantage of this:
The text was updated successfully, but these errors were encountered: