Login Page - Create Account

Support Board


Date/Time: Sat, 15 Mar 2025 07:35:12 +0000



Post From: s_SCPositionData Variable .OpenProfitLoss Does Not Return Correct Value On Sim Mode

[2021-02-18 16:00:43]
User36703 - Posts: 29
Hello,

I have found the issue with s_SCPositionData variable in case of calling for .OpenProfitLoss in new released versions. In case of live trading mode, it is ok and it gives correct value. But in simulation mode it gives absolutely different number which does not make sense (e.g. 20 C vs -161215 C in debug mode). When I was building the code last year, it was working ok.

I am getting PositionData variable through this logic:

s_SCPositionData PositionData;
sc.GetTradePositionForSymbolAndAccount(PositionData, EntryOrderDetails.Symbol, sc.SelectedTradeAccount);

Sierra Chart support, please can you check what is the difference now and correct it if needed? Thank you.