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
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน