OPEN-SOURCE SCRIPT

TASC 2025.11 The Points and Line Chart

311
█ OVERVIEW

This script implements the Points and Line Chart described by Mohamed Ashraf Mahfouz and Mohamed Meregy in the November 2025 edition of the TASC Traders' Tips, "Efficient Display of Irregular Time Series”. This novel chart type interprets regular time series chart data to create an irregular time series chart.

█ CONCEPTS

When formatting data for display on a price chart, there are two main categorizations of chart types: regular time series (RTS) and irregular time series (ITS).
  1. RTS charts, such as a typical candlestick chart, collect data over a specified amount of time and display it at one point. A one-minute candle, for example, represents the entirety of price movements within the minute that it represents.

  2. ITS charts display data only after certain conditions are met. Since they do not plot at a consistent time period, they are called “irregular”.
    Typically, ITS charts, such as Point and Figure (P&F) and Renko charts, focus on price change, plotting only when a certain threshold of change occurs.

The Points and Line (P&L) chart operates similarly to a P&F chart, using price change to determine when to plot points. However, instead of plotting the price in points, the P&L chart (by default) plots the closing price from RTS data. In other words, the P&L chart plots its points at the actual RTS close, as opposed to (price) intervals based on point size. This approach creates an ITS while still maintaining a reference to the RTS data, allowing us to gain a better understanding of time while consolidating the chart into an ITS format.

█ USAGE

Because the P&L chart forms bars based on price action instead of time, it displays displays significantly more history than a typical RTS chart. With this view, we are able to more easily spot support and resistance levels, which we could use when looking to place trades.

In the chart below, we can see over 13 years of data consolidated into one single view.
ekran görüntüsü

To view specific chart details, hover over each point of the chart to see a list of information.

In addition to providing a compact view of price movement over larger periods, this new chart type helps make classic chart patterns easier to interpret. When considering breakouts, the closing price provides a clearer representation of the actual breakout, as opposed to point size plots which are limited.

ekran görüntüsü

Because P&L is a new charting type, this script still requires a standard RTS chart for proper calculations. However, the main price chart is not intended for interpretation alongside the P&L chart; users can hide the main price series to keep the chart clean.

█ DISPLAYS

ekran görüntüsü

This indicator creates two displays: the "Price Display" and the "Data Display".

With the "Price display" setting, users can choose between showing a line or OHLC candles for the P&L drawing. The line display shows the close price of the P&L chart. In the candle display, the close price remains the same, while the open, high, and low values depend on the price action between points.

With the "Data display" setting, users can enable the display of a histogram that shows either the total volume or days/bars between the points in the P&L chart. For example, a reading of 12 days would indicate that the time since the last point was 12 days.
Note: The "Days" setting actually shows the number of chart bars elapsed between P&L points. The displayed value represents days only if the chart uses the "1D" timeframe.

The "Overlay P&L on chart" input controls whether the P&L line or candles appear on the main chart pane or in a separate pane.

Users can deactivate either display by selecting "None" from the corresponding input.

Technical Note: Due to drawing limitations, this indicator has the following display limits:
  • The line display can show data to 10,000 P&L points.
  • The candle display and tooltips show data for up to 500 points.
  • The histograms show data for up to 3,333 points.


█ INPUTS

Reversal Amount: The number of points/steps required to determine a reversal.

Scale size Method: The method used to filter price movements. By default, the P&L chart uses the same scaling method as the P&F chart. Optionally, this scaling method can be changed to use ATR or Percent.

P&L Method: The prices to plot and use for filtering:
  • “Close” plots the closing price and uses it to determine movements.
  • “High/Low” uses the high price on upside moves and low price on downside moves.
  • "Point Size" uses the closing price for filtration, but locks the price to plot at point size intervals.

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.