EA shows 6 errors ' OrderSend',' OrderClose',and 'OrderSelect' should be checked. On test the trades are grouped together in one bar when triggered ?
Topics concerning MT4 and MQL4 have their own section.
You have been told this before.
I have moved your topic to the MQL4 and Metatrader 4 section.
Read my post
Which will give you some clues.
- 2021.04.08
- www.mql5.com
If the compiler issues a warning don't ignore it, fix it.
Following examples not tested.
Thank you a lot that helped my compilation was spot on, but I still encounter a problem in back testing every time trades are executed they pile on top of each other, why is this happening ?
Thank you a lot that helped my compilation was spot on, but I still encounter a problem in back testing every time trades are executed they pile on top of each other, why is this happening ?
Because that is how you have coded it.
For this you only need to check when a new bar opens
static datetime barTime=0; datetime thisBarTime=Time[0]; if(barTime!=thisBarTime) { barTime=thisBarTime; //Code to be executed only once when a new bar opens }
Hi,
Need help my EA opens lots of trades in one bar grouped together? and the warnings on the code how do I correct this ?