Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 928
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
For example, I declare input parameters and from these parameters I need to take global variables and view them, but there is a problem Input parameters cannot be an array
if we're talking aboutInput variables, you can simplify it - they have a global visibility and you can use them in any code section
or write them once to an array in the OnInit() section, and later you can copy an array to an array, but here you need arrays to be the same - take an array with spare, but then you need to control array index numbers to avoid a bug - you might use an empty array value - the compiler will not generate an error, but the calculation will be erroneous
HH: for some reason I was sure that the assignment operator works for identical arrays, maybe mixed up with class - it definitely works there if the objects are of the same classif we are talking aboutInput variables, you can simplify it - they have global visibility and you can use them in any code section
or write them once to an array in the OnInit() section, and later you can copy an array to an array, but here you need arrays to be the same - take an array with spare, but then you need to control array index numbers, to avoid a bug - you may use an empty array value - the error will not appear, but calculations will be erroneous
SZZ: for some reason, I was sure that the assignment operator works for the same arrays, maybe mixed up with the class - it certainly works if the objects are the same classNo there also such I tried (maybe tried a little and badly because I'm not very good at them but as far as I tried it does not work plus to all classes need to handle through a colon is better to do so here as you showed) thought maybe through the classes is not necessary so that's how you did one line to assign.
Hello.
Can you please tell me if you can change the time zone in the standard alerts popup?
Question. How can I loop through all enumeration values with a non-equal step?
enum Types {
One=11,
Two=12,
Three=15,
Four=22,
Five=27
};
Question. How can I loop through all enumeration values with a non-equal step?
enum Types {
One=11,
Two=12,
Three=15,
Four=22,
Five=27
};
no, sizeof() does not work for enumhttps://docs.mql4.com/ru/basis/types/integer/enumeration
and when converting types, the constant name is lost
2019.08.03 10:52:13.288 tst EURUSD,H1: sz = 4
2019.08.03 10:52:13.288 tst EURUSD,H1: z = Two , x = b
2019.08.03 10:52:13.288 tst EURUSD,H1: z = Two , x = Types_abc::12
Hello.
Can you please tell me if it is possible to change the time zone in the standard pop-up with an alert?
Why in mql4 you can call int(and any other returnable value) and void(procedural function) functions in the same way?
it's called "overloading".
Hello. How do I catch the input signal from the illuminator indicator in the code? The indicator paints a candle on the chart and outputs an alert for entry.
Simply put I want to write a robot for this indicator.
Alert displays the local time on the PC. To set it to the same time as the terminal time you can simply change the computer time.
Thanks ) Is this the only way, there is no other way to set the time in Alert? And is there an alternative to the standard Alert() function in MQL4, in which the alert time can be set to the terminal time?