I am trying to use the following code and it doesnot work .
Thanks
BJ
int buy_counter = 0;
int sell_counter = 0;
for (int i=0; Account.Positions.Count;i++)
{
if(Account.Positions[i].MarketPosition != MarketPosition.Flat)
{
if(Account.Positions[i].MarketPosition == MarketPositon.Long)
buy_counter++;
if(Account.Positions[i].MarketPosition == MarketPositon.Short)
sell_counter++;
}
}
Print("Total Open Long :" + buy_counter + "\n");
Print("Total Open Short :" + sell_counter + "\n");
Comment