zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

Cancel orders when new is coming?

Open RomainClaret opened this issue 9 years ago • 7 comments

Hello, I am just wondering about the behavior. I get logs like that:

buy delayed: +99.4% of funds

Is it normal? Because at the moment I have to manually cancel the order on the exchange so the new buy order can be processed. Thank you

RomainClaret avatar May 30 '17 18:05 RomainClaret

This has become a huge problem, at least for me. Every single attempt to buy or sell results in this, and there is a long delay (like, several minutes usually) before it finally is able to execute the order. Sometimes it never recovers and forgets the order was placed (perhaps as a result of an error?), which means the order stays standing on the books without being cancelled until done manually.

This is a huge problem because if the bot cannot execute a buy or sell at the moment that it decides it is worthwhile, then the opportunity is usually lost. I truly appreciate all the work gone into zenbot but it's useless if it cannot execute an order when told to do so.

I should mention this is with gdax. I am not sure if the fault is with zenbot or with gdax not immediately releasing funds after cancelling. Would it be better to listen to the event stream from gdax so we don't have to continuously poll for balances and for bid/ask price? Just for my own understanding I made a very simple script that would listen on the stream and print out what it received - you get everything that happens on the book, and it could be used to keep your own copy of the bid/ask price, as well as being able to keep tabs on the status of our own orders. That would allow the bot to be able to respond the quickest, but I don't know how to generalize that to the architecture of this bot.

esalter avatar May 31 '17 11:05 esalter

Please note the above is not meant as an attack, I'm just stating my own observations. I appreciate that zenbot is a side project and again I thank you for all your time on it. :-)

esalter avatar May 31 '17 11:05 esalter

Show us your script

gberlian avatar May 31 '17 12:05 gberlian

zenbot trade poloniex.BTC-USDT --trend_ema 4.1 --period 15m --order_adjust_time 20 --max_sell_loss_pct 5 --min_periods 1 --markup_pct 2 --oversold_rsi 41 --oversold_rsi_periods 25

RomainClaret avatar May 31 '17 19:05 RomainClaret

I know this is not related to the topic of this issue, but what really does the option --markup_pct ? I made some simulations and it seems more conservative and give me better results, but that does?

vitorego avatar May 31 '17 21:05 vitorego

@Rocla The reason for your bot saying buy delayed: +99.4% of funds is because your --order_adjust_time is set to 20. If you want that to be 20 seconds then you will have to use 20000 because the time is calculated in milliseconds. The fastest time (That I have found) to not have that is 15000 milliseconds

papacasper avatar Jun 01 '17 18:06 papacasper

Thank you

RomainClaret avatar Jun 01 '17 18:06 RomainClaret