Comment function to help me debug my program. Since my program did not do what I expected I went on a search to find where it loses itself. If I put the Comment here as shown, the values it is supposed to be are shown, but if I put it outside of the for loop, it is all zeros. Since the variable val is a global variable and the values are being written to it, should it not retain the values outside of the for loop unless something else is writing over it? I have checked, this is the only place so far where it is being used and there is also only this one Comment that I move around. I greyed out all the other places (/* some code */). Am I missing something?
I have found an article about how to put the ZigZag indicator into your code, but I am running into a strange phenomenon. Because I'm still new to coding to MQL I regularly run into strange bugs so I am using the
Loop not saving values
Checking for price retrace
Can't buy with alligator?
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register