OPEN-SOURCE SCRIPT
Overextended vs 50DMA Detector

This indicator helps traders identify when a stock or asset becomes statistically overextended relative to its 50-day moving average (50DMA) — a key signal for potential pullbacks, consolidations, or profit-taking zones.
⸻
🔍 What It Does
• Calculates the 50-day simple moving average (SMA) of price.
• Computes the percentage gap between current price and the 50DMA.
• Measures the standard deviation of that percentage gap to assess volatility-adjusted extremes.
• Flags the stock as “Overextended” when:
• Price is more than 20% above the 50DMA, and
• The % gap is greater than 3× its historical standard deviation.
When these conditions are met, the script:
• Highlights the candle with a 🚨 red triangle on the chart.
• Shades the background to indicate potential overheating.
• Triggers an alert condition so traders can be notified in real time.
⸻
🔍 What It Does
• Calculates the 50-day simple moving average (SMA) of price.
• Computes the percentage gap between current price and the 50DMA.
• Measures the standard deviation of that percentage gap to assess volatility-adjusted extremes.
• Flags the stock as “Overextended” when:
• Price is more than 20% above the 50DMA, and
• The % gap is greater than 3× its historical standard deviation.
When these conditions are met, the script:
• Highlights the candle with a 🚨 red triangle on the chart.
• Shades the background to indicate potential overheating.
• Triggers an alert condition so traders can be notified in real time.
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.