OPEN-SOURCE SCRIPT

umbul98-Doji RSI with Divergence

366
🔹 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

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.