Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Live tradebot on binance tries to sell at incorrect price #1606

Closed
Orwi53 opened this issue Jan 1, 2018 · 2 comments · Fixed by vansergen/gekko#2
Closed

Live tradebot on binance tries to sell at incorrect price #1606

Orwi53 opened this issue Jan 1, 2018 · 2 comments · Fixed by vansergen/gekko#2
Labels

Comments

@Orwi53
Copy link

Orwi53 commented Jan 1, 2018

Note: for support questions, please join our Discord server

  • I'm submitting a ...
    [x ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • Action taken (what you did)
    Started gekko as a live trader (turned off paper trader and used configuration accordingly)

  • Expected result (what you hoped would happen)
    executing buy/sell orders

  • Actual result (unexpected outcome)
    executing sell order at wrong price

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)

Hi, I am trying gekko as a live trader, on a simple strategy that I made, on binance, with small amounts of cryptocurrency.

Before describing the problem, I will state my current configuration:

git log -1 

returns:

commit e7af14932f8ddc79e1568254b18b7cc91acfad65
Author: Clifford Roche <clifford.roche@gmail.com>
Date:   Sun Dec 31 20:30:18 2017 -0500

No longer subtract 1 second

It isn't necessary because we fixed the iterator to 24 hour periods, and no longer use the trade time 
from the last trade (which has only 1 second resolution).

gekko was not working on binance, so I tried to make it work by also implementing the suggestions described in issue #1563: I made that change (callback(err.message, ticker); to callback(undefined, ticker); ) not only in that line of the file exchanges/binance.js, but also on line 342: callback(err.message, !stillThere) to callback(undefined, !stillThere)

gekko didn't crash, but, as it tried to act on the "short" advice, the output was this (removed IDs from the pic as they are not necessary):

1

When I went to see on binance what happened, it seems that it tried to sell at the price "1", causing the sell to not happen, and consequently cancelling it by itself and retrying.

2

(nevermind the first entry in that list, that's when I manually sold it )

A part from fixing this issue, I would also like to know, how can my custom-made strategy know if the sell was successful? Because if it doesn't know, once the "short" advice is given, my custom-made strategy will switch to buy-mode while gekko is still trying to sell. How can I check if the buy or sell was successful from my custom strategy?

I would like it to try to sell when the "short" advice is given, and, If it can't sell it (for example order hangs or something), my strategy should know it, so that it will wait for the next good occasion to sell, instead of trying to buy.

@meidays
Copy link

meidays commented Feb 11, 2018

The transaction is reversed.
It is expensive and it sells cheaply.
Please modify the code. ~~;

@stale
Copy link

stale bot commented Oct 24, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants