Support Board
Date/Time: Tue, 04 Mar 2025 16:05:00 +0000
Issues with sc.GetTradePosition()
View Count: 594
[2021-12-15 15:29:16] |
Trader & Sierra++ developer - Posts: 110 |
Hi Sierra, In a custom study, calling sc.GetTradePosition(), the DailyProfilLoss and the TradeStatsDailyProfitLoss fields of the s_SCPositionData struc are always zero (of course they should not - the GetTradeStatisticsForSymbolV2() gives correct data). The OpenProfitLoss field is OK. sc.MaintainTradeStatisticsAndTradesData is set. A clue : i'm using a trade symbol different than the chart symbol (but the OpenProfitLoss works so it's not due to that). What is happening ? Thanks |
[2021-12-15 16:39:57] |
|
Those are older fields in that data structure and if they are zero, that means they are not supported within the current context of the function call. Do not use those fields. We should remove them. Use this function to get the data you need: GetTradeStatisticsForSymbolV2() 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, *change* to 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: