OPEN-SOURCE SCRIPT
Average True Range Percent

ATRP expresses Average True Range as a percentage of price instead of an absolute value. Raw ATR is denominated in price, so it can't be used to compare volatility across instruments trading at different price levels — a $10 stock and a $400 stock will have very different ATR values even if they move by the same relative amount. Dividing ATR by close (×100) normalizes it into a percentage, making volatility comparable across any symbol, timeframe, or asset class.
How It's Calculated
True range is smoothed with a selectable moving average rather than a fixed method, so you can match the indicator's responsiveness to your own style.
Settings
How It's Calculated
True range is smoothed with a selectable moving average rather than a fixed method, so you can match the indicator's responsiveness to your own style.
Settings
- ATR Lookback Period — number of bars used in the smoothing calculation (default 14).
- ATR Smoothing — RMA, SMA, EMA, or WMA (default RMA, the classic Wilder smoothing used by standard ATR).
- ATR Timeframe — calculate ATR on the chart's own timeframe, or pin it to a fixed timeframe (ticks, seconds, minutes, hours, days, weeks, or months) regardless of what chart resolution you're viewing. Useful for gauging a higher-timeframe's volatility while trading a lower one.
- Wait for Timeframe Closes — only relevant when ATR Timeframe differs from the chart. Off: the value updates live with the still-forming higher-timeframe bar (can repaint on historical reloads). On: the value only updates once the selected timeframe's bar has actually closed (no repainting, one-bar lag).
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
Software engineer and part time trader.
davisgoff.com
davisgoff.com
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
Software engineer and part time trader.
davisgoff.com
davisgoff.com
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.