{"action":"created","issue":{"url":"https://api.github.com/repos/askmike/gekko/issues/2438","repository_url":"https://api.github.com/repos/askmike/gekko","labels_url":"https://api.github.com/repos/askmike/gekko/issues/2438/labels{/name}","comments_url":"https://api.github.com/repos/askmike/gekko/issues/2438/comments","events_url":"https://api.github.com/repos/askmike/gekko/issues/2438/events","html_url":"https://github.com/askmike/gekko/issues/2438","id":349838376,"node_id":"MDU6SXNzdWUzNDk4MzgzNzY=","number":2438,"title":"Gekko 0.6.5 - wrong roundtrip calculations","user":{"login":"moodyswing","id":19476202,"node_id":"MDQ6VXNlcjE5NDc2MjAy","avatar_url":"https://avatars3.githubusercontent.com/u/19476202?v=4","gravatar_id":"","url":"https://api.github.com/users/moodyswing","html_url":"https://github.com/moodyswing","followers_url":"https://api.github.com/users/moodyswing/followers","following_url":"https://api.github.com/users/moodyswing/following{/other_user}","gists_url":"https://api.github.com/users/moodyswing/gists{/gist_id}","starred_url":"https://api.github.com/users/moodyswing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moodyswing/subscriptions","organizations_url":"https://api.github.com/users/moodyswing/orgs","repos_url":"https://api.github.com/users/moodyswing/repos","events_url":"https://api.github.com/users/moodyswing/events{/privacy}","received_events_url":"https://api.github.com/users/moodyswing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-12T19:41:49Z","updated_at":"2018-08-13T08:29:57Z","closed_at":null,"author_association":"NONE","body":"Lately I noticed that, despite updating minance market files, gekko is terrible at calculating profits (eg. -91% profit logged while in fact difference is marginal). It happens with various coin combinations, examples below.\r\n\r\nLOG 1:\r\n2018-08-12 21:00:55 (INFO):\t[ORDER] summary: { price: 0.00078,\r\n  amount: 2565.6,\r\n  date: moment(\"2018-08-12T21:00:52.070\"),\r\n  side: 'buy',\r\n  orders: 1,\r\n  fees: { BNB: 0.00149767 },\r\n  feePercent: 0.1 }\r\n2018-08-12 21:01:37 (INFO):\tSending Trade Data to your Google Sheet\r\n\r\n2018-08-12 21:01:37 (INFO):\t(PROFIT REPORT) original balance:\t 2.17302131 BNB\r\n2018-08-12 21:01:37 (INFO):\t(PROFIT REPORT) current balance:\t 2.18277099 BNB\r\n2018-08-12 21:01:37 (INFO):\t(PROFIT REPORT) profit:\t\t 0.00974968 BNB (0.44866932%)\r\n2018-08-12 21:05:15 (INFO):\tTrader Received advice to go short. Selling  VET\r\nisValidLot 1 true\r\nisValidLot 1 true\r\nisValidLot 1 true\r\n2018-08-12 21:23:49 (INFO):\t[ORDER] summary: { price: 0.00078,\r\n  amount: 2564.7,\r\n  date: moment(\"2018-08-12T21:23:46.736\"),\r\n  side: 'sell',\r\n  orders: 1,\r\n  fees: { BNB: 0.00150035 },\r\n  feePercent: 0.09999999999999999 }\r\n2018-08-12 21:24:56 (INFO):\tSending Trade Data to your Google Sheet\r\n2018-08-12 21:24:56 (INFO):\t(ROUNDTRIP) entry date (UTC)  \texit date (UTC)  \texposed duration\tP&L \tprofit\r\n2018-08-12 21:24:56 (INFO):\t(ROUNDTRIP) 2018-08-12 19:00\t2018-08-12 19:23\t23 minutes      \t-0.00\t-0.07\r\n2018-08-12 21:24:56 (INFO):\t(PROFIT REPORT) original balance:\t 2.17302131 BNB\r\n2018-08-12 21:24:56 (INFO):\t(PROFIT REPORT) current balance:\t 0.18214852 BNB\r\n2018-08-12 21:24:56 (INFO):\t(PROFIT REPORT) profit:\t\t -1.99087279 BNB (-91.61772969%)\r\n\r\nLOG 2:\r\n2018-08-12 13:42:02 (INFO):\t\t Portfolio:\r\n2018-08-12 13:42:02 (INFO):\t\t\t 0.00663649 BTC\r\n2018-08-12 13:42:02 (INFO):\t\t\t 0.1 ETC\r\n2018-08-12 13:42:02 (INFO):\t\t Balance:\r\n2018-08-12 13:42:02 (INFO):\t\t\t 0.00684809 BTC\r\n2018-08-12 13:42:02 (INFO):\t\t Exposed:\r\n2018-08-12 13:42:02 (INFO):\t\t\t no (3.09%)\r\n2018-08-12 13:42:02 (INFO):\tSetting up:\r\n2018-08-12 13:42:02 (INFO):\t\t Performance Analyzer\r\n2018-08-12 13:42:02 (INFO):\t\t Analyzes performances of trades\r\n2018-08-12 13:42:02 (INFO):\t\r\n\r\n2018-08-12 13:42:02 (INFO):\tStarting to watch the market: Binance ETC/BTC\r\n2018-08-12 13:51:44 (INFO):\tNOT selling, already no exposure\r\n2018-08-12 15:01:25 (INFO):\tTrader Received advice to go long. Buying  ETC\r\nisValidLot 0.001 true\r\nisValidLot 0.001 true\r\n2018-08-12 15:02:48 (INFO):\t[ORDER] summary: { price: 0.002121,\r\n  amount: 2.97,\r\n  date: moment(\"2018-08-12T15:02:47.284\"),\r\n  side: 'buy',\r\n  orders: 1,\r\n  fees: { BNB: 0.00253482 },\r\n  feePercent: 0.07500000000000001 }\r\n2018-08-12 15:03:24 (INFO):\tSending Trade Data to your Google Sheet\r\n2018-08-12 15:03:24 (INFO):\t(PROFIT REPORT) original balance:\t 0.00684819 BTC\r\n2018-08-12 15:03:24 (INFO):\t(PROFIT REPORT) current balance:\t 0.00054942 BTC\r\n2018-08-12 15:03:24 (INFO):\t(PROFIT REPORT) profit:\t\t -0.00629877 BTC (-91.97715017%)"},"comment":{"url":"https://api.github.com/repos/askmike/gekko/issues/comments/412445362","html_url":"https://github.com/askmike/gekko/issues/2438#issuecomment-412445362","issue_url":"https://api.github.com/repos/askmike/gekko/issues/2438","id":412445362,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjQ0NTM2Mg==","user":{"login":"askmike","id":969743,"node_id":"MDQ6VXNlcjk2OTc0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/969743?v=4","gravatar_id":"","url":"https://api.github.com/users/askmike","html_url":"https://github.com/askmike","followers_url":"https://api.github.com/users/askmike/followers","following_url":"https://api.github.com/users/askmike/following{/other_user}","gists_url":"https://api.github.com/users/askmike/gists{/gist_id}","starred_url":"https://api.github.com/users/askmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/askmike/subscriptions","organizations_url":"https://api.github.com/users/askmike/orgs","repos_url":"https://api.github.com/users/askmike/repos","events_url":"https://api.github.com/users/askmike/events{/privacy}","received_events_url":"https://api.github.com/users/askmike/received_events","type":"User","site_admin":false},"created_at":"2018-08-13T08:29:57Z","updated_at":"2018-08-13T08:29:57Z","author_association":"OWNER","body":"So `current balance: 0.18214852 BNB` is wrong?"}}
{"actor":{"display_login":"askmike"}}