Download MetaTrader 5

Using compiled MQL5 EAs within MT4

To add comments, please log in or register
jamesh99
52
jamesh99  

Hi

W‌hen I compile MQL5 an EX5 file is created in the ...Teminal\long-unique-number\MQL5\experts folder.

I‌ am using MT4 and so no EA appears in my navigator window, even if I move the EX5 file into ...Terminal\long-unique-number\MQL4\experts

Is it possible to use compiled MQL5 within MT4. Is a file renaming necessary?


T‌hanks,

J‌ames

whroeder1
16764
whroeder1  
jamesh99: Is it possible to use compiled MQL5 within MT4.
Of course not.
  1. Ever try to use a boat on a highway?
  2. Ever try to drive across an ocean?
Stanislav Korotky
23152
Stanislav Korotky  
jamesh99:

W‌hen I compile MQL5 an EX5 file is created in the ...Teminal\long-unique-number\MQL5\experts folder.

I‌ am using MT4 and so no EA appears in my navigator window, even if I move the EX5 file into ...Terminal\long-unique-number\MQL4\experts

Is it possible to use compiled MQL5 within MT4. Is a file renaming necessary?

Why do you need to run MetaTrader 5's MQL code in MetaTrader 4? Either use MT5 with the same broker, or adapt EA to MT4, i.e. *.mq4 (since you have the source code).
jamesh99
52
jamesh99  
Stanislav Korotky:
Why do you need to run MetaTrader 5's MQL code in MetaTrader 4? Either use MT5 with the same broker, or adapt EA to MT4, i.e. *.mq4 (since you have the source code).


Stanislav,

1) M‌y current broker doesn't support the use of MT5.

2) T‌he debugging functionality of MQL4 seems no longer to function in later (current) builds of MT4 so I am unable to debug my MQL4 code.

‌‌My hope was that compiled MQL5 could be used within MT4 since, it appears the compiler in MetaEditor can differentiate both MQL4 AND MQL5.


Marco vd Heijden
Moderator
6056
Marco vd Heijden  

You can use many of the same code from mql5 in mql4 and for the part that does not work it needs only little tweaking.

Those are usually related to the ordering functions and Indicator calls.‌

Carl Schreiber
Moderator
7815
Carl Schreiber  
jamesh99:


Stanislav,

1) M‌y current broker doesn't support the use of MT5.

2) T‌he debugging functionality of MQL4 seems no longer to function in later (current) builds of MT4 so I am unable to debug my MQL4 code.

‌‌My hope was that compiled MQL5 could be used within MT4 since, it appears the compiler in MetaEditor can differentiate both MQL4 AND MQL5.


Have you complained at the Service Desk - I did, and the asked me to upgrade to b1052 which I did, but it is just the same.

If you want I can send you b1031‌ - there you can debug.

jamesh99
52
jamesh99  
Carl Schreiber:

Have you complained at the Service Desk - I did, and the asked me to upgrade to b1052 which I did, but it is just the same.

If you want I can send you b1031‌ - there you can debug.


Thanks, Carl.

I‌'d appreciate the b1031.

Jason Crossan
158
Jason Crossan  
jamesh99:

Hi

W‌hen I compile MQL5 an EX5 file is created in the ...Teminal\long-unique-number\MQL5\experts folder.

I‌ am using MT4 and so no EA appears in my navigator window, even if I move the EX5 file into ...Terminal\long-unique-number\MQL4\experts

Is it possible to use compiled MQL5 within MT4. Is a file renaming necessary?


T‌hanks,

J‌ames‌

‌If you can see the code . Try this. Copy and paste to an existing mt4 file and rename. Sometimes it works. Simple and fast. Hope this helps

Keith Watford
Moderator
10536
Keith Watford  
Jason Crossan:

‌If you can see the code . Try this. Copy and paste to an existing mt4 file and rename. Sometimes it works. Simple and fast. Hope this helps


Please do not post inside quoted text. I have modified your post
Stanislav Korotky
23152
Stanislav Korotky  
Keith Watford:

Please do not post inside quoted text. I have modified your post

This is a bug in the site. Users which are not familiar with raw HTML edition mode can do nothing with this. I'm sure MQ is aware of it, because it happens again and again regularly.
whroeder1
16764
whroeder1  
Don't add text inside quoted text, put it outside. MQL4 Forum editor problem - MQL4 forum
To add comments, please log in or register