Hello,
I was trying to code a Management strategy for my Bot and noticed that there is a bug with Limit pending orders when partially close position.
If i use Sell mypartialclosesize at market it work, but if i try to use Sell mypartialclosesize at mylimit Limit, it does not work.
It can work sometimes with Limit pending orders when partially close position though : for that you need to enter a position with more than one order, and then when you will try to close partially the position, Limit pending orders allows only to close partially the first opened position… Not sure if i am clear here 🙂
For example, if my bot buy 10 shares with one order only, and try to close partially the position with Limit pending orders, it does not work (i had to use at market pending orders to do so)
If my bot buy 10 shares with 2 or more orders (for example, it buy 2 shares, then 3 shares, then 5 shares), then it is possible to close partially the position with Limit pending orders, but not the whole position : only the part of the position that is not the last buy order (in my exemple, the last 5 shares are not partially closeable with Limit pending orders).
Srange ? Have you notice same thing ?
I think this bug ex^plane several issues like this that have found no solution :
https://www.prorealcode.com/topic/vente-partielle-de-contrat-sur-indice/page/2/