Loop to send order
If ticket1<0, cycle for won't work. Try this:
{ ... int ticket1=-1; while(ticket1 < 0){ RefreshRates(); ticket1 = OrderSend(symbol1, OP_BUY, LotSize1, MarketInfo(symbol1,MODE_ASK), Slippage, 0, 0, "Buy-Buy-Hedge",Magic,0,Green); if(ticket1==-1) Print ("OrderSend failed with error #", GetLastError()); } return(0); ... }
Hello,
Can someone confirm this code is ok. I have coded it to loop to send order.
Thanks