怎么在没仓位时同时开仓。有仓位时停止开仓。
请帮忙。。谢谢
extern double orderLots = 0.01;
extern double magic = 8888;
extern string memo = "磅美 日美";
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
{
OrderSend("GBPUSD", OP_SELL, orderLots, MarketInfo("GBPUSD", MODE_BID), 100, 0, 0, memo, magic, 0, CLR_NONE);
OrderSend("USDJPY", OP_SELL, orderLots, MarketInfo("USDJPY", MODE_BID), 100, 0, 0, memo, magic, 0, CLR_NONE);
return(0);
}
}
//+------------------------------------------------------------------+
|