MetaTrader 4 Build 574 with Updated MQL4 Language and Market of Applications Released - page 35

 

Fyi, just got new update, 583.

 
Ovo:


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.

 
RaptorUK:I know we are being moved towards mql5 . . . for me that is as obvious as something that's really obvious . . .
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
Yeah I agree with you there.
 
Ovo:


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.
 
RaptorUK:
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.

 
gchrmt4:

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.
 
RaptorUK:
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.

 
gchrmt4:

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.

Yes I agree . . . but they didn't and now we have not much idea of what is meant to be carried over and what isn't, what is meant to work and what isn't. What should I report as a bug and what should I try and fix ? fortunately we still have plenty of time before the release date . . . one crumb of comfort for me, I don't have any customers to let down
 
RaptorUK:
one crumb of comfort for me, I don't have any customers to let down
I'm going to have one last vent on this one, and the subject of backward-compatibility... If any of the big commercial trading robots such as Fabturbo use ArrayCopyRates() to pass price data to DLLs, e.g. in order to do signal calculation inside the DLL and obfuscate their trading logic, then they're going to stop working, and this will play out very badly for MetaQuotes. Brokers will see a fall in trading volume, which is what they hate most. They may not fully understand the technical reasons why, but there would be a clear and correct correlation between release of the new version and loss of income.
 
gchrmt4: 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 ...
In my opinion, places like ff, tsd and others usually have pretty strong mql programmers. Do you not believe they'll update their programs?
Reason: