I have some issue related to partial fills, which I've been trying to figure out myself, but I guess I need your advise here as I probably lack some understanding of how Managed Approach works.
So, basically I noticed that each time a partial fill is being executed, right after (see the green line at 7:40:09 and the white line below it) the program (not my code) tries to submit a stop-loss order against the entry using some UNDEFINED by me market stop-loss price that is always in the wrong direction (like,if I am buying at $84.06 it will try to put it somewhere above (like in at $90.83 in this fresh example), which leads to the green system error: "Sell-stop or sell stop limit orders can't be placed above the market..." and resulting the position to be cancelled and the whole strategy being disabled as well.
I have triple checked my code and there is nothing that should trigger such a response and I am unaware why Ninja decides to do that. I've read the related sections in the Ninja manual, but found nothing that could hint about Ninja trying to submit some automatic stop-loss orders when partial fills are executed, nor why it does that incorrectly and causes the error, nor why it decides to cancel the position on its own and disables the strategy.
Attaching SS.
Any useful comment is much appreciated ))
Comment