Trade canceled and remade every minute
#1
Hi askmike or anyone who can help me  Smile

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" ?    Huh


Thanks for your time   Shy
  Reply
#2
The answer was find there :
https://github.com/askmike/gekko/issues/1848
  Reply
#3
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');

}
  Reply


Forum Jump:


Users browsing this thread: