Metatrader MT4 constant range bars script for historical and real time off-line charts. Similar to the period_converter.mq4 script.

This script is referred to as Constant range bars or Nicolellis range bars they basically ignore the time element and will form a new bar after a specific range has been covered low to high or high to low.

Range Bars are price-driven bars, with each bar having a required minimum high-low range. Once the range requirement is reached, the first tick to break outside that range will begin a new bar (and become the opening price of that new bar). Each bar opens at a price outside of the high/low range of the previous bar. And each bar closes at either it's high or it's low.

Each bar has a high/low range equal to the range specified. The high/low range of a bar can exceed the range specified in certain situations (gaps) but can never be less that the range specified.
Each bar opens outside the high/low range of the previous bar.
Each bar closes at either it's high or it's low.
With Range Bars (and Change Bars), a new bars is only formed when price is moving. When prices gets stuck in a tight range for an extended period of time, horizontal screen real estate is not wasted with multiple bars that would have formed had the periodicity been volume or time driven.
For Range Bars, the high/low range of each bar is essentially held constant, while time and volume are variables.
you can find more details about such chart in the following links: