OPEN-SOURCE SCRIPT
Daily Oversold Swing Screener

That script is a **Pine Script Indicator** designed to identify potential **swing trade entry points** on a daily timeframe by looking for stocks that are **oversold** but still in a **healthy long-term uptrend**.
It screens for a high-probability reversal setup by combining four specific technical conditions.
Here is a detailed breakdown of the script's purpose and logic:
---
## 📝 Script Description: Daily Oversold Swing Screener
This Pine Script indicator serves as a **momentum and trend confirmation tool** for active traders seeking short-to-intermediate-term long entries. It uses data calculated on the **Daily** timeframe to generate signals, regardless of the chart resolution you are currently viewing.
The indicator is designed to filter out stocks that are in a strong downtrend ("falling knives") and only signal pullbacks within an established uptrend, which significantly increases the probability of a successful swing trade bounce.
### 🔑 Key Conditions for a Signal:
The indicator generates a buy signal when **all four** of the following conditions are met on the Daily timeframe:
#### 1. Oversold Momentum
* **Condition:** `rsiD < rsiOS` (Daily RSI is below the oversold level, typically **30**).
* **Purpose:** Confirms that the selling pressure has been extreme and the stock is temporarily out of favor, setting up a potential bounce.
#### 2. Momentum Turning Up
* **Condition:** `rsiD > rsiPrev` (Current Daily RSI value is greater than the previous day's Daily RSI value).
* **Purpose:** This is the most crucial filter. It confirms that the momentum has **just started to shift upward**, indicating that the low may be in and the stock is turning away from the oversold region.
#### 3. Established Uptrend (No Falling Knives)
* **Condition:** `sma50 > sma200 and closeD > sma50` (50-day SMA is above the 200-day SMA, AND the current daily close is above the 50-day SMA).
* **Purpose:** This is a **long-term trend filter**. It ensures that the current oversold condition is just a **pullback** within a larger, structurally bullish market (50 > 200), and that the price is still holding above the short-term trend line (Close > 50 SMA). This effectively screens out weak stocks in continuous downtrends.
#### 4. Price at Support (Bollinger Bands)
* **Condition:** `closeD <= lowerBB` (Daily Close is less than or equal to the lower Bollinger Band).
* **Purpose:** Provides a secondary measure of extreme price deviation. When the price touches or breaches the lower band, it suggests a significant move away from the mean (basis), often signaling strong statistical support where price is likely to revert.
### 📌 Summary of Signal
The final signal (`signal`) is triggered only when the market is confirmed to be **in a healthy long-term trend (Condition 3)**, the price is at an **extreme support level (Condition 4)**, the momentum is **oversold (Condition 1)**, and most importantly, the **momentum has begun to reverse (Condition 2)**.
It screens for a high-probability reversal setup by combining four specific technical conditions.
Here is a detailed breakdown of the script's purpose and logic:
---
## 📝 Script Description: Daily Oversold Swing Screener
This Pine Script indicator serves as a **momentum and trend confirmation tool** for active traders seeking short-to-intermediate-term long entries. It uses data calculated on the **Daily** timeframe to generate signals, regardless of the chart resolution you are currently viewing.
The indicator is designed to filter out stocks that are in a strong downtrend ("falling knives") and only signal pullbacks within an established uptrend, which significantly increases the probability of a successful swing trade bounce.
### 🔑 Key Conditions for a Signal:
The indicator generates a buy signal when **all four** of the following conditions are met on the Daily timeframe:
#### 1. Oversold Momentum
* **Condition:** `rsiD < rsiOS` (Daily RSI is below the oversold level, typically **30**).
* **Purpose:** Confirms that the selling pressure has been extreme and the stock is temporarily out of favor, setting up a potential bounce.
#### 2. Momentum Turning Up
* **Condition:** `rsiD > rsiPrev` (Current Daily RSI value is greater than the previous day's Daily RSI value).
* **Purpose:** This is the most crucial filter. It confirms that the momentum has **just started to shift upward**, indicating that the low may be in and the stock is turning away from the oversold region.
#### 3. Established Uptrend (No Falling Knives)
* **Condition:** `sma50 > sma200 and closeD > sma50` (50-day SMA is above the 200-day SMA, AND the current daily close is above the 50-day SMA).
* **Purpose:** This is a **long-term trend filter**. It ensures that the current oversold condition is just a **pullback** within a larger, structurally bullish market (50 > 200), and that the price is still holding above the short-term trend line (Close > 50 SMA). This effectively screens out weak stocks in continuous downtrends.
#### 4. Price at Support (Bollinger Bands)
* **Condition:** `closeD <= lowerBB` (Daily Close is less than or equal to the lower Bollinger Band).
* **Purpose:** Provides a secondary measure of extreme price deviation. When the price touches or breaches the lower band, it suggests a significant move away from the mean (basis), often signaling strong statistical support where price is likely to revert.
### 📌 Summary of Signal
The final signal (`signal`) is triggered only when the market is confirmed to be **in a healthy long-term trend (Condition 3)**, the price is at an **extreme support level (Condition 4)**, the momentum is **oversold (Condition 1)**, and most importantly, the **momentum has begun to reverse (Condition 2)**.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.