Support Board
Date/Time: Wed, 02 Jul 2025 04:48:32 +0000
[Programming Help] - s_SCPositionData Variable .OpenProfitLoss Does Not Return Correct Value On Sim Mode
View Count: 687
[2021-02-18 13:49:05] |
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. |
[2021-02-18 14:25:25] |
Ackin - Posts: 1865 |
User Discussion Board - Basic Rules Sierra Chart - Max These are the basic rules for the User Discussion Board. 1. Sierra Chart Support will not be handling any support requests here. If you want Sierra Chart Support to help you, please post your question on the Support Board here: https://www.sierrachart.com/SupportBoard.php 2. We expect users to be civil and respectful when posting. This is a place for users helping each other with Sierra Chart and programming help and nothing more. |
[2021-02-18 16:04:35] |
User36703 - Posts: 29 |
Thank you for your answer and pointing out my mistake. I created thread on the Support Board here: s_SCPositionData Variable .OpenProfitLoss Does Not Return Correct Value On Sim Mode Hopefully, I will continue with clarification there.
|
To post a message in this thread, you need to log in with your Sierra Chart account: