Login Page - Create Account

Support Board


Date/Time: Tue, 04 Mar 2025 16:33:02 +0000



Post From: Issues with sc.GetTradePosition()

[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