OPEN-SOURCE SCRIPT
ATR Ratio Z-Score

Volatility regime signal using the ratio of short-term ATR to long-term ATR, then normalizes it using a Z-score.
It measures how unusual the current short-term volatility is relative to long-term volatility.
Conceptually:
Short ATR (5) → recent volatility
Long ATR (20) → baseline volatility
Ratio = Short ATR / Long ATR
If the ratio rises, recent volatility is expanding.
If the ratio falls, volatility is compressing.
Then you standardize it using a Z-score, so you know how extreme the condition is relative to the last 50 periods.
It measures how unusual the current short-term volatility is relative to long-term volatility.
Conceptually:
Short ATR (5) → recent volatility
Long ATR (20) → baseline volatility
Ratio = Short ATR / Long ATR
If the ratio rises, recent volatility is expanding.
If the ratio falls, volatility is compressing.
Then you standardize it using a Z-score, so you know how extreme the condition is relative to the last 50 periods.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.