Rahle: Can all this be done (open 3 buy orders) starded by 1 tick?
| Of course, you just have to refresh the predefined variables between server calls. // if(BuyTotal<3) while(BuyTotal<3) { RefreshRates(); int ticket=OrderSend(Symbol(),OP_BUY,1.00,Ask,3,0,0,"I.Am.A.Buy.Order",Magic,0,clrNONE); if(ticket<0) { Print("OrderSend failed with error #",GetLastError()); } else { Print("OrderSend placed successfully"); BuyTotal++; } } |
WHRoeder:
Rahle: Can all this be done (open 3 buy orders) starded by 1 tick?
| Of course, you just have to refresh the predefined variables between server calls. |
Thank you WHRoeder! It is exactly as I needed.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello, I have a question, is there a way to code EA to make more than 1 cycle (e.g OrderSend) after getting a tick form market.
Sometimes time between tick's is long and I want to open 3 buy orders. Today with my coding skills I need to wait for 3 market ticks to occure to get 3 buy orders open.
Is there a way when first tick is generated EA will not stop until EA code has "checked/made all changes" what it was supposed to do and wait for next tick.
Here is a sample of code that takes at least 3 maket ticks to "finish". Can all this be done (open 3 buy orders) starded by 1 tick? If MQL4 code cannot be programmed like this, can you suggest some other solution to look into?