IvanLabrie

ATR%, ATR Timer and Range Expansion signal

990 16 97
These 3 indicators can be really useful.
The usage is fairly straightforward, if you understand price action, having an statistical edge like these provide can be useful.
Refer to Tim West's charts to learn more about range expansion bars.
The idea for the Atr% and Atr timer come from discussions I had with Yacine Kanoun, props to him for his contribution.
Remove from Favorite Scripts Add to Favorite Scripts
study(title="ATR%", shorttitle="ATR%", overlay=false)
source = close
length = input(1, minval=1, title = "EMA Length")
atrlen = input(10, minval=1, title = "ATR Length")
ma = ema(source, length)
range =  tr
rangema = ema(range, atrlen)

atrp = (rangema/ma)*100
avg = ema(atrp,30)
plot(atrp, color=black)
plot(avg, color=maroon)
Here's the code for the ATR Timer:

study(title="ATR Timer", shorttitle="ATRT", overlay=false)
source = close
atrlen = input(10, minval=1, title = "ATR Length")
range = tr
rangema = ema(range, atrlen)
atrp = rangema
highatrval = high-open
lowatrval = open-low
atrused = highatrval + lowatrval
atrleft = atrp - atrused
bgcolor(atrleft <= 0 ? red : na)
plot(atrleft, color=black)

And for the Range Expansion bars:

study("R.E.Signal", overlay=true)
rangeup = close+tr
rangedown = close-tr
over() => high > rangeup and close > open
under() => low < rangedown and close < open
barcolor(over() ? green: under() ? red : na)
Reply
IvanLabrie PRO IvanLabrie
Fixed:
study(title="ATR Timer", shorttitle="ATRT", overlay=false)
source = close
atrlen = input(10, minval=1, title = "ATR Length")
range = tr
rangema = ema(range, atrlen)
atrp = rangema
highatrval = high-open
lowatrval = open-low
atrused = highatrval + lowatrval
atrleft = atrp - atrused
bgcolor(atrleft <= 0 ? red : na)
plot(atrleft, color=black)
Reply
IvanLabrie PRO IvanLabrie
Ignore this first part.
Reply
Came out wrong:

study("R.E.Signal", overlay=true)
rangeup = close+tr
rangedown = close-tr
over() => high > rangeup and close > open
under() => low < rangedown and close < open
barcolor(over() ? green: under() ? red : na)
Reply
ChartArt IvanLabrie
Please post a pastebin with the entire final code version. Thank you :)
Reply
Yes, I'll do that.
Reply
kot8822 IvanLabrie
Hello Ivan - have Broblem - script can't work - read 11 -14 line - have broblem ! )) Pls Help !
Reply
Which one?
Reply
kot8822 IvanLabrie
a y speak Russian ?? mai English not Good!)
Reply
Sorry, only my name is Russian, I'm from Argentina, only English and Spanish.
Reply
Thank you for sharing this ATR indicator.

My suggestion would be to also plot the inverse with *-1 because ATR is always confusing. You never know the direction unless you compare price and ATR manually. Example:

snapshot
Reply
What do you mean?
ATR is just the range, not used for direction at all.
Reply
ChartArt IvanLabrie
Ok, I thought this %ATR modification had the intention to give it some direction, similar to the %B or %R indicators. Then I was wrong.
Reply
No, just to give a % value, instead of range in points.
Reply
Hola Ivan; Cuales son los otros indicators?
Reply
IvanLabrie PRO syracusepro
@syracusepro, revisa los comentarios del thread.
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out