Interface for MQL4-style indicator invocation

 

Sometimes I need to port an advisor to MQL5. To get this done I'm looking for a way to convert MQL4 style indicator invocations more easily.

So instead of obtaining a handle and using CopyBuffer I'd like to be able to do this:

// MQL 5 code block
double ima=iMA(symbol,timeframe,ma_period,ma_shift,ma_method,applied_price,shift); // MQL 4 style

Is there any library or header that provides such an interface?

 
This could help you : https://www.mql5.com/en/blogs/post/681318
MQL's OOP notes: HashMap supports old-fashioned indicators in MetaTrader 5
MQL's OOP notes: HashMap supports old-fashioned indicators in MetaTrader 5
  • 2016.11.19
  • www.mql5.com
MetaTrader 5 is not back compatible with MetaTrader 4 in many aspects. This is bad, but we can do nothing with this. Yet we can do something to simplify translation of MetaTrader 4 products into MetaTrader 5. One of the problems that arises when we move from MetaTrader 4 to MetaTrader 5 is the way how latter uses different method of indicator...
 
Alain Verleyen:
This could help you : https://www.mql5.com/en/blogs/post/681318
Oh yes! Looks like a good starting point, at least it covers iCustom, iMA and iRSI. MQ could have tried better in terms of backward compatibility.
 
lippmaje:
Oh yes! Looks like a good starting point, at least it covers iCustom, iMA and iRSI. MQ could have tried better in terms of backward compatibility.

Not yet this old song :-D

Reason: