Is MQL5 backward compatible with MQL4? - page 3

 
fxsaber:

These functions are not part of the language (MQL4). These are part of the History API.

Do you understand the difference between languages and API?

NOT part of MQL4?

That's a screenshot of the MQL4 Language reference manual.

Please stop with your misinformation and childish behavior.

 
fxsaber:

Example EA please!

You can just try the functions to see whether it accepts them or not.

It's not that hard is it ?

If you click here you can see that the documentation has been updated.

Aside from the classic MarketInfo() Function there are added functions:

SymbolInfoDouble

Returns the double value of the symbol for the corresponding property

Market Info

SymbolInfoInteger

Returns a value of an integer type (long, datetime, int or bool) of a specified symbol for the corresponding property

Market Info

SymbolInfoSessionQuote

Allows receiving time of beginning and end of the specified quoting sessions for a specified symbol and day of week.

Market Info

SymbolInfoSessionTrade

Allows receiving time of beginning and end of the specified trading sessions for a specified symbol and day of week.

Market Info

SymbolInfoString

Returns a value of the string type of a specified symbol for the corresponding property

Market Info

SymbolInfoTick

Returns the current prices for the specified symbol in a variable of the MqlTick type

Market Info

SymbolName

Returns the name of a specified symbol

Market Info

SymbolSelect

Selects a symbol in the Market Watch window or removes a symbol from the window

Market Info

SymbolsTotal

Returns the number of available (selected in Market Watch or all) symbols

Market Info


Now where would those come from ?

And there are many more.
SymbolInfoDouble - Market Info - MQL4 Reference
SymbolInfoDouble - Market Info - MQL4 Reference
  • docs.mql4.com
2. Returns true or false depending on whether a function is successfully performed. In case of success, the value of the property is placed into a recipient variable, passed by reference by the last parameter. It is recommended to use SymbolInfoTick() if the function is used for getting information about the last tick. It may well be that not a...
 
Marco vd Heijden:

You can just try the functions to see whether it accepts them or not.

It's not that hard is it ?

Example please?

 
fxsaber:

Example please?

Go read the documentation.

I have just given you examples.

 
Marco vd Heijden:
Go read the documentation.

Not a single proof of the incompatibility of languages you have not resulted. I showed examples of MQL4-advisors who work without problems in MT5.

Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий

Советники: Spreader

fxsaber, 2016.09.03 11:18

Вы можете это проверить в MT5-тестере.

// Это MT5-советник, который позволяет запускать соответствующий
// MT4-советник в мультивалютном MT5(Hedge)-тестере (с реальными тиками)

// https://www.mql5.com/ru/code/16006
#include <MT4Orders.mqh>
#include <MQL4_to_MQL5.mqh>

//#include "Spreader_v1.mq4" // https://www.mql5.com/ru/code/9484
#include "Spreader_v2.mq4" // https://www.mql5.com/ru/code/9495

void OnTick()
{
  start();
}

Результат мультивалютного бэктеста с дефолтными настройками в режиме EURUSD M1 OHLC

 

 

 

 

 Подробности в файле отчета.


There was a clear answer in this thread

Forum on trading, automated trading systems and testing trading strategies

Is MQL5 backward compatible with MQL4?

Stanislav Korotky, 2017.10.11 22:48

It's compatible by means of 3-rd party libraries (includes), which should be #included into your EA source code.

You may find such solutions in the source code base, blogs, and articles. For example: Ready-made Expert Advisors from the MQL5 Wizard work in MetaTrader 4

 
Marco vd Heijden:

MQL4 to MQL5 is not compatible.(without function conversion libs)

However, MQL5 to MQL4 is compatible to some extend,

There are some issues with for example timeframes and trade functions,

But for the most of it, it's usable.

Now here is a list of MQL4 Functions: https://docs.mql4.com/function_indices

Sorry to bust your bubble saber, but iHigh,iLow,iOpen,iClose are in there.

Well maybe you need to read a bit better.

 
Marco vd Heijden:

Well maybe you need to read a bit better.

Nobody says that EX4 is launched on MT5. It's just that you can write advisors on MQL4, while having them run on MT5, not knowing the MQL5 at all.

 
fxsaber:

Not a single proof of the incompatibility of languages you have not resulted. I showed examples of MQL4-advisors who work without problems in MT5.


I find it interesting that you refuse to accept proof when it is presented to you.

I gave you an simple EA to copy and paste for example.

The code is MQL4 and is NOT compatible with MQL5.

The screenshots prove this fact.

The only way you can make it work is to update the code and use a third party included library.

Also, If you were provided the .ex4 compiled version of the source code, MT5 would not recognize this file, and it would load properly onto an MT5 chart.


In addition, MT4 supports EA and Indicators which work with OFFLINE Renko custom time frame charts.

This is something which MT5 absolutely does NOT support.

This list goes on....

 
fxsaber:

Look at the phrases my opponent uses.

I'm not your opponent. I am just a programmer who is trying to educate you and help you to understand that you do not understand what you are talking  about.

I have provided you multiple examples of MQL4 and MQL5  incompatibilities.

Please stop providing false information to people.

 
fxsaber:

Nobody says that EX4 is launched on MT5. It's just that you can write advisors on MQL4, while having them run on MT5, not knowing the MQL5 at all.

Not without conversion functions.

The topic title is: Is MQL5 backward compatible with MQL4?

And the answer is no.

Reason: