## ATR Range Bars

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.

### ATR Range Bars

Based on request.
viewtopic.php?f=27&t=69559

To follow market volatility, a range bar whose size would depend on the ATR value.

ATR Range Bars.lua

Apprentice
FXCodeBase: Confirmed User

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

### Re: ATR Range Bars

Hello Apprentice,

The indicator is perfect and i thank you for the work.

I have an idea to add an option:

For example : For example i have a fast ATR set on 2 periods. So to smooth it i add a moving average set on x periods from the ATR.

Thanks again for all the work
damso4998

Posts: 24
Joined: Fri Mar 20, 2020 4:29 pm

### Re: ATR Range Bars

Development reference 970.

Apprentice
FXCodeBase: Confirmed User

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

### Re: ATR Range Bars

ATR Range Bars.lua

Something like this?

Apprentice
FXCodeBase: Confirmed User

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

### Re: ATR Range Bars

Thank you so much Apprentice !!

it works well

I hope this indicator will hel p a lot of people
damso4998

Posts: 24
Joined: Fri Mar 20, 2020 4:29 pm

### Re: ATR Range Bars

Hello Apprentice,

I am back again with a new idea

is it possible to add a condition betwenn the ATR value and the smoothed (MA period) value of the ATR.

I would like:

When the ATR value is inferior to value the MA period, the indicator will use The ATR value without the moving average

But when The ATR value is superior to value of the Moving average, the indicator will use the value of the Moving average

So in summary:

ATR value < Moving average = we use only the ATR value
ATR value > Moving average = we use the value of the Moving average

I don't know if i'm clear (English is not my native langage )

And since i don't have an answer in the premium section i want to ask if it's possible to convert this this indicator for prorealtime (of course i'm willing to support your work with money)
damso4998

Posts: 24
Joined: Fri Mar 20, 2020 4:29 pm

### Re: ATR Range Bars

Development reference 1151.

Apprentice
FXCodeBase: Confirmed User

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

### Re: ATR Range Bars

ATR Range Bars.lua

Try this version.

Apprentice
FXCodeBase: Confirmed User

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

### Re: ATR Range Bars

Hello Apprentice,

I have an issue with the view it's works well but it's looks like it doesn't refresh (i learnt that marketscope 2 doesn't automatically refresh is it true ?) when new bars are created so when i refresh the view it gives me different candles

Is there a way to fix it please ?
damso4998

Posts: 24
Joined: Fri Mar 20, 2020 4:29 pm

### Re: ATR Range Bars

Is "Thill now" marked or not?

Apprentice
FXCodeBase: Confirmed User

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

Next