Volume Profile Volume Delta OI Delta [Kioseff Trading]

Published on MillionChart by BreakoutTrader.

This script separates volume delta for any asset and open interest delta for Binance perpetual futures. It calculates volume at each tick level and displays the metric on a volume profile. The neon-style outline of the labels is configurable.

Features:
- Volume delta profile for any asset.
- Open Interest (OI) delta, calculated in the same way as volume delta. This works only on Binance Futures pairs, and the script will not load if you try to calculate OI delta on other assets.
- Optional heatmap based on volume delta or OI delta.

Assumptions, since the exact data is not available:
- When a tick level has only buy volume or only sell volume recorded, the script assumes a 60/40 split, so no level ends up with buy volume above zero and sell volume at zero, or the reverse. This can be turned off to record volume as is.
- If a one-minute bar crosses several tick levels, its volume or open interest is divided by the number of levels crossed and added to each.

Other options:
- Recalculate after a time threshold you define.
- Set the distance between levels as a percentage or in ticks.

The author invites suggestions on how price action could be used to better estimate volume at each price area.