You could try this . . . .
Find this part of the code. It's in the SendOrder function . . .
if (ticket < 0) { err = GetLastError(); if (errorAlerts) Alert(symbol," ordermodify failed, error #",err,""); Print(symbol," ordermodify failed, error #",err,""); return(false); }//if (ticket < 0)
after it add . . .
Sleep(15000);
I will try this, thanks for you answer
Remember sleep won't work in the tester
int start(){ static datetime nextTrade; if (tradeConditions && TimeCurrent() > nextTrade){ nextTrade = TimeCurrent() + 15; orderSend( } }
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
Hi,
i found a really good ea but what i want is an sleepfunction.
I cant modify the ea hopefully someone can help me.
I want that after every open trade the ea wait for 15second to open a new one.
Can anyone do this for me please?