OPEN-SOURCE SCRIPT
umbul98-Doji RSI with Divergence

🔹 1. Basic Logic
This indicator combines two things:
🕯 Doji candlestick pattern → Indecision/reversal signal
📈 RSI (Relative Strength Index) → Overbought/oversold condition
👉 So instead of a Doji alone:
It produces a more filtered signal with “Doji + RSI position”.
🔹 2. How is a Doji Detected?
The indicator defines a classic Doji as follows:
The candle body is very small.
The upper and lower wicks are close together (balance exists).
In the code:
Body = less than 5% of the total range.
Wicks are approximately equal.
👉 This allows:
True indecision candles are filtered out (junk Dojis are eliminated).
🔹 3. RSI Integration (The most critical part)
It divides Dojis into 3 categories according to RSI:
🟢 1. Lower Boundary Doji (RSI ≤ 30)
Oversold zone
Doji = selling pressure may be weakening
👉 Interpretation: Possibility of an uptrend
🔴 2. Upper Boundary Doji (RSI ≥ 70)
Overbought zone
Doji = buying pressure may be weakening
👉 Interpretation: Possibility of a downtrend
⚪ 3. Neutral Doji (30 < (RSI < 70)
Uncertain market
👉 Comment: Wait / direction unclear
🔹 What does the 4th chart show?
✔️ "D" label on the candle
Marks the bar where a Doji is forming
Meaning changes according to color:
🟢 Green → Possible upward reversal
🔴 Red → Possible downward reversal
⚪ Gray → Undecided
✔️ Background Colors
Green → RSI low + Doji
Red → RSI high + Doji
Gray → Neutral
👉 This is a very good visual filter 👍
✔️ Tooltip (explanation when hovered over)
Each label has a comment:
“May show an upward trend”
“May show a downward trend”
✔️ Alarm System
There are 3 different alarms:
RSI ≤ 30 + Doji
RSI ≥ 70 + Doji
Neutral Doji
👉 Can be linked to TradingView alarm
🔹 5. Purpose of Use
This indicator is especially useful for: Ideal:
✅ Bottom capture (reversal)
RSI below 30 + Doji → strong signal
✅ Top capture
RSI above 70 + Doji → selling opportunity
✅ Fake signal filtering
Confirmation with RSI instead of Doji alone
🔹 6. Strengths
✔ Noise-reduced Doji detection
✔ Smart filtering with RSI
✔ Visually very clear (label + background)
✔ Alarm supported
✔ Simple but effective strategy infrastructure
🔹 7. Weaknesses (Important ⚠️)
❗ If used alone:
Can mislead in trend market
Constantly generates Doji (especially low timeframe)
👉 Therefore, best use:
With EMA trend filter
With support/resistance
Consolidation breakout island
This indicator combines two things:
🕯 Doji candlestick pattern → Indecision/reversal signal
📈 RSI (Relative Strength Index) → Overbought/oversold condition
👉 So instead of a Doji alone:
It produces a more filtered signal with “Doji + RSI position”.
🔹 2. How is a Doji Detected?
The indicator defines a classic Doji as follows:
The candle body is very small.
The upper and lower wicks are close together (balance exists).
In the code:
Body = less than 5% of the total range.
Wicks are approximately equal.
👉 This allows:
True indecision candles are filtered out (junk Dojis are eliminated).
🔹 3. RSI Integration (The most critical part)
It divides Dojis into 3 categories according to RSI:
🟢 1. Lower Boundary Doji (RSI ≤ 30)
Oversold zone
Doji = selling pressure may be weakening
👉 Interpretation: Possibility of an uptrend
🔴 2. Upper Boundary Doji (RSI ≥ 70)
Overbought zone
Doji = buying pressure may be weakening
👉 Interpretation: Possibility of a downtrend
⚪ 3. Neutral Doji (30 < (RSI < 70)
Uncertain market
👉 Comment: Wait / direction unclear
🔹 What does the 4th chart show?
✔️ "D" label on the candle
Marks the bar where a Doji is forming
Meaning changes according to color:
🟢 Green → Possible upward reversal
🔴 Red → Possible downward reversal
⚪ Gray → Undecided
✔️ Background Colors
Green → RSI low + Doji
Red → RSI high + Doji
Gray → Neutral
👉 This is a very good visual filter 👍
✔️ Tooltip (explanation when hovered over)
Each label has a comment:
“May show an upward trend”
“May show a downward trend”
✔️ Alarm System
There are 3 different alarms:
RSI ≤ 30 + Doji
RSI ≥ 70 + Doji
Neutral Doji
👉 Can be linked to TradingView alarm
🔹 5. Purpose of Use
This indicator is especially useful for: Ideal:
✅ Bottom capture (reversal)
RSI below 30 + Doji → strong signal
✅ Top capture
RSI above 70 + Doji → selling opportunity
✅ Fake signal filtering
Confirmation with RSI instead of Doji alone
🔹 6. Strengths
✔ Noise-reduced Doji detection
✔ Smart filtering with RSI
✔ Visually very clear (label + background)
✔ Alarm supported
✔ Simple but effective strategy infrastructure
🔹 7. Weaknesses (Important ⚠️)
❗ If used alone:
Can mislead in trend market
Constantly generates Doji (especially low timeframe)
👉 Therefore, best use:
With EMA trend filter
With support/resistance
Consolidation breakout island
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.