Troubles with history lookup
Replace OrdersTotal() with OrdersHistoryTotal() and reverse the iteration:
for(int i = OrdersHistoryTotal() - 1; i >= 0; i--)
Irtron:
Replace OrdersTotal() with OrdersHistoryTotal() and reverse the iteration:
Replace OrdersTotal() with OrdersHistoryTotal() and reverse the iteration:
for(int i = OrdersHistoryTotal() - 1; i >= 0; i--)
Great!
Thanks a bunch.
Good day,
For some reason "nb" always equate to zero when i can see my history as having some of the current symbol.
for(int i=0;i<OrdersTotal();i++)
{
if( OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==false )
{
Print("Accès refusé à l`historique des transactions:", GetLastError() );
break;
}
if( OrderSymbol()==Symbol() ) nb++;
}
Print("NB:",nb);