Indicator · Pine Script v4 · On the chart

Point-and-Figure (P&F) Chart Identifier

by everget

This indicator checks bar-to-bar price relationships to detect whether the active chart uses a Point-and-Figure (P&F) chart type.

View on GitHub

GitHub stars948on the repository
Pine versionv4older, still runs
Lines of code35
Settings0inputs
LicenceGPL-3.0
Last update10 days ago18 Oct 2026

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

35 lines of Pine Script v4 from research/point_and_figure_pnf_chart_identifier.pine, published under GPL-3.0. Keep the author's credit and licence lines when you reuse it.

point_and_figure_pnf_chart_identifier.pine
//@version=4
// Copyright (c) 2020-present, Alex Orekhov (everget)
// Point-and-Figure (P&F) Chart Identifier script may be freely distributed under the terms of the GPL-3.0 license.
study("Point-and-Figure (P&F) Chart Identifier", overlay=true)

var int ocCount = -1
ocCount := open[1] == close or close[1] == open ? ocCount + 1 : ocCount

var int sum = 0
sum := close > close[1] ? sum + 1 : close < close[1] ? sum - 1 : sum

isPnF = (sum == 1 or sum == 0 or sum == -1) and ocCount < bar_index - 1
matchedCandles = cum(isPnF ? 1 : 0)

labelText = isPnF ? "This is P&F Chart" : "This is not P&F Chart"
stats = "\n------------------------------" +
         "\nBar Index: " + tostring(int(bar_index)) +
         "\nMatched Candles: " + tostring(matchedCandles) +
         "\nO==C: " + tostring(ocCount) +
         "\nSum: " + tostring(sum)
labelColor = #1e90ff
whiteColor = color.white

var label pnfLabel = label.new(
     x=bar_index,
     y=na,
     text="",
     color=labelColor,
     textcolor=whiteColor,
     style=label.style_label_down,
     size=size.normal
     )

label.set_text(pnfLabel, labelText + stats)
label.set_xy(pnfLabel, bar_index, highest(close, 10))

Overview

Point-and-Figure (P&F) Chart Identifier tracks consecutive close price directions and counts occurrences where opening and closing levels match between adjacent bars. The script displays an overlay label directly on the price chart showing the detection status alongside diagnostic metrics, including current bar index, matched candle count, and accumulated directional sums. It contains no configurable user settings.

Details

Published by

everget on GitHub

Type

Indicator, Pine Script v4

Draws

On the price chart

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.

Topics

pinepinescripttechnical-indicatorsindicatorsoscillatorbandsaveragetradingviewindicatormoving-average

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

575 stars

The indicator plots ICT displacement candles on the price chart and can switch to retracement scanning. Displacement requires a move larger than a set share of the 14-bar average high-low range, lasting at least a chosen number of bars, with optional close, pr

Indicator v6 SMC / ICT / price actionCandlestick patterns
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Displacement Candles Indicator
330 stars

This script plots three moving averages on the price chart: a fast EMA or SMA with 10 periods, a slow EMA or SMA with 20 periods, and a trend EMA or SMA with 100 periods. It signals trend changes by drawing a white cross when the fast moving average crosses ab

Indicator v4 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of 3 EMA/SMA + Cross [Alorse]
318 stars

This indicator calculates an ATR trailing stop line derived from the highest high minus an average true range multiple over a specified lookback period. It plots the trailing stop line directly on the price chart and colors price bars based on whether the clos

Indicator v5 TrendVolatility & bands
Updated 2 months ago · MIT GitHub repository of ATR Trailing Stoploss

1833 Tracker

by Allen1212
303 stars

1833 Tracker is an overlay indicator that visualizes historical buy and sell transactions executed by ARK Invest ETFs for the stock on the main price chart. It displays trade dates using green buy and red sell labels positioned relative to price bars, indicati

Indicator v4
Updated 2 years ago · None stated GitHub repository of 1833 Tracker

iondv Signals

by akumidv
297 stars

This indicator plots external buy and sell signals directly on the price chart. It reads comma-separated timestamp strings for buy and sell events, checks whether the current chart matches the specified ticker symbol, and displays green upward triangles below

Indicator v4
Updated 10 days ago · GPL-3.0 GitHub repository of iondv Signals

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