OPEN-SOURCE SCRIPT

Scatter Plot

The Price Volume Scatter Plot publication aims to provide intrabar detail as a Scatter Plot.

🔶 USAGE

A dot is drawn at every intrabar close price and its corresponding volume, as can seen in the following example:
תמונת-בזק
Price is placed against the white y-axis, where volume is represented on the orange x-axis.

🔹 More detail

תמונת-בזק

A Scatter Plot can be beneficial because it shows more detail compared with a Volume Profile (seen at the right of the Scatter Plot).

The Scatter Plot is accompanied by a "Line of Best Fit" (linear regression line) to help identify the underlying direction, which can be helpful in interpretation/evaluation.
תמונת-בזק

It can be set as a screener by putting multiple layouts together.
תמונת-בזק

🔹 Easier Interpretation

Instead of analysing the 1-minute chart together with volume, this can be visualised in the Scatter Plot, giving a straightforward and easy-to-interpret image of intrabar volume per price level.
תמונת-בזק

One of the scatter plot's advantages is that volumes at the same price level are added to each other.

A dot on the scatter plot represents the cumulated amount of volume at that particular price level, regardless of whether the price closed one or more times at that price level.

תמונת-בזק
Depending on the setting "Direction", which sets the direction of the Volume-axis, users can hoover to see the corresponding price/volume.

🔹 Highest Intrabar Volume Values

Users can display up to 5 last maximum intrabar volume values, together with the intrabar timeframe (Res)

תמונת-בזק

🔹 Practical Examples

תמונת-בזק
When we divide the recent bar into three parts, the following can be noticed:
  • Price spends most of its time in the upper part, with relative medium-low volume, since the intrabar close prices are mostly situated in the upper left quadrant.
  • Price spends a shorter time in the middle part, with relative medium-low volume.
  • Price moved rarely below 61800 (the lowest part), but it was associated with high volume. None of the intrabar close prices reached the lowest area, and the price bounced back.


In the following example, the latest weekly candle shows a rejection of the 45.8 - 48.5K area, with the highest volume at the 45.8K level.
תמונת-בזק

תמונת-בזק

The next three successive candles show a declining maximum intrabar volume, after which the price broke through the 45.8K area.

🔹 Visual Options

There are many visual options available.
תמונת-בזק

🔹 Change Direction

The Scatter Plot can be set in 4 different directions.
תמונת-בזק

🔶 NOTES

🔹 Notes

The script uses the maximum available resources to draw the price/volume dots, which are 500 boxes and 500 labels. When the population size exceeds 1000, a warning is provided (Not all data is shown); otherwise, only the population size is displayed.
תמונת-בזק

The Scatter Plot ideally needs a chart which contains at least 100 bars. When it contains less, a warning will be shown: bars < 100, not all data is shown
תמונת-בזק

🔹 LTF Settings

When 'Auto' is enabled (Settings, LTF), the LTF will be the nearest possible x times smaller TF than the current TF. When 'Premium' is disabled, the minimum TF will always be 1 minute to ensure TradingView plans lower than Premium don't get an error.

Examples with current Daily TF (when Premium is enabled):
  • 500 : 3 minute LTF
  • 1500 (default): 1 minute LTF
  • 5000: 30 seconds LTF (1 minute if Premium is disabled)


🔶 SETTINGS

Direction: Direction of Volume-axis; Left, Right, Up or Down

🔹 LTF
  • LTF: LTF setting
  • Auto + multiple: Adjusts the initial set LTF
  • Premium: Enable when your TradingView plan is Premium or higher


🔹 Character
  • Character: Style of Price/Volume dot
  • Fade: Increasing this number fades dots at lower price/volume
  • Color


🔹 Linear Regression
  • Toggle (enable/disable), color, linestyle
  • Center Cross: Toggle, color


🔹 Background Color
  • Fade: Increasing this number fades the background color near lower values
  • Volume: Background color that intensifies as the volume value on the volume-axis increases
  • Price: Background color that intensifies as the price value on the price-axis increases


🔹 Labels
  • Size: Size of price/volume labels
  • Volume: Color for volume labels/axis
  • Price: Color for price labels/axis
  • Display Population Size: Show the population size + warning if it exceeds 1000


🔹 Dashboard
  • Location: Location of dashboard
  • Size: Text size
  • Display LTF: Display the intrabar Lower Timeframe used
  • Highest IB volume: Display up to 5 previous highest Intrabar Volume values


linearregressionregressionsscatterstatisticsVolume

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יוכלו להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אבל השימוש החוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

רוצה להשתמש בסקריפ זה בגרף?


PineCoder: pinecoders.com

- We cannot control our emotions,
but we can control our keyboard -

כתב ויתור