I have done several tests in market replay and the logic works discreetly.
It happens that orders accumulate for example long in a progressive way up to the set limit eg: 4 long.
The profit order is activated in the correct Working state so that 4 Sell at the correct price limit.
It happens though in some cases that this order of Profit 4 Sell does not find the full Filled which remain in portfolio example 2 Long orders. At this point they do not have more profit order so they remain hung until for example the closing market takes place.
In this situation by entering the log I verified that the order status "Buyorder " is no longer filled but turns into part. Filled.
Now I wonder what function I can introduce to set the profit even on a part. Filled order succeeded to a emptying order that failed to fill?
Thanks a lot yet
Comment