For the range bars on MT4 we will need the generator indicator:
And for interactive control of the Range bars range we will need additional indicator:
Generator Installation
Now switch to the MT4 and open the data folder from menu File->Open Data Folder. Navigate to folder MQL4/indicators. Move the downloaded RangeBar.ex4 and OmniaRemote.ex4 here.
When the indicators are in place, we have to notify the MT4 to update the indicator list. Re-launch the MT4 Terminal.
Find or open a chart for a symbol, you need the range bars for. The timeframe does not matter, use the one you prefer for usual work.
In the MT4 Navigator (Ctrl+N) unfold the Custom Indicators list. Drag and drop the RangeBar item onto the open chart.
http://forex.ovo.cz/en/cutenews/uploads/clipboard82.png
A dialogue pops up. Look at the Inputs tab. Pay attention only to the Output TF entryand fill in some value (e.g. M10). Let the rest fields default.
http://forex.ovo.cz/en/cutenews/uploads/clipboard83.png
In the Common tab enable DLL imports.
http://forex.ovo.cz/en/cutenews/uploads/clipboard86.png
Confirm the dialogue. The indicator appears at chart bottom in a subwindow.
http://forex.ovo.cz/en/cutenews/uploads/clipboard85.png
You may repeat steps add more range bar indicators to this single chart.
The left grey button indicates the output timeframe we entered in the inputs. Click the button for a hint and open the chart from menu File->Open Offline.
http://forex.ovo.cz/en/cutenews/uploads/clipboard84.png
Find and select your chart. The chart that opens is our range bars char.
You may open the offline chart multiple times if you need them more than once.
Remote Control
Actually you may stop here and use the range bar chart as it is. But the next step will make your chart interactive in the way you like.
In the MT4 navigator (Ctrl+N) unfold the Custom Indicators list. Drag and drop the OfflineRemote item onto the offline chart. A dialogue pops up. Confirm the dialogue. The indicator appears at chart bottom in a subwindow.
The subwindow pane contains all you need to control the range bars:
http://forex.ovo.cz/en/cutenews/uploads/clipboard87.png
- bar range (in points)
- session breaks (whether ignore trading sessions or restart the chart with a new session open)
- navigation shortcut to the feed chart (click the button to bring the original range bar indicator to front)
Now you have full control of the range bars directly in the chart. You may switch the range of candles as easily as you can switch the time frame.
The remote may be repeatedly removed and re-attached to the offline chart, without affecting the chart.
History download
Now the range bars chart is working and you may control parameters directly from the chart.
What else may I do for better range bars? The range bars generator cannot load much history data alone. Download as much data as you can for it - with help of script.
Navigate to folder MQL4/Scripts. Move the downloaded script here. Re-launch the MT4 to reload the script list.
In the MT4 navigator (Ctrl+N) unfold the Scripts list. Drag and drop the LoadAllHistory to the chart with symbol you need to download the data for and wait for about a minute the script to complete.
Strategies and Testing
Can we use and test strategies with the range bar chart? Yes, we can run strategies in same way as with a regular chart, but we need some workaround for testing. Download the helper script for enabling the testing strategies with the range bars chart:
Download OfflineTestHelper.ex4
Navigate to folder MQL4/Scripts. Move the downloaded script here. Re-launch the MT4 to reload the script list.
In the MT4 navigator (Ctrl+N) unfold the Scripts list. Drag and drop the OfflineTestHelper on the range bar chart you intend to use with strategy tester.
Follow instructions it displays.
The script disconnects from the current broker, so be sure you are not on the instance that runs your strategies.