Login Page - Create Account

Support Board


Date/Time: Thu, 28 Nov 2024 20:41:32 +0000



Post From: Is PositionData.PositionQuantity available in Replay Mode?

[2023-04-12 04:38:15]
wadams - Posts: 4
Within a study I'm writing, I have this code that gets updated every bar (using BHCS_BAR_HAS_CLOSED):


s_SCPositionData positionData;
sc.GetTradePosition(positionData);
int positionSize = positionData.PositionQuantity;

I'm running the study on a chart in replay mode. Is PositionQuantity supposed to be populated?

I think the answer is no, because only the positions that show up on the "Trade >> Trade Positions Window" will get pulled in using `sc.GetTradePosition()`. But I wanted to ask as a sanity check.