Forex Blog

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


Improving Wide Range Bars Indicator with Alerts

April 18, 2014 by

The original WRB Hidden Gap indicator for MetaTrader 4 was developed by Akif Tokuz. It is based on Wide Range Bars + Hidden Gaps system developed by The Strategy Lab. Although they offer a lot of paid educational content, they have a free tutorial explaining the concept of WRBs and HGs. I highly advise you to read thoroughly that tutorial before doing anything with the presented WRB Hidden Gap indicator.

Akif Tokuz’s version of the indicator was developed back in 2010 and required some serious modifications. Not only have I converted it to MQL5, but I have also added some new features and optimized the code. Here is the list of my additions:

  • Alerts (optional) — once per hidden gap on first entry of price into the rectangle.
  • Switch between Wide Range Bars and Wide Range Bodies.
  • Control the rectangle style.
  • Correct indicator calculation. Previously, it would skip bars if more than one bar appear at a time.
  • Hidden Gaps are now marked as filled immediately when price fills them — without waiting for the bar to close.
  • Fixed a bug, which resulted in the incorrectly positioned Hidden Gaps.

Basically, this indicator allows detection of the hidden gap zones that offer useful price action levels for traders. It does not matter what strategy you use — hidden gaps can help you if you are technical trader, a fundamental analyst or a pure PA practitioner:

WRB Hidden Gap Indicator on EUR/USD @ H4 Chart

You can download the MT5 or MT4 version, or read more info about this hidden gap indicator.

If you find any bugs in this technical indicator or if you have some feature suggestions, please post about it using the commentary form below.

4 Responses to “Improving Wide Range Bars Indicator with Alerts”

  1. Denis

    Thank you!


    Andriy Moraru Reply:

    You are welcome!


  2. Matthew

    Do you have a NinjaTrader version of the WRB-HG ?



    Andriy Moraru Reply:

    No, sorry. I do not code for NinjaTrader.


Leave a Reply

required (will not be published)