Um das Array nicht unnötig aufzublähen und nur!! auf die Historie (s. 1.Post!!), alternativ hinter // nur!! auf die offenen Orders zuzugreifen sollte dann in etwa so etwas stehen:
Code:
double ArrayOrderOpenPreis[];
...
ArrayResize(ArrayOrderOpenPreis, OrdersHistoryTotal());
...
ArrayInitialize(ArrayOrderOpenPreis,0);
for(int i=0; i<OrdersTotal(); i++)
{
if(OrderSelect(i,SELECT_BY_POS, MODE_HISTORY))
//if(OrderSelect(i,SELECT_BY_POS, MODE_TRADES))
{
ArrayOrderOpenPreis[i]=OrderOpenPrice();
}
}
traderdoc