gviali: I really can't see why this is happening, a
order=OrderSend(Symbol(),OP_BUY,lots,Ask,0,0,0,"custom buy arrow",magicnumber,0,Blue); Sleep(sleep); if(order==0) { Print("Error Opening Buy Order: ",GetLastError()); |
|
WHRoeder, i've took it out the Sleep function. It was making the EA opens new orders when the Sleep time runned over.
So this should work to inform why it's not opening the order, right?
if(order>0) { Print("Order OK"); } else { Print("Order not OK:", GetLastError()); }
Thanks for your response! And sorry for the double post, I just toth that old one was pratically dead.
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 guys.
I recently seen that the simple EA i've done to open trades when a custom indicator plots an arrow has been missing some trades.
I've configured the indicator to give a lot of alerts, exactly for testing the functioning of the EA , and from like 10 signals the indicator gave, the EA opened only 7, its not a pattern, but its missing a significant ammount of oportunities.
I really can't see why this is happening, and the GetLastError() do not return me any information about this missing trades. Could it be the some problem with the broker?
The source code for it is in this post: https://www.mql5.com/en/forum/154699/page2
Thanks in advance.