Mql5 to mql4 copy and paste expert advisor

HEY guys i have been trying to create an expert advisor on mql5 and tried to copy the ea code that i want ( it’s been automatically created because on mql5 you can creat an ea without writing a code so can i copy what i’ve been working on and simply paste it on mql4 i have tried but it didn’t work i keep getting errors

thanks

It will never work.

Thanks

I’d not tell “never” ;-). I know MQ have had full standard library support (including trading) for MT4 in minds. The priority and timing were not disclosed but it could happen some time. Of course, they can reconsider and cancel this at any time. I’ve planned and probed such thing myself, but stopped it since I knew that MQ can work on this.

If you want to write code to be able to compile on both MQL5 or on MQL4 then you have to code it using common elements. Where that is not possible, you have to use conditional compilation (#ifdef MQL4 or #ifdef MQL5) to separate the differences.

This is what I have been doing for a while for my own projects, which allows me to have my Indicators and EA’s available on both systems.

This requires advanced coding skills and very good knowledge of both systems, so you cannot just use the default code generator for that.

I know MQ have had full standard library support (including trading) for MT4 in minds.
Source of this information ?

Service desk. Ticket 2015.07.22 15:52, #1266145 .

I understand, Thank you. i’m actually working on learning MQL4

Thanks. It’s rather old, I strongly doubt it’s still on the table.