- Inform top and bottom line closest to current price
- Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes
- EA not closing trades fast enough
I think you need to check your understanding of the continue and break loop flow control statements.
Trying putting the continue on the same line as for example if () {dosomthing(); continue} ; and remember that this takes you the } close of the for loop
The break takes you out of the for loop.
In your mind what is the next thing that should be done after the exection of the continue instruction?
-
if the answer is a++; b++ ; m++ then the code is NOT working as you intended it
-
if the answer is it increments the c variable and does another execution of the loop then it is working as intended.
The second one. I know what continue; does and I don't think I asked for a basic programming lesson. I made myself perfectly clear as to what I need the code to be doing and what it does instead and I'm looking for possible bug(s) in my program which I obviously could not find. Please only give me a solution or a suggestion if you have one. Thanks in advance!
I was avoiding the heavy concentration of pretending to be a computer and write numbers down for each instruction.
-
-
if (min==Low[b]) break; // if min equal to low[14] we have found low but min is a double precision value so it is difficult for two doubles to be exactly the same
-
If(min>=Low[b]-0.0001 && min<=Low[b]+0.0001) break ; //choose a range accuracy for a floating point number
Thought - why not use the fractal indicator to find the last low and high?
Thought - why not use the fractal indicator to find the last low and high?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use