Oops... MagicNumberLong and MagicNumberShort are Molanis variables, not standard mql commands. So take them out of the code and you get:
OrderSelect(0,SELECT_BY_POS)==true&&OrderSymbol()==Symbol()&&OrderType()==OP_BUY&&OrderOpenPrice()>MarketInfo(Symbol(),MODE_BID)
OrderSelect(0,SELECT_BY_POS)==true&&OrderSymbol()==Symbol()&&OrderType()==OP_SELL&&OrderOpenPrice()>MarketInfo(Symbol(),MODE_ASK)
THIS CODE WILL MANAGE ALL OPEN TRADES FOR THE CURRENT SYMBOL.
_________________ I'm not a programmer, but I play one on TV.
|