Amibroker

How to Display Range Bars in Amibroker ?

Kapil Marwaha · 11 July 2016 · 8 Comments
Share

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

[symple_bullets style="check"] 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

[/symple_bullets]

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.

[caption id="attachment_87" align="aligncenter" width="215"]Tick Size, Amibroker, Range Bars       Specify the Tick Size[/caption]

  • 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.[symple_spacing size="10"][symple_spacing size="10"]12-Jul-16 5-24-51 PM[symple_spacing size="10"] [caption id="attachment_109" align="alignleft" width="1364"]Range Bar Chart, Amibroker Range Bar Chart in Amibroker[/caption]

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.

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.

Comments (8)
Tarun_ghosh
June 22, 2017

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
August 01, 2017

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

Kapil Marwaha
August 01, 2017

Thank you so much !

bon tam goc
December 02, 2017

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.

Kapil Marwaha
January 18, 2021

Sure, very glad you liked it. You can follow @truedata1 & @truedata2

book hotels
March 28, 2018

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!

Kapil Marwaha
January 18, 2021

Thank you so much .. Glad you liked it ! Have a nice weekend too !

?????? ??????
April 06, 2023

Wow, fantastic weblog format! How long have you ever been running a blog for? you make running a blog glance easy. The total glance of your web site is great, as well as the content! Also visit my web blog - <a href="https://binaryoptions.org.in/" rel="nofollow ugc">?????? ??????</a>

Leave a Comment