tutorial to make an EA compatible with both mql4 and mql5

 

I want to start to code my own EA, but contrary to indicators, I see that Metaquotes changed the syntax a lot from mql4 to mql5, so i wonder if somebody managed to make a unified class for dealing with buying and selling orders.

Since I am just starting, i don't need much,

-open a buy or sel

-close a buy or sell

-set a breakeven stoploss

-set a trailing stop.

 
Enau:

I want to start to code my own EA, but contrary to indicators, I see that Metaquotes changed the syntax a lot from mql4 to mql5, so i wonder if somebody managed to make a unified class for dealing with buying and selling orders.

Since I am just starting, i don't need much,

-open a buy or sel

-close a buy or sell

-set a breakeven stoploss

-set a trailing stop.

Maybe this could help you.

MT4Orders
MT4Orders
  • www.mql5.com
Parallel use of the MetaTrader 4 and MetaTrader 5 order systems.