Need help my EA opens lots of trades in one bar grouped together? and the warnings on the code how do I correct this ?
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.
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 ?
Because that is how you have coded it.
For this you only need to check when a new bar opens
static datetime barTime=0;
//Code to be executed only once when a new bar opens
Please enable the necessary setting in your browser, otherwise you will not be able to log in.