In the same spirit, add translations (from MQL4) of MarketInfo, Order-functions, etc. Add the prefix "MQ4_" to the function names: MQL4_iTime, MQL4_MarketInfo, MQL4_OrderSend, ....
The terminal set includes classes for accessing market data and for performing trading actions.
I guess we are talking about different things. On the example of an indicatorless MQL4 Expert Advisor:
- We added the corresponding include.
- Added the mentioned prefix to standard MQL4-functions in the source code by auto-replacement.
- We edited the resulting MQL4 file a little bit to get the MQL5 file.
- We got the same Expert Advisor, but for MT5.
I guess we are talking about different things. On the example of an indicatorless MQL4 Expert Advisor:
- We added the corresponding include.
- Added the mentioned prefix to standard MQL4-functions in the source code by auto-replacement.
- We edited the resulting MQL4 file a little bit to get the MQL5 file.
- We got the same Expert Advisor, but for MT5.
Then I don't know. With the use of a class, the process of calling a trading function is complicated by 2 lines: to connect the file and to declare the class. Is it worth "cluttering" the codebase with such things?
If the transfer of MQL4 code to MQL5 takes less than five minutes, at least for indicatorless Expert Advisors (there can be an automatic instantaneous corverter for them based on the same principle) - itis worth it.
If you think that the problem of translating EAs from MQ4 to MQL5 is only indicators, you should come down to earth.
If we talk about pure EAs, there are significant difficulties in the absence of virtual positions.
These future difficulties were discussed as soon as it became known what net platform MT5 would be positioned as.
Unfortunately, few of the developers realised that translating MT5 logic (trading logic, not programmer logic) into MT4 is orders of magnitude easier than MT4 into MT5.
...
Unfortunately, few developers have realised that translating MT5 logic to MT4 is an order of magnitude easier than MT4 to MT5.
Yep... Especially if there is a dynamic array structure in the code... (applause, curtain)
I will gladly make analogues of all necessary functions (including accounting of virtual transactions), when I get my hands on them.
Now I need these functions, I could not find a ready-made library. So I had to make my own.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
TimeSeries - Function Library for Working with Time Series:
Author: Andrey Khatimlianskii