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.

Moderator: admin

Range bars (RB)

Postby Alexander.Gettinger » Mon Mar 07, 2011 2:18 am

Indicator draw candles each of which have a constant range from high to low. As data is used source chart. For small value of range not is always got constant range of bars.

For example, chart with range 75 pips:
RB.png


Download:
RB.lua
(2.86 KiB) Downloaded 3484 times


Download indicator for other chart:
RB2.lua
(2.83 KiB) Downloaded 2579 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: Range bars (RB)

Postby Alexander.Gettinger » Mon Mar 07, 2011 2:21 am

Indicators used as source data other (smaller) timeframes.
This allows to do range a bar corresponding to given.

Download:
RB_TF.lua
(6.9 KiB) Downloaded 2434 times


Download indicator for other chart:
RB2_TF.lua
(6.87 KiB) Downloaded 2266 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: Range bars (RB)

Postby gg_frx » Mon Mar 07, 2011 7:26 am

hi alexander ;)
i don't know if this indicator is the one requested from webcon and me here
viewtopic.php?f=27&t=3306&p=8577#p8577.

but this isn't range bars chart because only one shadow (or none) can be on the candle, not two.
and is independent of time.

and again in my opinion we must use tick source data, but i don't know if it wil be too heavy for TSII and how many days we can go back ...
gg_frx
FXCodeBase: Confirmed User
 
Posts: 38
Joined: Thu Dec 17, 2009 8:42 am

Re: Range bars (RB)

Postby Alexander.Gettinger » Mon Mar 07, 2011 11:48 pm

gg_frx wrote:but this isn't range bars chart because only one shadow (or none) can be on the candle, not two.
and is independent of time.


You are right.
In case use tick data as source bars may have only one or none shadow.

For example:
RB2.png


But if use not tick data there are pseudo-range bars, which may have two shadows.
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: Range bars (RB)

Postby madpipa » Sun Apr 17, 2011 11:52 pm

Hi Alexander,

Firstly, thanks all the effort you & the other programmers put into developing these indicators. Great work!

I am also looking to use range bars on my charts. Unfortunately, I disagree that this indicator draws range bars correctly. Each candle MUST be the same pip size. If 1 minute data is used to draw past candles then it must be 'cut' so that each candle will only have the selected number of pips before a new candle is formed. They, therefore, can NOT have a wick on both ends of the candle.

Please compare these 2 images:
GU from TS2.jpg
GU from Trading Station

GU from MT4.jpg
GU from Metatrader 4


They depict range bars differently. Those shown by Metatrader are consistantly 10 pips. Those shown by Trading Station vary significantly. I exported the values to excel and found the minimum to be 10 pips & the maximum to be 31.7 pips, with the average of 11.8 pips.

Is it possible to change the way these bars are currently depicted to be the same or similar to MT4?

Also, I find that these charts tend to lock my computer for up to 2 minutes - with only 1 chart open. I had 2 range bar charts open the other day & killed the process after 5 minutes as the program had not responded in all that time. My computer is a 32 biy system with 3.20GHz CPU with 4G RAM. It handles everything else easily & only has a problem when range bars are drawn. Do you have any ideas?

Thanks for your time.
Cheers,
Mick
madpipa
 
Posts: 4
Joined: Sat Jan 22, 2011 4:18 am
Location: Gold Coast, Australia

Re: Range bars (RB)

Postby Apprentice » Mon Jun 06, 2011 3:09 pm

Range_Bar.png

To Madpipa
I tried to implement according to definitions of this indicator.
Can you test my version.

Even better.
If someone has a sample code of this indicator would ask him to tell me and send it by mail.
Or post it here.
Range_Bar.lua
(4.32 KiB) Downloaded 2851 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Range bars (RB)

Postby madpipa » Tue Jun 14, 2011 6:03 pm

Thanks Apprentice. Sorry for the late reply but I have been away for a few days. This seems to be the best version yet. The only thing I have found is that it MUST be used on a chart with 1 minute periods. If, for example, I use a 30 minute period the maximum level on a "normal" bar chart may be different to the correponding level on the range bar chart. One case I looked at had the "real" candle high = 1.64715 while the range bar high = 1.64523; a difference of 19.2 pips. But if you use the 1 minute period there doesn't seem to be a problem. And these bars load very quickly. :D They don't seem to put much or any overhead on the drawing time.

I have already looked around the internet for other versions but could only find *.exe file for MT4; not the mq4 file. If you want to see another implementation why not look at the version used in Strategy Trader? You may be able to get the code for that? Those range bars seem to follow all the rules.

While the range bar indicator seems to work very well there is a problem when other indicators are also placed on the chart. For instance, if I also place a moving average on the chart it is initially placed in the correct position. But after every new range bar is formed the MA is not updated. Is there any way to fix this?

Also, when I draw a 10 pip range bar using a 1 minute timeframe I get about 35-40 bars. If I draw 20 pip range bars I only get about 5-10 bars on the chart. Is it possible to 'force' a number of bars to be drawn? My guess is that this is a function of the amount of 1 minute data read by default when the chart is populated, so we may have to live with this.

I think this version seems to follow all the rules.
Thanks again for your efforts.
madpipa
 
Posts: 4
Joined: Sat Jan 22, 2011 4:18 am
Location: Gold Coast, Australia

Re: Range bars (RB)

Postby Apprentice » Wed Jun 15, 2011 2:25 am

Any help is appreciated.
If you have. ex4 indicator send it.
Number of Bars determined by the amount of available data.
As regards the application of other indicators of nonlinear price data
I have not seen it anywhere in theory or practice.
Maybe it makes sense, I do not know.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Range bars (RB)

Postby Gadir21 » Fri Sep 23, 2011 5:22 am

Even better.
If someone has a sample code of this indicator would ask him to tell me and send it by mail.
Or post it here.
Last edited by Gadir21 on Wed Nov 30, 2011 1:21 am, edited 1 time in total.
Gadir21
 
Posts: 1
Joined: Fri Sep 23, 2011 5:21 am

Re: Range bars (RB)

Postby debra453 » Thu Oct 20, 2011 1:51 pm

I'd rather prefer him to post it here in order to make it publcy viewable ;)
debra453
 
Posts: 1
Joined: Thu Oct 20, 2011 1:47 pm

Next

Return to Custom Indicators

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 64 guests