NaN on PerformanceAnalyzer log - Printable Version +- Gekko Forum (https://forum.gekko.wizb.it) +-- Forum: Gekko (https://forum.gekko.wizb.it/forum-13.html) +--- Forum: Technical Support (https://forum.gekko.wizb.it/forum-19.html) +--- Thread: NaN on PerformanceAnalyzer log (/thread-1437.html) |
NaN on PerformanceAnalyzer log - Lucas - 02-05-2018 Hi, after some weeks of paper trading, today I started to use gekko for real trading with trader plugin on bitstamp exchange. I noticed a problem on log produced by performanceAnalyzer plugin: P&L and profit columns reports NaN value. Code: (PROFIT REPORT) original simulated balance: 1000.00000000 USD It's my problem or common problem? How can I solve? Thanks in advance. PS: - with paperTrader I can see correct numerical values - I'm running the stable branch (1cde4c4) on raspberry RE: NaN on PerformanceAnalyzer log - askmike - 02-06-2018 Hey! Would you be able to upload more debug logs? Perfect would be a snippet from the point where it started going wrong (assuming it worked fine for a while). RE: NaN on PerformanceAnalyzer log - Lucas - 02-06-2018 Hi, for real operations with Trader plugin it works correctly before and after, but always reports NaN. Here is more debug log. I added a debug line in performanceAnalyzer.prototype.logRoundtripPart in order to log trade object and I discovered a NaN value for price atttibute. Code: 2018-02-06 10:52:18 (INFO): Trader Received advice to go short. Selling ETH Instead, the simulation with PaperTrader reports correct P&L and profit values: Code: 2018-02-05 21:08:11 (DEBUG): Requested BTC/USD trade data from Bitstamp ... RE: NaN on PerformanceAnalyzer log - askmike - 02-07-2018 Gekko calculates profit based on a trade summary: if your strategy adviced "short" Gekko will wait to hear back from a trader (either live trader or paper trader) to hear how the trade went. The problem comes from the live trader not properly emitting this trade summary. Strange that you had this happen on bitstamp, I will run a live trader there as well and try to reproduce. RE: NaN on PerformanceAnalyzer log - askmike - 02-07-2018 This is a bug, I've submitted an issue on github to track it there as well, see here: https://github.com/askmike/gekko/issues/1875 RE: NaN on PerformanceAnalyzer log - askmike - 02-07-2018 It looks like bitstamp has changed their API a little bit, since this was working before. It's now fixed in the latest develop release, see this link for details: https://github.com/askmike/gekko/pull/1876 If you want to run the new version, note that you have to run the latest develop version, it's not part of a stable release yet (let me know if you are unsure about this). RE: NaN on PerformanceAnalyzer log - Lucas - 02-07-2018 Hi, I will put the correction manually in bitstamp.js file of my current local stable version. Thank you. |