The "continue" skips to the last "}" of the "for" loop, but still does the next k.
The "break" skips to just AFTER the last "}" of the "for" loop; no more iterations.
I have *zero* affiliation, and get no benefit whatsoever, by making the following recommendations:
Suggestion 1:
If I were starting out programming MT4, and I don't mind investing some $, the 4-course set (and a few others) for $196 is here:
https://learnmql4.teachable.com/
These are video courses by Jim Dandy. Nothing has been updated or posted for ~5 years, but even so, it has very good "C" style MQL4 tutorials.
When I wanted to learn more about Graphical Interfaces, I bought that course. It was a good starting point; now I've learned more on my own.
MQL4 also offers "C++" (aka Object Oriented) style language, which is far more complicated and hard. (I really don't get all of it myself, but I try, and use it for mostly GUI work). Both styles of code work, but almost all public code is the "C" style.
Suggestion 2:
All free, there are a ton of tutorials at: https://orchardforex.com/
I have only watched a few of them, but he explains things thoroughly and provides his code examples on GitHub too.
Best to just go to the very last page of videos (presently, the 13th page). You'll find his earliest posts.
His first happens to be "Writing a MetaTrader Indicator step-by-step"
Suggestion 3:
As always, when using the MetaEditor, put your mouse and click somewhere in the code to move the cursor there. Hit "F1" to bring up the MQL4 (or 5) documentation for that command/keyword.
In Emmzett's post #7, he said "It gets easier if you properly format your code." Did you explore HOW to do that?
In MetaEditor, Tools -> Styler
Does your code call any procedures (aka functions)? (Not basic commands). You can jump to those functions with your cursor clicked between the letters of that procedure, then Alt+G goes to that spot in your code OR in the #include file it came from! (This is the "Edit -> Go to definition" command).
(Strangely enough, if you double-click and select the entire procedure name, then Alt+G doesn't work. Only put the cursor in one spot of the name).
Suggestion 4:
In fact, as a RULE of life, you should always learn as much as you can about whatever topic you expect to invest in, and get returns. The first task would be... learn how to use your tools. I found this post with tips to find Hot keys for both MetaEditor and MT5 (usually the same as MT5):
The "break" skips to just AFTER the last "}" of the "for" loop; no more iterations.
I have *zero* affiliation, and get no benefit whatsoever, by making the following recommendations:
Suggestion 1:
If I were starting out programming MT4, and I don't mind investing some $, the 4-course set (and a few others) for $196 is here:
https://learnmql4.teachable.com/
These are video courses by Jim Dandy. Nothing has been updated or posted for ~5 years, but even so, it has very good "C" style MQL4 tutorials.
When I wanted to learn more about Graphical Interfaces, I bought that course. It was a good starting point; now I've learned more on my own.
MQL4 also offers "C++" (aka Object Oriented) style language, which is far more complicated and hard. (I really don't get all of it myself, but I try, and use it for mostly GUI work). Both styles of code work, but almost all public code is the "C" style.
Suggestion 2:
All free, there are a ton of tutorials at: https://orchardforex.com/
I have only watched a few of them, but he explains things thoroughly and provides his code examples on GitHub too.
Best to just go to the very last page of videos (presently, the 13th page). You'll find his earliest posts.
His first happens to be "Writing a MetaTrader Indicator step-by-step"
Suggestion 3:
As always, when using the MetaEditor, put your mouse and click somewhere in the code to move the cursor there. Hit "F1" to bring up the MQL4 (or 5) documentation for that command/keyword.
In Emmzett's post #7, he said "It gets easier if you properly format your code." Did you explore HOW to do that?
In MetaEditor, Tools -> Styler
Does your code call any procedures (aka functions)? (Not basic commands). You can jump to those functions with your cursor clicked between the letters of that procedure, then Alt+G goes to that spot in your code OR in the #include file it came from! (This is the "Edit -> Go to definition" command).
(Strangely enough, if you double-click and select the entire procedure name, then Alt+G doesn't work. Only put the cursor in one spot of the name).
Suggestion 4:
In fact, as a RULE of life, you should always learn as much as you can about whatever topic you expect to invest in, and get returns. The first task would be... learn how to use your tools. I found this post with tips to find Hot keys for both MetaEditor and MT5 (usually the same as MT5):
- MetaEditor Help → Workspace → Hot keys
- MetaTrader 5 Help → Getting Started → For Advanced Users → Hot Keys
- MetaTrader 4 Help → User Interface → Fast Navigation → Hot keys
Search yourself and find PDF Keyboard maps for MT4/5 Hot keys, or other similar lists.
Most importantly: Spend the time to try every hot key! You'll learn much more by doing rather than just reading.
Suggestion 5:
This thread was started in 2008, but still has a lot of tips one can explore.
MT4 navigational tips and techniques
It's dangerous for me to follow emmzett's posts because I just get started... and write too much!
Kent
3