My Experience with MetaTrader 5 Indicator Coding

I’ve had my first experience with the MetaTrader 5 indicator coding. It took me two days to rewrite one of my old MT4 indicators to MT5 (actually it was rather a conversion from MQL4 to MQL5). It wasn’t very easy — in fact I’ve expected some sort of backward compatibility, albeit limited, from new MetaTrader platform or some tool from MetaQuotes Software that would do the code conversion automatically. So, I’ve converted BMA (Bands Moving Average) from.mq4 to.mq5 and it retained its full functionality, which is quite great. You can now freely download BMA indicator for MetaTrader 5. If you’ve missed my announcement of MetaTrader 5 Beta Testing you can still download the latest Beta from MetaQuotes.
Now, about the conversion process… From it I can make several early conclusions about the new MQL5 language and its differences from the old MQL4. The conclusions that would be interesting to the MQL developers are the following:

  • Conversion isn’t trivial, as many things are done in completely different way now.
  • Indicators’ code has became more structured now.
  • With the abundance of the new Enumerated types and structures its now easier to write a reliable code, which can is easy to edit.
  • The event system is great.
  • When coding indicators with MQL5 you can do everything that you could be doing with MQL4.
  • The on-line help for MQL5 is still quite raw.
  • For the traders, it’s hard to come up with something useful from new MT5 indicators because I was only converting an MT4 indicator, not developing something new with a new functionality, but there are advantages I can outline:

  • Enumerated types allow more clear input parameter setting — no more numeric codes for MA modes, for example.
  • Indicators can now work with the unlimited amount of bars in the chart.
  • Indicators can now track and process some values intrinsic to ECN brokers.
  • Update: By the way, you can share your experience with using the MT5 Beta on our forums: http://www.earnforex.com/forum/f23/your-first-impressions-metatrader-5-beta-2134/

    If you want to share your experience in using the MetaTrader 5 beta or coding in MQL5, or if you just have some questions regarding MT5 or MQL5, please use the commentary form below.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    + ten = seventeen