MetaTrader 4 Build 574 with Updated MQL4 Language and Market of Applications Released - page 35
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
Fyi, just got new update, 583.
Sure. But using the OnStart() is not a workaround, it is other syntax of the same though not identical function. I am afraid that without marking one of them obsolete, we may turn schizophrenic - one would prefer the new syntax, while others the recent one... I am trying to make a guess which one survives longer and use that one.
In case I use a workaround, I create a test case as well, so if change appears, I have a good chance to spot it. With OOP feature, the unit testing is much easier than before. But in the recent MQL they never fixed bugs I replaced by other solution.
i Think 5 years from now all but the die hards will be using OnStart() simply because by default, File > New > Script creates from the MQ template the base script with void OnTick() already on it.
Edit: I meant with void OnStart() already on it.
I used periods in some of my variable names for a particular Indicator, that change was documented, I replaced my periods with underscores, my code compiled and worked.
It doesn't really matter if I'm OK or not OK with it, it is what it is . . . I'd be happier if they laid out the scope of the changes up front so we all knew what we were facing instead of treating us like mushrooms . . . do you remember this ? https://forum.mql4.com/57476
Sure. But using the OnStart() is not a workaround, it is other syntax of the same though not identical function. I am afraid that without marking one of them obsolete, we may turn schizophrenic - one would prefer the new syntax, while others the recent one... I am trying to make a guess which one survives longer and use that one.
In case I use a workaround, I create a test case as well, so if change appears, I have a good chance to spot it. With OOP feature, the unit testing is much easier than before. But in the recent MQL they never fixed bugs I replaced by other solution.
I understand and agree to a great extent with what you are saying, however MetaQuotes have set their own precedent, CurTime(), Highest(), Lowest(), etc. are all deprecated/obsolete but still can work.
The change makes sense. It only applies (I think) to new code, not to existing scripts, and the number of developers who are used to creating dual-purpose EX4 files which run as both script and EA is almost certainly outweighed by the number of non-developers who have had unexpected or adverse consequences from installing a script as an EA and then having it run every tick rather than once.
What's nuts is making this change 24 hours before launch.
The change makes sense. It only applies (I think) to new code, not to existing scripts, and the number of developers who are used to creating dual-purpose EX4 files which run as both script and EA is almost certainly outweighed by the number of non-developers who have had unexpected or adverse consequences from installing a script as an EA and then having it run every tick rather than once.
What's nuts is making this change 24 hours before launch.
The change also applies to existing code when existing code has to be modified to work with the new terminal.
I have very strong views on backward-compatibility of EX4 files (and the fact that it remains badly flawed in terms of what tens of thousands of people will have downloaded from places like Forex Factory and are currently using), but I think this kind of change to source code and re-compilation is acceptable. (Particularly because you can continue to compile with old versions of metalang if you want to - though provided that you aren't then hit by a failing of EX4 backward-compatibility.)
What's wrong is the fact that this clearly hasn't been thought through. Someone's made an eleventh-hour decision that it's essential not to be able to mix up EAs and scripts. The thing to have done, way back when the first beta builds came out, was to get the compiler to refuse to allow start(); to insist on either OnStart() or OnTick() - and not both, which is currently permitted; and to provide some GUI assistance and informative error messages for changing that the use of start() as appropriate. Yes, this would have meant changing absolutely all historic source code. But in a trivial way, and there's huge amounts of code which needs to be slightly amended any way.
I have very strong views on backward-compatibility of EX4 files (and the fact that it remains badly flawed in terms of what tens of thousands of people will have downloaded from places like Forex Factory and are currently using), but I think this kind of change to source code and re-compilation is acceptable. (Particularly because you can continue to compile with old versions of metalang if you want to - though provided that you aren't then hit by a failing of EX4 backward-compatibility.)
What's wrong is the fact that this clearly hasn't been thought through. Someone's made an eleventh-hour decision that it's essential not to be able to mix up EAs and scripts. The thing to have done, way back when the first beta builds came out, was to get the compiler to refuse to allow start(); to insist on either OnStart() or OnTick() - and not both, which is currently permitted; and to provide some GUI assistance and informative error messages for changing that the use of start() as appropriate. Yes, this would have meant changing absolutely all historic source code. But in a trivial way, and there's huge amounts of code which needs to be slightly amended any way.
one crumb of comfort for me, I don't have any customers to let down