Once the market order is placed by the strategy the order used to go pending new / submitted status . then filled or cancelled.
Now since last 1 week i am observing the market orders are going directly to cancelled status and then filled. Due to this i have some logic to execute in the onOderFilled() that is not executed and the strategy small window do not used to capture the position and P/L.
In the below screen shot marked red is the new order but it went directly to Cancel then Filled status with the same price.
But other order from the same strategy it went to status Pending new --> Submitted --> Filled.
in code have
In Back testing still the code is working as expected. Once the order is placed the positions and P/L are available in the small strategy window . Even if 3 or 3 strategy is running it is working fine.
But its issue with the real time orders. So not sure sure is Exchange issue or code issue. Same code was working till last one week.
Now since last 1 week i am observing the market orders are going directly to cancelled status and then filled. Due to this i have some logic to execute in the onOderFilled() that is not executed and the strategy small window do not used to capture the position and P/L.
In the below screen shot marked red is the new order but it went directly to Cancel then Filled status with the same price.
But other order from the same strategy it went to status Pending new --> Submitted --> Filled.
in code have
ctx.buy(qty); // Open Long Position
In Back testing still the code is working as expected. Once the order is placed the positions and P/L are available in the small strategy window . Even if 3 or 3 strategy is running it is working fine.
But its issue with the real time orders. So not sure sure is Exchange issue or code issue. Same code was working till last one week.
Last edited: