How to Take Advantage of Range Bar Charts

Range Bar Charts takes only price into consideration and removes time element from the candle which helps a trader to get a edge during the volatility season(sideways market). Typical Candlestick charts uses time as a factor (5min, 30min, hourly charts etc) where the sideways markets creates lots of noise in our trading systems and most of the time end up with too many whipsaws.

How to Calculate Range Bars

Range Bar Charts generates a new candle only if the range got broken outside the range either way. For example a 15 point Range Bar chart in Nifty futures will create a new candlestick only if the 15 point range breaks out either of the side. In the low volatile market it creates less number of bars and in the high volatile trendy market it creates more number of bars. But a timebased charts create equal number of bars at frequent intervals regardless of the volatility in the market.

Nifty Futures -15 point Range Bar Charts

It is recommended to adjust the Range Value for each and every trading instrument depends upon the Traders risking nature, trading type(positional,intraday) and the price of the instrument and the expected intraday swing. For Example we cannot apply a 15 point range bar to a Stock with a price value of Rs10 and it is meaningless to do so. IF the Nifty expected intraday range is 100 points then a 10 point or 15 point range bars are preferable according to the traders trading style and the risking ability. However there are no definite rules.

Range Bar Rules

Each range bar must have a high/low range that equals the specified range.

Each range bar must open outside the high/low range of the previous bar.

Each range bar must close at either its high or its low.

How to Gain Edge with Range Bars
By migrating your existing system from candlestick charts to range bar candlestick charts one can take advantage of overcoming sideways markets most of the trades. But still if the markets are highly compressed and trading sideways for longer period the losses incurred will be minimal compared to the time based candlestick charts. The real edge lies in riding the complete trend and also minimizing the losses when there is a sideways markets.

5point Range Bar Charts

How to Setup Range Bar Charts in Amibroker

First we need to define the tick size of the instrument in Amibroker. To define tick size

1)Open Amibroker and Open the Charts in which you need to plot range bars
2)Goto Window -> Symbols Information (Ami Version 5.5 and above)

3)Under System Information Goto Contract Specification and enter the tick size value as the lowest possible movement. If tick size value is not defined amibroker by default takes the value as 0.01

4)Now enter the range value in the Chart interval box as shown below (Works only with 5.5 or above). So to get a 5 point range bars one have to enter 500R (500 x 0.01). To determine the tick size (minimum possible movement in any given stock) it is advisable to go thro the contract specifications provided by the exchange.

5)Alternative method to set your favorite tick size is go to tools ->Preferences ->Intraday and define your favorite tick size as shown below. After setting the tick size now you can change to range bars easily by right clicking over the charts -> Goto Intraday and select your favorite Range Bar Charts.

6)Range Bar charts will work with non-tick highly authentic datafeeds. But tick level datafeeds will bring greater accuracy to the charts.

Disadvatages

You cannot completely remove the sideways movement even in range bars which will lead to consecutive losses. But the amount of losses will be definitely less than the time based charts provided if you are using the right tick size.

It is advisable to have tick level database and database settings otherwise Range Bar Charts are not backtestable in Amibroker

Practical Approach to Amibroker AFL CodingMarketcalls have been a constant contributor to the trading community especially when comes to developing traders skillset on the vast array of topics most likely on the modern principles […]

About Rajandran

Rajandran is a Full time trader and founder of Marketcalls & Co-Founder of Traderscafe, trades mostly using discretionary Trading Concepts like Market Profile, Trading sentimental analysis, building timing models, algorithmic trading models. Instructs professional traders, full time traders & aspiring full time traders. Rajandran attended college in the Chennai where he earned a BE in Electronics and Communications. Rajandran has a broad understanding of trading softwares like Amibroker, Ninjatrader, Esignal, Metastock, Motivewave, Market Analyst(Optuma),Metatrader,Tradingivew,Python and understands individual needs of traders and investors utilizing a wide range of methodologies.

Comments

A 10 tick range bar could open at 100.00 and have 5 ticks up to 100.05 and 5 ticks down to 99.95 and the bar would print a new candle. A 10 tick renko bar would have to have 10 ticks up to 100.10 or 10 ticks down to 99.90 before it would print another candle.

@Rajendran,
Thanks for the great post. Your knowledge is second to none.
This is a purely academic post (might even be construed as nitpicking).
Is it likely that it is the other way around? I use 100R (T-0.05) and a new bar will NOT appear until it has either gone up/down 5 points (100 x 0.05).
I have never used Renko but the behavior you ascribe to Renko is exactly the way Range chart behaves in Amibroker 6.1.

We see past couple of months many whipsaw in Supertrend, can you give an idea past 2 months how the performance may have changed by using these range bars? Also please give the recommended range bar setting for 5-min supertrend followers. Thx

dear admin…can u make an exploration afl with this condition… buy signal = EMA8. >SMA 20..>SMA 50..>SMA 100….buy signal occur when this 4 moving average aligned and below the price…thanks very much sir

I use Amibroker Standard not pro, so the lowest timeframe in database settings is 1min. I use GDFL data feed, so its tick based, but I still can’t get proper display of range bars in CrudeOil. Do I need to go in for Pro version?

Data and information is provided for informational purposes only, and is not intended for trading purposes. Neither marketcalls.in website nor any of its promoters shall be liable for any errors or delays in the content, or for any actions taken in reliance thereon.