if (acct.Positions != null)
{
UnRealizedPNL = 0;
PositionCollection positions = acct.Positions;
foreach (Position pos in positions)
{
UnRealizedPNL = UnRealizedPNL + pos.GetProfitLoss(Close[0], PerformanceUnit.Currency);
}
// Condition set 2
if (UnRealizedPNL >= Profit)
{
ExitLong("", "Long");
ExitShort("", "Short");
}
}
}
[/CODE]
Comment