Incorrect value of Interval(2) for Range Bars

augubhai

Well-Known Member
#1
I use a 100R chart for Nifty Futures. Since TickSize is 0.05, this paints 5 point range bars.

But the code below behaves erratically in Amibroker 5.4. The value of Interval(2) should be 100R, but instead it keeps switching between 100R and 0-tick. :confused:

GfxTextOut("Interval = " + Interval(2),10,10);

I am running the afl on multiple floating windows.

Anyone know a solution for this?
 
#2
I use a 100R chart for Nifty Futures. Since TickSize is 0.05, this paints 5 point range bars.

But the code below behaves erratically in Amibroker 5.4. The value of Interval(2) should be 100R, but instead it keeps switching between 100R and 0-tick. :confused:

GfxTextOut("Interval = " + Interval(2),10,10);

I am running the afl on multiple floating windows.

Anyone know a solution for this?

Upload a data example. It should be real tick data not minute bars data! Then you should fill in the TickSize in Information window of AB.
And use AB 5.50+ because there was a fix in regards to Range bars.
 

augubhai

Well-Known Member
#3
Upload a data example. It should be real tick data not minute bars data! Then you should fill in the TickSize in Information window of AB.
And use AB 5.50+ because there was a fix in regards to Range bars.
Detwo,

My query was about a different point. How does the value of Interval(2) become 0-tick on a 100R chart? Actually, it sometimes keeps flickering between 100R and 0-tick.

About the point you mentioned.....
I use AB 5.4 precisely because the 5.5 fix does not suit me. I am creating the bars off 1-minute data. Both versions compress the compress the 1 minute data to create the range bars.

In case of 5.5, if the compressed bar length exceeds the range, then the bar is truncated to the specified range. This results in gaps with a lot of ticks missing on the charts.

In 5.4, if the compressed bar length exceeds the range, then the entire range is shown, even if it exceeds the specified range. I think that this is a better option than 5.5 (5.5 has gaps in the chart).
 
#5
Detwo,

My query was about a different point. How does the value of Interval(2) become 0-tick on a 100R chart? Actually, it sometimes keeps flickering between 100R and 0-tick.

About the point you mentioned.....
I use AB 5.4 precisely because the 5.5 fix does not suit me. I am creating the bars off 1-minute data. Both versions compress the compress the 1 minute data to create the range bars.

In case of 5.5, if the compressed bar length exceeds the range, then the bar is truncated to the specified range. This results in gaps with a lot of ticks missing on the charts.

In 5.4, if the compressed bar length exceeds the range, then the entire range is shown, even if it exceeds the specified range. I think that this is a better option than 5.5 (5.5 has gaps in the chart).

What you think is not important. Facts are important. To create range bars from 1-minute data is pointless. Range bars are created from tick data. So from my POV it doesn't surprise me that you get different results. And 5.50 upwards works correct. You just have no clue.
 

augubhai

Well-Known Member
#6
What you think is not important. Facts are important. To create range bars from 1-minute data is pointless. Range bars are created from tick data. So from my POV it doesn't surprise me that you get different results. And 5.50 upwards works correct. You just have no clue.
Detwo,

Here is an example of 100R charts created in AB5.4 using 1-minute data.
http://www.traderji.com/trading-diary/71054-augubhais-diary-notes-121.html#post729685

The minute bars are compressed until 100R is reached. If there is an excess, then the bar length will be greater than 100R. Gap at open may result in a very long bar. So theoretically not correct range bars, but very good substitute if you do not have tick data.

My query (in the first post) is about a different point, but we are discussing something else here.
 

sr114

Well-Known Member
#7
Detwo,

Here is an example of 100R charts created in AB5.4 using 1-minute data.
http://www.traderji.com/trading-diary/71054-augubhais-diary-notes-121.html#post729685

The minute bars are compressed until 100R is reached. If there is an excess, then the bar length will be greater than 100R. Gap at open may result in a very long bar. So theoretically not correct range bars, but very good substitute if you do not have tick data.

My query (in the first post) is about a different point, but we are discussing something else here.
Augu

1st make the basics correct.
Range bars are never created by compressing rather then is created by expanding. means - every tick or its near approximation (where tick data is not available) is required to create the range bars and not the contrary.

this is ur basic mistake.

as ur query goes - interval(2) will show 100 R when it gets the data from 1 min tf and will show 0 when not. so if u r really interested to create range bars first of all arrange for tick data and plot it in ami 5.50 - its flawless and not in ami 5.40

ex
nifty futures range bars



it is created in ami 5.50 and see there is no such abnormal candles

sr
 

augubhai

Well-Known Member
#8
Ok.... Here's what I found. Interval(2) shows incorrect values only if multiple charts with different timeframes are open at the same time. If I open just one 100R chart, then Interval(2) shows 100R.

So, obviously this is some bug that occurs when multiple charts are open. If I find a solution to this, I will post it here.
 

Similar threads