Support Board
Date/Time: Thu, 27 Feb 2025 22:16:42 +0000
Post From: Impossible to have information on current positions
[2021-07-23 14:57:10] |
algo221 - Posts: 3 |
Hello. I try to access the number of positions but the results always return 0. While there are many positions open on the current symbol. I tried several possible options but the results always return 0. #include "sierrachart.h" SCDLLName(" footprint") ; SCSFExport scsf_footprint(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { sc.AllowMultipleEntriesInSameDirection = 1; sc.AllowOppositeEntryWithOpposingPositionOrOrders = 1; sc.UsesMarketDepthData=1; return; } s_SCPositionData PositionData1; int infopos=sc.GetTradePositionForSymbolAndAccount(PositionData1,sc.Symbol,sc.SelectedTradeAccount); SCString msg; msg.Format("%d",PositionData1.PositionQuantity); sc.AddMessageToLog(msg,0); } |