indicator · on price · open source

Doji

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

Doji: open and close are virtually equal, signalling indecision between buyers and sellers. Body less than 10% of the candle range.

  • Yellow bar highlights the indecision.
  • Powerful when it appears after a strong trend — the market is pausing.
  • Watch the next candle for confirmation of direction.

Source code

//@version=5
indicator("Doji", overlay=true)
threshold = input.float(0.1, "Body/Range threshold", minval=0.01, step=0.01)
bodySize = math.abs(close - open)
range = high - low
doji = range > 0 and bodySize / range < threshold
barcolor(doji ? color.yellow : na)
plotshape(doji, "Doji", style=shape.diamond, location=location.abovebar, color=color.yellow, text="D")
alertcondition(doji, "Doji", "Doji candle printed")

Comments

No comments yet.

Sign in to comment.