OPEN-SOURCE SCRIPT
Distance % from sma

This indicator measures the percentage distance between the current price and its Simple Moving Average (SMA). It displays how far price has deviated above or below the moving average, expressed as a percentage.
Default setting is a 36-period SMA, though this can be adjusted. The zero line (red) represents when price equals the SMA. Positive values indicate price is above the average, while negative values show price is below.
The step line visualization makes it easy to identify overbought/oversold conditions and potential mean reversion opportunities. When the distance percentage reaches extreme levels, it often signals that price may be due for a pullback toward the mean.
Useful for identifying:
- Overbought/oversold conditions
- Mean reversion setups
- Trend strength measurement
- Entry/exit timing based on deviation from average
Default setting is a 36-period SMA, though this can be adjusted. The zero line (red) represents when price equals the SMA. Positive values indicate price is above the average, while negative values show price is below.
The step line visualization makes it easy to identify overbought/oversold conditions and potential mean reversion opportunities. When the distance percentage reaches extreme levels, it often signals that price may be due for a pullback toward the mean.
Useful for identifying:
- Overbought/oversold conditions
- Mean reversion setups
- Trend strength measurement
- Entry/exit timing based on deviation from average
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.