How to Display Range Bars in Amibroker?
Introduction
Lately, a number of traders have started usingĀ Range Bars for their trading systems rather than the standard candlestick charts. By migrating their trading systems from Ā the standard time based (1min, 5 min etc..) candlestick charts to Range Bars, traders are looking to overcome the losses they encounter during sideways markets.
The best part is that it is easily possible to Display and Work with theseĀ Range Bars in Amibroker.
But ..What are Range Bars?
Range Bars areĀ price-driven bars, with each bar having a requiredĀ minimum high-low range. TheĀ data is consolidated into one bar until the range requirement is reached, after whichĀ a new bar is started.
These ChartsĀ consider only the range of price movement. They totally ignore the time at which the quote came into the charts. So the time on the chart needĀ not be evenly spaced & depends upon whether a trend is in place or not.
TheĀ next candle will just not be formed unless the price moves outside the range specified.Ā When the next candle does show up, Ā it shows aĀ possible trend in the direction of the new candle, for that range.
When theĀ markets are not trending,Ā you will see a lesserĀ number of bars. Whereas, when the markets are volatile or start trending, the number of bars, will increase, for the same time period.
To a certain extent, thisĀ eradicates the problem of trading whipsawsĀ and losing money in sideward markets.
Range Bar Rules
Each range bar must:
have a high/low range that equals the specified range
open outside the high/low range of the previous bar
must close at either its high or its low
How do we see theseĀ Range Bars in Amibroker?
AmibrokerĀ fully supportsĀ Range Bar chartingĀ and the bar size is based on theĀ Tick SizeĀ of a given symbol.Ā This allows defining symbol-specific tick sizes individually. You can thenĀ display a chart which, for example, shows 10R or 40RĀ bars. 10R / 40R meaning bars using a range of 10-ticks / 40 ticks for each symbol respectively.
To display range charts, you will need to follow the following steps:-
Ensure that you are set up for a Base Time Interval of Tick in your database setting.
Specify theĀ Tick SizeĀ in theĀ Symbolā>Information.Ā ForĀ NSEĀ symbols, it is 0.05, as shown here.
Specify the Tick Size
OnceĀ Tick SizeĀ has been defined, the custom range intervals need toĀ be defined,Ā to display chosen range chart.
Go toĀ Toolsā>Preferences,Ā IntradayĀ tab. Here you can set different range values as desired by you, say, 10, 40, 50, 200, 1500 etc⦠Ā
Once done, you will need to then select the pre-defined interval fromĀ View->IntradayĀ menu. Another easy way is to use theĀ IntervalĀ box in the toolbar and just type in the desired bar size. For example, to select the range bar of 10-ticks, one can type-in 10R in the toolbar.
Range Bar Chart in Amibroker
Finally, it is worthnotingĀ ā¦.
⦠that for best results, your database should use Tick as Base Time Interval. This will make sure, then each trade is represented by an individual record in the database and can be consistently compressed to range bars. Using higher-interval data (such as 1-minute) may produce bars that are not perfect. This is especially so if for a 1-minute bar, the high-low difference is comparable with the selected range.










