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
Come to think of it, perhaps a multidimensional array is a pretty lousy way to do what I'm trying to do here. Is there a way to define a struct, class, linked list or array of objects of any kind in mql4? I'm trying to store different properties for each bar on a chart.
I have four different properties with7 possible values each. Bit masking won't work since my properties are not binary. I guess i can use 4 separate integer arrays and keep their indexes synchronized, then use for loops to lookup values. I can see all the overhead this is going to cause. My code will ruin like molasses.
I've got to be honest, i've never done any bitmasking. I understand how it works and what i need to do, but have no clue what syntax to use in mql4. A couple of simple examples would be great. Anywhere you can point?
It's very simple . . . if your array is BarParameters[] and you have the following parameter set:
to set parameters 1 and 4 for bar number 10 you would do this . . .
To read if a parameter is set you would do this . . .
You can find the bitwise operators here and some assignment operators
If you need more info just ask.