As someone with no programming experience I will have a lot of dumb questions. Here's one now.
Can someone please explain to me why I cannot get this to print to my journal. It's very important for me to see. I cannot get either the Comment function or the Print function to work and I'm not compiling with any errors or warnings.
Look in the Experts tab, not the Journal tab.
You won't see your Print() statement there, but you will see your error message. It looks something like this:
2018.03.30 07:18:30.914 Fency EURJPY,H1: array out of range in 'Fency.mq4' (87,14)
The problem: you didn't set dimensions for your array.
Also . . . are you using ArrayFill() correctly with respect to count? For each of your statements, you are filling the array with more and more values. For example, CHFJPY, you are filling the array starting at position 27 with 27 values. Maybe you meant to fill it with 1 value.
At a minimum, with the code you have right now, you need to dimension eurTOgbp to a size of 54 to get your Print() statement to work.
You might want to pick up an introductory book on MQL4 programming.
Look in the Experts tab, not the Journal tab.
You won't see your Print() statement there, but you will see your error message. It looks something like this:
The problem: you didn't set dimensions for your array.
Also . . . are you using ArrayFill() correctly with respect to count? For each of your statements, you are filling the array with more and more values. For example, CHFJPY, you are filling the array starting at position 27 with 27 values. Maybe you meant to fill it with 1 value.
At a minimum, with the code you have right now, you need to dimension eurTOgbp to a size of 54 to get your Print() statement to work.
You might want to pick up an introductory book on MQL4 programming.
Thank you. Yes my array is wrong. all I really want is an array filled with all the currency pairs however when I tried this earlier it gave me an error saying that the variables were already defined. I will continue to look into this. My work around was to mimic a push command like they have in javascript and fill the array with the currency pairs however I see that I'm doing it wrong. The documentation on this language is very difficult for me to understand. Now that I know where to look for my print out I should be able to troubleshoot many of my issues. Thank you very much.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
As someone with no programming experience I will have a lot of dumb questions. Here's one now.
Can someone please explain to me why I cannot get this to print to my journal. It's very important for me to see. I cannot get either the Comment function or the Print function to work and I'm not compiling with any errors or warnings.