Support Board
Date/Time: Sat, 29 Mar 2025 01:21:50 +0000
Post From: Assistance Differentiating Open (Active PnL) vs. Closed (Finalized PnL) Orders in Simulati
[2025-03-23 18:17:47] |
User329576 - Posts: 14 |
Real Mode vs. Simulation In real trading mode, once an order is executed, it remains in the order list with an OrderStatusCode indicating its state (for example, SCT_OSC_FILLED for a fully filled order, SCT_OSC_OPEN for an order still pending, etc.). In simulation mode, however, market orders are filled instantly, which means their OrderStatusCode is generally SCT_OSC_FILLED even though the position remains active (i.e., the PnL fluctuates). No Dedicated Built-In Function Based on my thorough research in the documentation, there is currently no built-in function or constant in ACSIL that uniquely distinguishes an order with a fluctuating PnL (an active position) from an order with a fixed PnL (orders offset by an opposite or flat order). This means that the API simply returns the order data as is: in simulation mode, all orders are filled immediately and their data indicates that they are “filled,” without any explicit marking to signify that an “open” order (in terms of PnL tracking) is still active. |