Naja, wenn er immer die letzte BUY und SELL meint, so könnte man deinen Code
z.B. so erweitern
Code:
double lastopenprice_b = 0, lastopenprice_s = 0;
for(int iPos_H=OrdersHistoryTotal()-1; iPos_H>=0; iPos_H--) // 0, oder OrdersHistoryTotal() - 6 halt
{
if(OrderSelect(iPos_H, SELECT_BY_POS, MODE_HISTORY))
{
if(OrderType() == OP_BUYSTOP)
lastopenprice_b = OrderOpenPrice();
else if(OrderType() == OP_SELLSTOP)
lastopenprice_s = OrderOpenPrice();
if(lastopenprice_b && lastopenprice_s)
break;
}
}