Beides öffnen, wenn gar nix offen ist. z.B.
Code:
for(i=OrdersTotal()-1;i>=0;i--) {
if(OrderSelect(i,SELECT_BY_POS)) {
if(OrderType()==OP_BUY&&OrderMagicNumber()==Buy_MN&&OrderSymbol()==Symbol())bool Buy_Mark_inv=true;
if(OrderType()==OP_SELL&&OrderMagicNumber()==Sell_MN&&OrderSymbol()==Symbol())bool Sel_Mark_inv=true; } }
Code:
if( ... Buy_Mark_inv==false && Sel_Mark_inv==false ) {
if( Buy==true )OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,Buy_SL,Buy_TP,0,Buy_MN,0,MediumBlue);
if( Sell==true )OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,Sel_SL,Sel_TP,0,Sell_MN,0,BurlyWood); }