## Range bars (RB)

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

### Re: Range bars (RB)

Why is the range bars still time dependent? I thought it was designed to cut out 'noise' as most articles I have read suggest that it is ime independent.
Average Joe

Posts: 4
Joined: Sun Dec 04, 2011 6:50 am

### Re: Range bars (RB)

Why are these range bars time dependent? From my understanding its the number of bars hence the pips that defines when the bars move up or down.
Average Joe

Posts: 4
Joined: Sun Dec 04, 2011 6:50 am

### Re: Range bars (RB)

The way I understand it all bars in a range bar chart are to be the same size and a new bar is only plotted when price moves out of the range of the current bar and therefore starts one tick above or below the high or the low respectively of the current bar and its extent is again the same size as the current bar i.e. no new bars are plotted while the price is within the range of the current bar. So I don't understand why in one of the range bar chart above there are many sideways bars at the same level. Also I don't understand where the wicks come in to in this picture - if some one can please clarify. Thanks.
sergesp

Posts: 18
Joined: Thu Mar 01, 2012 6:28 pm

### Re: Range bars (RB)

A new bar does not start until a price tick exceed the fixed range of the current bar Up or Down.

Within this range, range bar behaves more or less like an ordinary candle, we can have wicks on one side.
But when price crosses boundaries up or down, the we break the range on that one side.
Range bar varies from Renko Chart.

Sideways bars? i have to backtest this one.

Apprentice
FXCodeBase: Confirmed User

Posts: 20393
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Range bars (RB)

I have solve this problem.
If you use too small, size of the candles, the application does not have enough memory.
I'm trying to find a fix.
Range_Bar.lua

Apprentice
FXCodeBase: Confirmed User

Posts: 20393
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Range bars (RB)

Would be grateful to fix the limit of range bar loaded on the chart.Thanks.
Matthew Zucchini - Junior Analyst FXCM Italy -
mzucchini@fxcm.it

The transactions are made in a demo, strictly educational purposes.
All posts and analysis are for educational purposes only.
Every opinion is purely educational purposes.

Matteo Zucchini

Posts: 5
Joined: Thu Mar 22, 2012 12:14 pm

### Re: Range bars (RB)

It would certainly be awesome if you could fix the 'size' of range and memory error. I'd like to use 10 pip range bar charts. Is there a setting where I could adjust the amount of memory the charting uses?
I really am in need of range bars.

fxcatty

Posts: 27
Joined: Thu Jul 01, 2010 7:16 pm

### Re: Range bars (RB)

hi!

I can see that this indicator works on a bar-source:

Code: Select all
indicator:requiredSource(core.Bar);

Would it be possible to draw rangebars also on tick-base, meaning to replace "(core.Bar)" with "(core.Tick)"?
What would be the impact on the calculation-part of that indicator, since the ticksource doesnt provide h, l, o, c?

Code: Select all
function TEST(i)

local FLAG= true;
while FLAG do

if  source.high[i]>  (tick_low[Count]+   SIZE)  then

tick_high[Count] = tick_low[Count] + SIZE;
tick_close[Count] = tick_low[Count] + SIZE;

tick_open[Count+1] = tick_close[Count];
tick_high[Count+1] = tick_close[Count];
tick_low[Count+1] = tick_close[Count];
tick_close[Count+1] = tick_close[Count];

Count= Count+1;
elseif    source.low[i]  < (tick_high[Count] - SIZE) then

tick_low[Count] = tick_high[Count] - SIZE;
tick_close[Count] = tick_high[Count] - SIZE;

tick_open[Count+1] = tick_close[Count];
tick_high[Count+1] = tick_close[Count];
tick_low[Count+1] = tick_close[Count];
tick_close[Count+1] = tick_close[Count];

Count= Count+1;
elseif   source.low[i] < tick_low[Count]   then
tick_low[Count] = source.low[i];
FLAG= false;
elseif   source.high[i] > tick_high[Count]  then
tick_high[Count] = source.high[i];
FLAG= false;
else
FLAG= false;
end

end
end

S
lalala987

Posts: 28
Joined: Wed Jan 02, 2013 5:31 pm

### Re: Range bars (RB)

Apprentice wrote:
As regards the application of other indicators of nonlinear price data
I have not seen it anywhere in theory or practice.

Dear Apprentice

I have gone tXrXoXuXgXh your rangebar code and i think rangebars are quite useful. Besides other small glitches, is there a way to place an indicator correctly on the rangebars? As someone above mentioned the indicator shifts/or is not beeing updatet correctly as new data arrives. if i press F5 in marketscope the indicator is at the correct position again.
would "core.UpdateAll" help in this case? or would something like "core.ASYNC_REDRAW" get rid of that behaviour?
Is "F5" just redrawing the indicator, or is the indicator beeing recalculated again as a whole?

kind regards

PS: for some reason the spamfilter of the board if blocking the word tXrXoXuXgXh (remove X's)
lalala987

Posts: 28
Joined: Wed Jan 02, 2013 5:31 pm

### Re: Range bars (RB)

We are planing to introduce new version of this indicator, along with the new version of TS.
Also I have ask, forum support team to investigate the spam filter problem.

Apprentice
FXCodeBase: Confirmed User

Posts: 20393
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

PreviousNext