MT4 fails to sync executed pending Orders during fast moving market and recognizes it a pending order that cant be deleted
Forum on trading, automated trading systems and testing trading strategies
Hello,
Please EDIT your post and use the SRC button when you post code.
Thank you.
It should look something like this...
for(int i=OrdersTotal()-1;i>=0;i--) if(OrderSelect(i,SELECT_BY_POS)&&OrderSymbol()==Symbol()&&OrderMagicNumber()==MAGIC) if(avgSpread > maxSpread|| MathAbs(rateChange) < VelocityTrigger * _Point) for(int j=0;j<2 && !OrderDelete(OrderTicket());j++) // extra attempt if first one fails Print(__FUNCTION__," <!!!> ",ErrorDescription(GetLastError()));
nicholishen:
It should look something like this...
I will try to apply that and it resolves it
Chike Assuzu:
Your using the wrong orders. Limit orders go under the price and stop orders go above it.
I tried it but still same issue occured.
this image shows the pending trades
Chike Assuzu:
EA already executed several trades before it occured again on the last 2 trades you can see the error
Yeah because you're sending the wrong orders. Use limit orders instead.
EA already executed several trades before it occured again on the last 2 trades you can see the error
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
MT4 fails to sync executed pending Orders during fast moving market and recognizes it a pending order that cant be deleted. It occurs occasionally during fast moving market.
Sometimes I notice an open pending order that could't be deleted by EA and the market have passed that price. If i try deleting it manually is says ''invalid '',but when i restart MT4 it appears to be an open trade. Can any help me or i'm experiencing the same issue ?
This code creates new pending Orders
}
This code check for order status