Rejected Sell Trades Can Lose 10% Of Your Portfolio... Or More
Hi Jack, great for digging into this issue. I am running into errored/aborted buy and sell advices also. It is hard to reproduce, they occur from time to time, starting with gekko 0.6. I know many fixes have been already applied but the prob is still there.

Occording your findings I modified line 111 also to see how buy trades will behave, here is my output:

So this change is applied: return r( + 0.03);
You mentioned the "exchange rejects it because Gekko is now trying to sell below the ask price.". I added market taking feature recently and used exactly this behaviour to achieve it, so I was wondering why an exchange should reject a limit buy order which is below the topmost ask price. In this case the exchange immediately executes it and applies market taking fees.

It think a problem with implicit string conversion happens with this expression: + 0.03
What you get is actually a new string like: 111.050000.03
This is causing a rejection by the exchange. Can you test and look if you get the conversion side effect also?

Maybe your workaround with buy/sell/buy still works, but we need to further investigate (and it is not caused by calculatePrice method)?

Messages In This Thread
RE: Rejected Sell Trades Can Lose 10% Of Your Portfolio... Or More - by mark.sch - 01-15-2019, 06:55 PM

Forum Jump:

Users browsing this thread: