if true eu gu uc uj every open one order ,how to do it ?请教符合条件 eu gu uc uj 分别开一个单子 我搞不定了 谁有类似的代码 求救!!!

 

if true , eu gu uc uj every symbol open one order ,how to do it ?

my code just opened three order(eu gu uc opened, uj not )! why?

请教符合条件 eu gu uc uj 分别开一个单子 我搞不定了 谁有类似的代码 求救!!!

我写的代码只开三个单子!最后一个uj 没有开单,原因是什么?如何实现?

if(true)

{

if (OrdersTotal( ) > maxOpen) return ;
for(i=maxOpen-1;i>=0;i--)
{
if(OrderSelect(res1, SELECT_BY_TICKET)==false)
res1=OrderSend("EURUSD",OP_BUY,lots,Askeu,4,Askeu-StopLoss*Point,Askeu+TakeProfit*Point,"",MAGICMA+1,0,Blue) ;
Sleep(5000);
if(OrderSelect(res2, SELECT_BY_TICKET)==false)
res2=OrderSend("GBPUSD",OP_BUY,lots,Askgu,4,Askgu-StopLoss*Point,Askgu+TakeProfit*Point,"",MAGICMA+2,0,Blue) ;
Sleep(5000);
if(OrderSelect(res3, SELECT_BY_TICKET)==false)
res3=OrderSend("USDCHF",OP_SELL,lots,Biduc,4,Biduc+StopLoss*Point,Biduc-TakeProfit*Point,"",MAGICMA+3,0,Blue) ;
Sleep(5000);
if(OrderSelect(res4, SELECT_BY_TICKET)==false)
res4=OrderSend("USDJPY",OP_SELL,lots,Biduj,4,Biduj+StopLoss*Point,Biduj-TakeProfit*Point,"",MAGICMA+4,0,Blue) ;
Sleep(5000);
}

}

 
你每下一个单休息5秒钟,报价早就变了,你每个OrderSend之前调用一下RefreshRates。
 

ok了