OPEN-SOURCE SCRIPT
Objective Doji Highlight (Range-Relative)

This indicator highlights Doji candles using an objective, mathematics-based rule: a bar is Doji when the absolute difference between its open and close is less than or equal to a user-defined fraction (x) of that bar’s high–low range.
How it works:
Compute body size as the absolute difference between open and close.
Compute the bar’s range as high minus low.
Classify as Doji when body size ≤ x × range.
Only Doji candles are colored; non-Doji bars remain unchanged.
Inputs
Doji threshold (x of range): tolerance (0–1) controlling how small the body must be relative to the range.
Doji Candle Color: visual color for detected Doji candles.
Example:
If x = 0.10 and a candle has high = 100 and low = 90 (range = 10), the maximum allowed body is 1.
If the difference between open and close is ≤ 1, the candle is marked as Doji.
Why it can be useful
Doji candles are often studied as signs of market indecision. This tool provides a clear, parameter-based way to identify them consistently across any timeframe, without discretionary interpretation.
Notes & limitations
Works with standard candlesticks (not Heikin Ashi, Renko, or other synthetic bar types).
Visualization and research only: it does not produce buy/sell signals and makes no performance claims.
No repainting from future data; the logic uses only the current bar’s prices.
How it works:
Compute body size as the absolute difference between open and close.
Compute the bar’s range as high minus low.
Classify as Doji when body size ≤ x × range.
Only Doji candles are colored; non-Doji bars remain unchanged.
Inputs
Doji threshold (x of range): tolerance (0–1) controlling how small the body must be relative to the range.
Doji Candle Color: visual color for detected Doji candles.
Example:
If x = 0.10 and a candle has high = 100 and low = 90 (range = 10), the maximum allowed body is 1.
If the difference between open and close is ≤ 1, the candle is marked as Doji.
Why it can be useful
Doji candles are often studied as signs of market indecision. This tool provides a clear, parameter-based way to identify them consistently across any timeframe, without discretionary interpretation.
Notes & limitations
Works with standard candlesticks (not Heikin Ashi, Renko, or other synthetic bar types).
Visualization and research only: it does not produce buy/sell signals and makes no performance claims.
No repainting from future data; the logic uses only the current bar’s prices.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.