Login Page - Create Account

Support Board


Date/Time: Mon, 21 Apr 2025 23:30:21 +0000



OpenPositionsProfitLoss gets stuck when closing a position

View Count: 282

[2023-02-17 06:06:36]
User5044343 - Posts: 68
I'm connected to the websocket feed and I store message updates to log Account Balances via dtc ( good stuff, thanks Sierra ).

Issue I noticed is when a position is getting closed - it was about 18 contracts - about 12 updates were sent ( all in 1 second, since I flattened the position), each time with the CashBalance changing since the position was getting smaller, but the OpenPositionsProfitLoss field was stuck at the same amount until the entire position was closed.

Since everything works perfectly with Sierra - I feel this is a bug that the OpenPositionsProfitLoss remains unchanched while the CashBalance is getting adjusted to reflect the decreased open position.

Issue is I'm using CashBalance +OpenPositionsProfitLoss to calculate the "Net" Cash balance - but if OpenPositionsProfitLoss isn't changing when CashBalance is changing I get a bad reading.
[2023-02-17 11:16:55]
Sierra_Chart Engineering - Posts: 19290
Yes this would make sense because this is updated independently on a timer:
but the OpenPositionsProfitLoss field was stuck at the same amount until the entire position was closed.

It is not updated tick by tick or as the position changes.

Due to the implementation of how this works it is not easily changed.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account