Hey guys,
I was trying to learn more about programming stuff in MQL4 and I wanted to try to program a ZigZag indicator so I looked at an existing one to learn about how to code one myself however I'm a little stuck.
Here is the code I was looking at and I have some questions.
https://pastebin.com/hk0BFKx0
-So first of all how does an indicator like this work in simple terms?
-I was trying to print some stuff to understand more however it did not print a thing even though there were no errors.
What I was trying to print was "ExtZigzagBuffer[i]" during the first while loop but that didn't do anything.
-What is "extremum" and "extlevel" (Extremum level?) and where does the 3 come from in extlevel = 3?
-How does it draw the lines?
All I could find about drawing stuff was:
//---- drawing settings
SetIndexStyle(0,DRAW_SECTION);
I learned to draw stuff using ObjectCreate.
So if anybody has any information that could help me understand the code and the rationale behind it let me know and it will be appreciated!
Thanks
I was trying to learn more about programming stuff in MQL4 and I wanted to try to program a ZigZag indicator so I looked at an existing one to learn about how to code one myself however I'm a little stuck.
Here is the code I was looking at and I have some questions.
https://pastebin.com/hk0BFKx0
-So first of all how does an indicator like this work in simple terms?
-I was trying to print some stuff to understand more however it did not print a thing even though there were no errors.
What I was trying to print was "ExtZigzagBuffer[i]" during the first while loop but that didn't do anything.
-What is "extremum" and "extlevel" (Extremum level?) and where does the 3 come from in extlevel = 3?
-How does it draw the lines?
All I could find about drawing stuff was:
//---- drawing settings
SetIndexStyle(0,DRAW_SECTION);
I learned to draw stuff using ObjectCreate.
So if anybody has any information that could help me understand the code and the rationale behind it let me know and it will be appreciated!
Thanks