I have same EA running on two charts EURUSD,same period. I need the second EA to execute trade with 20 secs delay from the first one.
Sleep() is usually not the best option with MT5.
Could you use the OnTimer() event to place the trade in 20 seconds?
Sleep() is usually not the best option with MT5.
Could you use the OnTimer() event to place the trade in 20 seconds?
Do not double post.
I have deleted your other topic and will move this to the mql4 sub-forum.
- zlattin2000: Sorry, forgot to mention it is EA running on MT4.Why did you post your MT4 question in the Root / MT5 EA section instead of the MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. - zlattin2000: I have same EA running on two charts EURUSD,same period. I need the second EA to execute trade with 20 secs delay from the first one.They both received the same tick and have decided to open. Why do you think you need a sleep?
- Why did you post your MT4 question in the Root / MT5 EA
section instead of the MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. - They both received the same tick and have decided to open. Why do you think you need a sleep?
too late i saw it is MT5 section, sorry. Anyway, i need that delay 20 secs as i am sending signals to ZuluTrade and there should be a time gap between two positions in order to be copied.
Thanks
Do not double post.
I have deleted your other topic and will move this to the mql4 sub-forum.
You have the code. Drop the second EA. Have the first send two orders. What's the problem?
You have the code. Drop the second EA. Have the first send two orders. What's the problem?
- If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.
- or pay (Freelance) someone to code it.
Hiring to write script - General - MQL5 programming forum
No free help
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
it looks i am struggling to find the answer. Searched over and over, but with no success.
I have same EA running on two charts EURUSD,same period. I need the second EA to execute trade with 20 secs delay from the first one.
I use:
void Sleep(
int 20000 // interval
);
1.Is it correct?
2.Where is the correct place to paste the function code?
3.Should i just save it or compile it?
Many thanks,