Ach @MA-EA, richtig lesen ist schon eine Kunst!
Prinzipiell läuft das so:
Code:
bool PO_Check() {
for(int i = OrdersTotal()-1; i >= 0; i--) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber){
if (OrderType() == OP_BUYSTOP || OrderType() == OP_SELLSTOP) {
if (OrderOpenPrice() == Vergleichspreis) return(false);
}
}
}
}
return(true);
}
//oder über die TicketNumber:
bool PO_Check() {
if (OrderSelect(TicketNumber, SELECT_BY_TICKET)) {
if (OrderType() == OP_BUYSTOP || OrderType() == OP_SELLSTOP) {
if (OrderOpenPrice() == Vergleichspreis) return(false);
}
}
return(true);
}
traderdoc