Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 09:38:55 +0000



Post From: sc.GetTradePosition() : from where does it get the data?

[2023-03-07 15:41:12]
BenjFlame - Posts: 305
Hi Sierra,
I put...


s_SCPositionData PositionData;
int Result = sc.GetTradePosition(PositionData);
int Quantity = PositionData.PositionQuantity;
if (Quantity == 0)
return;


...in a trading ACSIL study top level right after SetDefaults block.
So, it gets triggered multiple times intrabar. Does it query the remote trading broker each time to get this info? Or is it local with some sort of local cache of that info? I guess it could cause a problem if it requests the data continuously from the broker so I'm wondering how it works.

Also, is it ok to have this code where I put it? Just after the default block and being called several times intrabar?