Login Page - Create Account

Support Board


Date/Time: Sat, 29 Mar 2025 01:48:01 +0000



Post From: Assistance Differentiating Open (Active PnL) vs. Closed (Finalized PnL) Orders in Simulati

[2025-03-22 21:20:10]
User329576 - Posts: 14
Hello,

I am currently experiencing an issue during my trading simulation tests. In my ACSIL study, I send simulated orders that are immediately filled. However, I would like to clearly distinguish in the log between:

Orders that remain “open” (i.e., those whose PnL is still fluctuating and are awaiting closure), and

“Closed” orders (i.e., those that have been closed via a flat order or an opposing order of the same quantity and whose PnL is now finalized).

In simulation, all orders are filled immediately, which causes the entry orders to appear as “closed” as soon as they are executed. Nevertheless, I would like to obtain an actionable indicator—either a function or constant within ACSIL—that allows me to directly identify whether an order is still “open” (with non-finalized PnL) or definitively closed. My goal is to avoid having to create my own flags or derivation conditions that could introduce errors or might not be robust enough to handle a high and rapid flow of different orders.

This functionality would be very useful. Alternatively, please let me know if there is any method to achieve this within ACSIL.

Please note that this issue concerns trading simulation tests only. I am seeking a reliable method that allows me to display in my logs, for example:

“BUY Order pending closure” (when a buy order remains open with fluctuating PnL),

“BUY Order closed” (when a flat order or an opposing order closes the position),

and so on for other order types.

Thank you in advance for your advice and recommendations.

Sincerely,