Use search engine - https://www.mql4.com/search/OLD%20TICK
and one of results will be the old tick topic
Thank you
Aldhy SP
Thank you Rost. i already read that thread before i post. My next question will be how can I prevent it?
Why ?
I mean, everytime those error messages show up, my EA stop working until I remove all ea from the charts and attach it again one by one.
No, it's wrong. EAs don't stop operation when an "OLD TICK" comes.
No, it's wrong. EAs don't stop operation when an "OLD TICK" comes.
Hello,
I have the same problem. When this error occured, my EA doesn't work, althogh after that error my EA continues to work fine.
Is there somthing I can do, so my EA will still work while this error occured? Is there some "Error Code" for that error?
Hello,
I have the same problem. When this error occured, my EA doesn't work, althogh after that error my EA continues to work fine.
Is there somthing I can do, so my EA will still work while this error occured? Is there some "Error Code" for that error?
I resolved this error in my EA by forcing the desired action again and again until it is done. For example:
instead of just closing an order like this:
Ans=OrderClose(ticket,Lot,Ask,2);// Close order
I used a while cycle like this:
Ans=false;
while (Ans==false)
{
RefreshRates();
Ans=OrderClose(ticket,Lot,Ask,2);// Close order
}
This way if an "Old tick" error occur when closing an order EA will atempt to close the order again and again until it will close.
The drawback is that this trick cannot be used in backtesting, otherwise Your EA may end up in an infinity loop while analyzing history charts. It sometimes is so that EA is unable to close orders whie backtesting.
Similarly for opening orders You use a while cycle like this:
ticket=-1;
while (ticket<0)
{
RefreshRates();
ticket= OrderSend(Symbol(), OP_BUY, New_Lots, Ask, 5, Ask-DefSL*Point, Ask+DefTP*Point, koments, 0, 0, DeepPink);
}
In this case EA will keep on attempts to open a position until it succeeds.
delete all history directory *.hst
could brokers throw an 'old tick' at you just to disrupt your trading?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I run same EA on 6 charts and yes this is an active EA which close and open very often.
But everytime an OLD TICK error message occur in the JOURNAL for one chart than it will followed by another "OLD TICK" error message for other chart.
And than the EA stop working. And it will working again when :
1. I have to remove all the EA from the chart and attach it again one by one. Turn off and turn on again the "Enable EA" button will not solve the problem.
2. Or day move to next day at 00.00
I already try to use OrderSendReliable and OrderCloseReliable but the problem still occurs.
Any suggestion will be appreciated.
BTW, my broker is Liteforex.org and my EA is martingale base EA.
Thank you before.
Aldhy SP