Forex Blog

First-hand Forex trading experience and information about foreign exchange market that will be useful to traders


Beginner Indicator in MT5

November 27, 2009 by

Converted Beginner indicator to MT5 version today. Actually, I was going to convert another indicator (BB MACD) but, unfortunately, MQL5 doesn’t yet support any easy substitutions for *OnArray() functions of the previous version of the language. The resulting Beginner indicator works fine in MetaTrader 5 — it still just marks the tops and bottoms of the chart and isn’t very good for actual trading signals. But now it has certain improvements compared to MT4 version:

  • Has description
  • Indicator’s short name makes sense
  • Uses one buffer to draw dots instead of two
  • Uses more correct data types
  • The logic behind the indicator is visible from the code

You can get the code of MT5 version or read more info about the indicator.

If you find some bugs in this MT5 indicator or want to make a suggestion regarding its functionality or what should be my next MT4->MT5 conversion, please, use the commentary form below.

2 Responses to “Beginner Indicator in MT5”

  1. Yash Khanduri


    Can you please let me know the logic behind this indicator. I mean, how is it calculating the high and low on the charts. Actually, I want to calculate the high and lows manually as per this indicator’s logic.

    I will really appreciate your help.

    Best regards,
    Yash Khanduri


    admin Reply:

    For every bar, its local highest and lowest are determined on previous Per bars. If current bar’s close is less than 1.3 (default, Otstup input parameter controls percentage) of the lowest bar, indicator prints a blue dot below it. If the current bar’s close is above 0.7 of the highest bar, the red dot is printed above it.


Leave a Reply

required (will not be published)