
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
the cost of e.g. 20 credits per month, what is credit and its cost.
A pair needs to be coded into a number. On MT4 I get out of the situation by first initialising the array:
then write the pair to the number by running it through the array:
'Z' - too many initializers
Unfortunately, there is a gap in my knowledge at this point.
Please suggest possible solutions to this problem. Maybe there is a faster way for MT4 as well, I will be glad to learn.
A pair needs to be coded into a number. On MT4 I get out of the situation by first initialising the array:
then I write the pair into the number by running it through the array:
.........
'Z' - too many initializers
Wapchepa 10+26 = 36. And you have an array with size [35]. The letter 'Z' doesn't fit into it, which is what the compiler is telling you.
Unfortunately, there is a gap in my knowledge at this point.
Please suggest possible solutions to this problem. Maybe there is a faster way for MT4 too, will be glad to know.
About fast ways. Programming is like poetry. You don't need to know anything except letters. The rest is creativity. You have a problem - you invent a solution.
And you're insulting me by insinuating that a good programmer differs from a bad one only by the thickness of a well-remembered reference book .... :) I don't even feel like helping...
Fi!
Vapchepa 10+26 = 36. And you have an array of size [35]. The letter 'Z' doesn't fit through, which is what the compiler tells you.
Programming is like poetry. You don't need to know anything but letters. The rest is creativity. You have a problem - you invent a solution.
And you're insulting me by insinuating that a good programmer differs from a bad one only by the thickness of a well-remembered reference book .... :) I don't even feel like helping...
Fi!
Strange, but somehow the code works on MT4. In the loop there, yes, j<=36 is in the original, this is here "drawn" 35.
Thank you, the matter was indeed in the array value declaration. I declare arrays this way once every 100 years, figuratively... don't judge it too harshly.
You have on the last lines, speculation, nothing more. Wrote almost directly: I didn't know what to do, for various reasons.
Strange, but somehow the code works on MT4. In the loop there, yes, j<=36 is in the original, this is here "drawn" 35.
Thank you, the matter was indeed the array's value declaration. I declare arrays this way once every 100 years, figuratively... don't judge it too harshly.
Okay.
You have on the last lines, speculation, nothing more. Wrote almost directly: I didn't know what to do, for various reasons.
All right, all right. Let's just say I'm having this... Full moon, yeah. It's all the rage these days.
;)
Who knows if the MC's position has changed on:
1. Introduction of exception handling (try {} catch() {}) . Was "strongly opposed".
No
2. Introduction of foreach operator () {}.
? Well, that's a bit of a load of nonsense. I don't know what to ask for. The operator is specifically for containers, the concept of which does not exist in MQL at all.
There are only arrays, for which it is perfectly implemented by a regular fork.
Who knows if the MC's position has changed on:
1. Introduction of exception handling (try {} catch() {}) . Was "strongly opposed".
2. Introduction of foreach operator () {} .
PS: It's not clear why the operator stood out?
I'm working too hard...
the script:
I'm getting errors:
2013.08.23 10:28:54 Trades '1421016': failed instant sell 1.60 CADCHF at 0.87721 [Invalid request]
2013.08.23 10:28:54 Trades '1421016': failed instant sell 1.20 GBPUSD at 1.55836 [Invalid request]
2013.08.23 10:28:54 Trades '1421016': failed instant sell 0.80 EURUSD at 1.33455 [Invalid request]
What is the problem?
I have everything open... But it won't close CADCHF. (Server is MetaQuotes Demo)
Changed the direction of the for loop, now everything is fine, everything opens and everything closes.
I have everything open... But it won't close CADCHF. (Server - MetaQuotes Demo)
Changed the direction of the for loop, now everything is fine, everything opens and everything closes.
changed to:
So the closure doesn't work either.