OPEN-SOURCE SCRIPT

Intrabar Distribution

The Intrabar Distribution publication is an extension of the Intrabar BoxPlot publication. Besides a boxplot, it showcases price and volume distribution using intrabar Lower Timeframe (LTF) values (close) which can be displayed on the chart or in a separate pane.

🔶 USAGE

Snapshot

Intrabar Distribution has several features, users can display:
  • Recent candle for comparison against the other features
  • Boxplot of recent candle
  • Price distribution (optionally displayed as a curve)
  • Volume distribution


🔹 Recent candle / Boxplot

Snapshot

The middle 50% intrabar close values (Interquartile range, or IQR) are shown as a box, where the upper limit is percentile 75 (p75), and the lower limit is percentile 25 (p25). The dashed lines show the addition/subtraction of 1.5*IQR. All values out of range are considered outliers. They are displayed as white dots within the IQR*1.5 range or white X's when beyond the IQR*3 range (extreme outliers).

By showing the middle 50% intrabar values through a box, we can more easily see where the intrabar activity is mainly situated.

Note in the example above an upward-directed candle with a negative volume delta, displayed as a red box and dot (see further).

As seen in the following example, compared against the recent candle (grey candle at the left), most of the intrabar activity lies just beneath the opening price.

Snapshot

Note that results will be more accurate when more data is available, which can be done by making the difference between the current timeframe and the intrabar timeframe large enough.

🔹 Price / Volume distribution

The price and volume distribution can be helpful for highlighting areas of interest.

Snapshot

Here, we can see two areas where intrabar closing prices are mainly positioned.

The following example shows three successive bars. The recent bar is displayed on the left side, together with the volume distribution. The boxplot and price distribution are displayed on the right.

Snapshot

You can see the difference between volume and price distribution.
  • At the first bar, most price activity is at the top, while most of the volume was generated at the bottom; in other words, the price got briefly in the bottom region, with high volume before it returned.
  • At the second bar, price and volume are relatively equally distributed, which fits for indecisiveness.
  • The third bar shows more volume at a higher region; most intrabar closing prices are above the closing price.


Following example shows the same with 'Curve shaped' enabled (Settings: 'Price Distribution')

Snapshot

When 'Curve shaped' is enabled, lines/labels are shown with the standard deviation distance.

Snapshot

A blue 'guide line' can be enabled for easier interpretation.

🔹 Volume Delta

Snapshot

When there is a discrepancy between the delta volume and direction of the candle, this will be displayed as follows:

  • Red candle: when the sum of the volume of green intrabars is higher than the sum of the volume of red intrabars, the 'mean dot' will be coloured green.
  • Green candle: when the sum of the volume of red intrabars is higher than the sum of the volume of green intrabars, the 'mean dot' will be coloured red.


🔶 DETAILS

The intrabar values are sorted and split in parts/sections. The number of values in each section is displayed as a white line

Snapshot

Snapshot

The same principle applies to volume distribution, where the sum of volume per section is displayed as an orange area.

Snapshot

The boxplot displays several price values

  • Last close price
  • Highest / lowest intrabar close price
  • Median
  • p25 / p75


🔹 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

  • Location: Chart / Pane (when pane is opted, move the indicator to a separate pane as well)
  • Parts: divides the intrabar close values into parts/sections
  • Offset: offsets every drawing at once
  • Width: width of drawings, only applicable on "location: chart"
  • Label size: size of price labels


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


🔹 Current Bar
  • Display toggle + color setting
  • Offset: offsets only the 'Current Bar' drawing


🔹 Intrabar Boxplot

Display toggle + Colors, dependable on different circumstances.
  • Up: Price goes up, with more bullish than bearish intrabar volume.
  • Up-: Price goes up, with more bearish than bullish intrabar volume.
  • Down: Price goes down, with more bearish than bullish intrabar volume.
  • Down+: Price goes down, with more bullish than bearish intrabar volume.


Offset: offsets only the 'Boxplot' drawing

🔹 Price distribution
  • Display toggle + Color.
  • Curve Shaped
  • Guide Lines: Display 2 blue lines
  • Display Price: Show price of 'x' standard deviation
  • Offset: offsets only the 'Price distribution' drawing
  • Label size: size of price labels (standard deviation)


🔹 Volume distribution
  • Display toggle + Color.
  • Offset: offsets only the 'Volume distribution' drawing


🔹 Table
  • Show TF: Show intrabar Timeframe.
  • Textcolor
  • Size Table: Text Size
statistics

Open-source Skript

Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun das Script auch andere Trader verstehen und prüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?


PineCoder: pinecoders.com

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

Haftungsausschluss