MQL4 changes in language?
33 replies
Matusiak Adrian
11 years ago #113958
Hello.
Currently I save my strategies to source by SQ.
But on some website I have discovered that old MQL4 will not be supported from MT Build 600+,
Please read details:
http://docs.mql4.com/mql4changes#compiler_difference
Especially:
“Old EX4 applications and DLLs based on old RateInfo format will not work in the new terminal. Conversion to the new format is required.”
and
“Starting from build 600, MQL4 programming language has been completely revised reaching the level of MQL5 – now you can develop trading robots in MQL4/5 using the unified MetaEditor development environment, single style, libraries and debugging tools.”
Any update on this?
0
mikeyc
11 years ago #131368
We are on build 845 now, so have been 600+ for months and months. You will notice it’s old EX4 and DLL that are not possibly compatible, since SQ outputs source code and not compiled stuff, it makes no difference.
0
mikeyc
11 years ago #131371
Hi Adrian,
It looks to me that Mark is going to have to rewrite the MQ4 that is output from SQ to use the new syntax. He should put #property strict at the top of the code and follow the new guidelines, http://docs.mql4.com/mql4changes#compiler_difference
Looks like MQL5 site checks this and rejects anything that is not using the new programming model….. 😮
@Mark – Any thoughts?
Cheers,
Mike
0
Tomas Matejka
11 years ago #131378
Thanks for sharing, will let Mark know about this
0
mikeyc
11 years ago #131399
I added #property strict to one of the SQ generated MQ4 files and got:
6 error(s), 43 warning(s)
When compiling it.
So for SQ4 I would suggest adding the #property strict setting to the code generator and fix all the errors and warning in the new code generation.
0
Matusiak Adrian
11 years ago #131403
Thanks for sharing, will let Mark know about this
Thanks Tomas!
I added #property strict to one of the SQ generated MQ4 files and got:
6 error(s), 43 warning(s)
When compiling it.
So for SQ4 I would suggest adding the #property strict setting to the code generator and fix all the errors and warning in the new code generation.
Indeed. That’s what I get too. But I get more errors and warnings. Maybe it’s caused by a bit more source code etc.
0
mikeyc
11 years ago #131404
I am going to have a go at fixing the errors on one of the strategies, I don’t think it is very difficult, I wonder if there could be another SQ3 release that fixes this in the code generator? It would be much appreciated!
0
mikeyc
11 years ago #131408
just to confirm I tried to upload an EA created by SQ to MQL5 website today, and yes, it must be compiled with #property strict in the source code.
0
Threshold
11 years ago #131414
This only effects those selling their EAs, correct?
Not how they actually function in MT4.
0
mikeyc
11 years ago #131416
This only effects those selling their EAs, correct?
Not how they actually function in MT4.
Yes, only selling EAs and only via MQL5 website.
0
Matusiak Adrian
11 years ago #131418
Threshold
11 years ago #131420
I see. But if you have the .str file, you can export the new version from SQ. This was a big problem when build 7xx come out when some stopped worked altogether. I understand however this will not fix them right now for uploading to mql4.com
This is not limited to SQ also, all old EAs and indicators suffer from mql4 code changes.
0
mikeyc
11 years ago #131422
I see. But if you have the .str file, you can export the new version from SQ. This was a big problem when build 7xx come out when some stopped worked altogether. I understand however this will not fix them right now for uploading to mql4.com
This is not limited to SQ also, all old EAs and indicators suffer from mql4 code changes.
Exporting again from SQ won’t fix this issue until a release is made that outputs code that compiles with #property strict included. There’s a risk that a future MT4 release (who knows, maybe tomorrow 😮 ) will only compile source that has strict on…
0
geektrader
11 years ago #131428
The MQ4 code SQ outputs is pretty solid, sure property strict brings up a few warnings, but you really can ignore those. The code SQ outputs to MQL4 is just solid and fine and has survived any kind of tests and live trading I´ve done, and it´s made for build 600+ (won´t run on older builds). So all is fine for now. And don´t worry about the code not working anymore in the future, MetaQuotes is a piece of shit company and they will, like they already did with build 600, change the whole MQL4 langauge again in the future without any prior announcement, I am sure! So just use what SQ gives you, I can confirm that all trades match between SQ -> MT4 -> live trading and backtesting. Even for scalper strategies.
0
Mark Fric
11 years ago #131430
I confirm that we will rewrite the code generator in the new version, so it wil be compatible with #property strict,
we will most probably support also new MT5 syntax.
Mark
StrategyQuant architect
0
Matusiak Adrian
11 years ago #131433
