void open(){
int 子_in_1=0;
int 子_in_2;
//----------------------------
for (子_in_2 = OrdersTotal() - 1 ; 子_in_2 >= 0 ; 子_in_2 = 子_in_2 - 1)
{
OrderSelect(子_in_2,SELECT_BY_POS,MODE_TRADES);
if (OrderSymbol()==Symbol()&&OrderMagicNumber() != magic)
{
子_in_1 = 子_in_1 + 1;
}
}
if (Close[1]>Close[2]&&子_in_1==OrdersTotal()){OrderSend(Symbol(),OP_BUY,0.10,MarketInfo(Symbol(),10),30,MarketInfo(Symbol(),10)-Stoploss*Points,MarketInfo(Symbol(),9)+TakeProfit*Points,magic,0,Red);}
if (Close[1]<Close[2]&&子_in_1==OrdersTotal()){OrderSend(Symbol(),OP_SELL,0.10,MarketInfo(Symbol(),9),30,MarketInfo(Symbol(),9)+Stoploss*Points,MarketInfo(Symbol(),10)-TakeProfit*Points,magic,0,Red);}
}
|