{"action":"created","issue":{"url":"https://api.github.com/repos/taniman/profit-trailer/issues/2103","repository_url":"https://api.github.com/repos/taniman/profit-trailer","labels_url":"https://api.github.com/repos/taniman/profit-trailer/issues/2103/labels{/name}","comments_url":"https://api.github.com/repos/taniman/profit-trailer/issues/2103/comments","events_url":"https://api.github.com/repos/taniman/profit-trailer/issues/2103/events","html_url":"https://github.com/taniman/profit-trailer/issues/2103","id":373646516,"node_id":"MDU6SXNzdWUzNzM2NDY1MTY=","number":2103,"title":"New pairs calculating incorrect bought price using pending orders","user":{"login":"AmadeoGaming","id":44446792,"node_id":"MDQ6VXNlcjQ0NDQ2Nzky","avatar_url":"https://avatars2.githubusercontent.com/u/44446792?v=4","gravatar_id":"","url":"https://api.github.com/users/AmadeoGaming","html_url":"https://github.com/AmadeoGaming","followers_url":"https://api.github.com/users/AmadeoGaming/followers","following_url":"https://api.github.com/users/AmadeoGaming/following{/other_user}","gists_url":"https://api.github.com/users/AmadeoGaming/gists{/gist_id}","starred_url":"https://api.github.com/users/AmadeoGaming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmadeoGaming/subscriptions","organizations_url":"https://api.github.com/users/AmadeoGaming/orgs","repos_url":"https://api.github.com/users/AmadeoGaming/repos","events_url":"https://api.github.com/users/AmadeoGaming/events{/privacy}","received_events_url":"https://api.github.com/users/AmadeoGaming/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-24T19:42:26Z","updated_at":"2018-10-25T05:36:34Z","closed_at":null,"author_association":"NONE","body":"\r\n<!--- This ProfitTrailer issue tracker is **ONLY** used for reporting bugs. -->\r\nNO NEW FEATURES! Use [PT Enahancements](https://github.com/taniman/profit-trailer-enhancements) for Feature Requests.\r\n\r\n<!--- Provide a general summary of the issue in the Title above -->\r\n\r\nWhen buying a new pair for ZRX/BTC the bot had calculated the bought price incorrectly much lower then it actually has and sells for a double digit gain take profit. This has happened twice since updating to 2.1.18 and both instances were on ZRX/BTC. My bot is currently using pending orders instead of DCA and is also using the combined pending order trigger as well. What i have noticed in the logs is that when i already have a pair in pending order...and i rebuy that same pair again....it cancels the pending order....recalculates the prices to adjust the average to include the newly bought pair...and then re-posts the pending order. Somehow this caused the bot to set my newly bought pairs bought cost much lower then it should have. \r\n\r\n## ProfitTrailer info\r\nVersion: 2.1.18\r\n\r\n<!--- replace the space in the [ ] with an x in order to tick it --> \r\nExchange:\r\n- [ ] Bittrex\r\n- [x ] Binance\r\n- [ ] Poloniex\r\n\r\n<!--- replace the space in the [ ] with an x in order to tick it --> \r\nMarket:\r\n- [x ] BTC\r\n- [ ] ETH\r\n- [ ] USDT\r\n- [ ] BNB\r\n- [ ] XMR\r\n\r\n\r\n<!--- replace the space in the [ ] with an x in order to tick it --> \r\nOperating System:\r\n- [x ] Windows Server 2016 v1607 (Vultr VPS)(please specify version)\r\n- [ ] Ubuntu (please specify version)\r\n- [ ] Other linux distro (please specify)\r\n- [ ] Mac OS\r\n\r\n## Expected Behavior\r\n<!--- Tell us what should happen -->\r\nThe bought price should be accurate on newly bought pairs and not lose price.\r\n\r\n## Current Behavior\r\n<!--- Tell us what you are doing, what happens and how often -->\r\nThe bought price for ZRX/BTC has twice been inaccurate when bought using my current strategy that includes using the pending order system. Once today 10/24 and again on 10/21.\r\n\r\n## Troubleshooting\r\n<!--- What have you tried to do to fix it? -->\r\nI have not tried to fix it because it happens when i am away and too fast to do any kind of hot config adjustment because the issue happens immediately upon purchase.\r\n\r\n## Possible Solution\r\n<!--- Optional, do you have a possible fix/reason for the bug. -->\r\n\r\n\r\n## Steps to Reproduce\r\n<!--- If able, tell us how to reproduce this bug. -->\r\n1. Set up pending orders for ZRX/BTC \r\n2.  Rebuy a fresh new pair of ZRX/BTC\r\n3.  See if the bot incorrectly sets the new pairs price much lower then it should\r\n4.\r\n\r\n## Configuration\r\n<!--- Many issues are caused by incorrect configurations -->\r\n<!--- From the GUI please copy your PAIRS, DCA and INDICATORS settings -->\r\n<!--- You can upload to https://pastebin.com/ or similar -->\r\nhttps://pastebin.com/Vhu10XwR\r\n\r\n## Log files/console output\r\n<!--- MANDATORY -->\r\n<!--- Please provide your complete log file from ProfitTrailer/log -->\r\n<!--- If your issue is a recurring error messags you can rename/delete your current... -->\r\n<!--- log and restart the bot to reproduce the error so we only get recent/relevant log information --> \r\n[ProfitTrailer (1).log](https://github.com/taniman/profit-trailer/files/2512058/ProfitTrailer.1.log)\r\n\r\nZRX exchange trades\r\n\r\n![screenshot 61](https://user-images.githubusercontent.com/44446792/47457272-85cc8800-d78b-11e8-987d-6314c7f4713d.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/taniman/profit-trailer/issues/comments/432920844","html_url":"https://github.com/taniman/profit-trailer/issues/2103#issuecomment-432920844","issue_url":"https://api.github.com/repos/taniman/profit-trailer/issues/2103","id":432920844,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjkyMDg0NA==","user":{"login":"AmadeoGaming","id":44446792,"node_id":"MDQ6VXNlcjQ0NDQ2Nzky","avatar_url":"https://avatars2.githubusercontent.com/u/44446792?v=4","gravatar_id":"","url":"https://api.github.com/users/AmadeoGaming","html_url":"https://github.com/AmadeoGaming","followers_url":"https://api.github.com/users/AmadeoGaming/followers","following_url":"https://api.github.com/users/AmadeoGaming/following{/other_user}","gists_url":"https://api.github.com/users/AmadeoGaming/gists{/gist_id}","starred_url":"https://api.github.com/users/AmadeoGaming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmadeoGaming/subscriptions","organizations_url":"https://api.github.com/users/AmadeoGaming/orgs","repos_url":"https://api.github.com/users/AmadeoGaming/repos","events_url":"https://api.github.com/users/AmadeoGaming/events{/privacy}","received_events_url":"https://api.github.com/users/AmadeoGaming/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T05:36:34Z","updated_at":"2018-10-25T05:36:34Z","author_association":"NONE","body":"[unaccounted.zip](https://github.com/taniman/profit-trailer/files/2513434/unaccounted.zip)\r\n"}}
{"actor":{"display_login":"AmadeoGaming"}}