Indicator · Pine Script v5 · Own pane

Doji Marker

by might-tree

Doji Marker identifies and highlights Doji candlestick patterns on the price chart based on a user-defined body-to-range ratio.

View on GitHub

GitHub stars4on the repository
Pine versionv5runs as is
Lines of code14
Settings1inputs
LicenceNone statedfile: MPL-2.0
Last update3 years ago2 Aug 2023

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

14 lines of Pine Script v5 from Indicators/Doji_Marker.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

Doji_Marker.pine
//Run the following Script on PINE EDITOR or any platform supporting Pine Script

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © might-tree

//@version=5
indicator("Doji Marker")

accuracy = input.float(0.15, minval=0.001, title='Doji Size')
barcolor(math.abs(open - close) <= (high - low) * accuracy ? color.white : na)
doji = math.abs(open - close) <= (high - low) * accuracy ? 1 : 0
plotshape(doji, style=shape.diamond, color=color.blue, location=location.abovebar, size=size.tiny, title='Doji Marker')

plot(close)

Overview

When the absolute distance between the open and close prices is less than or equal to a specified fraction of the total bar range, the indicator colors the candle white and plots a blue diamond marker above the bar. The single sensitivity parameter allows traders to loosen or tighten the threshold for what qualifies as a Doji.

Details

Published by

might-tree on GitHub

Type

Indicator, Pine Script v5

Draws

Separate pane below the chart

Category

Candlestick patterns

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Doji Sizefloat0.15accuracy
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

The Bullish/Bearish Candle Series Distribution indicator calculates the length of the current streak of consecutive bullish or bearish candles based on user-selected mode. It tracks streak lengths from 2 to 59 and plots a histogram in a separate pane showing t

Indicator v4 Candlestick patterns
Updated 10 days ago · GPL-3.0 GitHub repository of Bullish/Bearish Candle Series Distribution

My Script

by ricardosantos79
261 stars

This indicator plots a normalized candle dynamic visualization inside a custom 500x500 Gann square grid within a separate pane. It normalizes each bar's open and close prices relative to its high-low range, storing the resulting coordinate pairs in fixed-size

Indicator v5 Support & resistanceCandlestick patterns
Updated 4 years ago · None stated GitHub repository of My Script

Commitment Gauge

by harryguiacorn
219 stars

This indicator measures directional momentum by evaluating candlestick body proportions and volume over a user-defined lookback window. It computes the ratio of candle body to total range, weights the cumulative value by volume and absolute body size, and dete

Indicator v4 VolumeCandlestick patterns
Updated 1 year ago · None stated GitHub repository of Commitment Gauge

Qstick Indicator

by mihakralj
99 stars

This indicator calculates the Qstick value as a simple or exponential moving average of the difference between a chosen close source and open source. It plots that oscillator in a separate pane as a yellow line, draws a dashed zero line, and shades the backgro

Indicator v6 Oscillators & momentumCandlestick patterns
Updated 4 weeks ago · Apache-2.0 GitHub repository of Qstick Indicator

Dual-color bars

by be-thomas
65 stars

This indicator draws a separate OHLC bar series in its own pane using plotbar. Each bar is colored lime when the close is greater than or equal to the open, and red when the close is below the open. It has no user inputs, no signals, and no entry, exit, stop,

Indicator v5 Candlestick patterns
Updated 4 days ago · GPL-3.0 GitHub repository of Dual-color bars
43 stars

This indicator builds a synthetic Heikin-Ashi series using only the current open and the opens of the previous three bars. It derives open, high, low, and close from those values, rounds each price to the symbol mintick, and plots the result as candles in a se

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Heikin-Ashi Open Only

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers