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.
  • This 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 side ward 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 to define 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.
Tick Size, Amibroker, Range Bars

      Specify the Tick Size

  • Once Tick Size has been defined, the custom range intervals needs 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…  12-Jul-16 5-26-20 PM
  • 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.

    12-Jul-16 5-24-51 PM
    Range Bar Chart, Amibroker

    Range Bar Chart in Amibroker

Finally, it is worth noting ….

… 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.

Written by Kapil Marwaha

Kapil Marwaha is the Founder & Managing Director of TrueData Financial Information Pvt. Ltd.. His aim - "To make TrueData the Best Trading Decision Support company in the country." TrueData's flagship product Velocity 2.0 has already become immensely popular and is used by a large audience through out the country.

This article has 7 comments

  1. Tarun_ghosh Reply

    Hi kapil
    I have been using your services for the past 3 months since my strategy uses range bars. However one limitation is non availability of commodities and currency data feed. so if the base time interval is set at 1min and then range is set for the bars , what difference will it make and how inaccurate will be the range bars ?

    • Kapil Marwaha Reply

      (1) We are trying to get as many exchanges as possible, but have to scale up slowly as the costs as prohibitive for a start up like ours. But please be assured, we are going to get there, sooner, than later.

      (2) This is exactly what I mentioned in the conclusion “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.”. So you will get incorrect range bars.

  2. bon tam goc Reply

    Good day! Do you use Twitter? I’d like to follow you
    if that would be ok. I’m absolutely enjoying your blog and
    look forward to new updates.

  3. book hotels Reply

    Thanks for the marvelous posting! I really enjoyed reading it, you happen to
    be a great author.I will ensure that I bookmark your
    blog and definitely will come back down the road. I want to encourage you to ultimately continue your great work, have a nice weekend!

Leave a Comment

Your email address will not be published. Required fields are marked *