High 1 ATR above X

Hello,
I’m trying to script a showbar for when the high is at least 1x ATR above any given criteria such as a bollinger band upper band. I can’t seem to figure this one out!
Any help much appreciated.
Thank you as always!
Jeff

(Average true range)

Hi Jeff,

Here’s the script based on a 20 period Bollinger Band and 10 period ATR (adjust as necessary).

BB1=BB(BARS=20, DEFAULT=UpperLine);
ATR1=ATR(BARS=10);
HIGH() > BB1 + ATR1