Trade canceled and remade every minute - Printable Version +- Gekko Forum (https://forum.gekko.wizb.it) +-- Forum: Gekko (https://forum.gekko.wizb.it/forum-13.html) +--- Forum: General Discussion (https://forum.gekko.wizb.it/forum-14.html) +--- Thread: Trade canceled and remade every minute (/thread-57745.html) |
Trade canceled and remade every minute - Indigo - 10-30-2018 Hi askmike or anyone who can help me First of all, I love your code. And I love the idea of GekkoPlus. I backtested and now live. The issue is when my bot wants to buy at, let's say, 10. The market is not liquid enough so I'm waiting on the queue. BUT, every minute, my order is canceled, and just after that re-made for 10. SO, I lost my place in the queue and become last again... Do you how to easily say to the bot in the js : "Please until the situation changed, stick to your order" ? Thanks for your time RE: Trade canceled and remade every minute - xm33 - 10-30-2018 The answer was find there : https://github.com/askmike/gekko/issues/1848 RE: Trade canceled and remade every minute - Indigo - 10-31-2018 Hi xm33, I really looked at your link for a long time, but I did not find the solution of the issue. People are talking about it, but I don't know what to do. I do think the solution is in a modification in the following code : // sell only if the price is higher than the buying price or if the price drops below the threshold // a hodle_threshold of 1 will always sell when the NN predicts a drop of the price. play with it! let signalSell = candle.close > this.prevPrice || candle.close < (this.prevPrice * this.hodle_threshold); let signal = meanp < currentPrice; if ('buy' !== this.prevAction && signal === false && meanAlpha > this.settings.threshold_buy) { // log.debug("Buy - Predicted variation: ",meanAlpha); return this.advice('long'); } else if ('sell' !== this.prevAction && signal === true && meanAlpha < this.settings.threshold_sell && signalSell) { // log.debug("Sell - Predicted variation: ",meanAlpha); return this.advice('short'); } |