When I print this out though, it puts my last fill information instead of my position quantity into the array Instr[10, i].
Can you see why? Here is the code snipit:
for (int i = 0; i < mySymbol.Count; i++)
{
if (BarsInProgress == i && Close[0] != 0)
{
if (Position.MarketPosition == MarketPosition.Flat) Instr[10, i] = 0;
if (Position.MarketPosition == MarketPosition.Long) Instr[10, i] = Position.Quantity;
if (Position.MarketPosition == MarketPosition.Short) Instr[10, i] = Position.Quantity * -1;
Instr[11, i] = Position.AvgPrice;
Print("BIP: " + BarsInProgress + mySymbol[i] + " Qty: " + Instr[10, i] + " Avg$:" + Instr[11, i]);
}
}

Comment