OPEN-SOURCE SCRIPT
delta imbalance candle

This Pine Script is a high-frequency order flow tool designed to identify institutional "imbalance" by looking inside a single candle to see who was more aggressive: buyers or sellers.
Here is a concise summary of its functions:
* Intraday Data Splitting: It uses TradingView Premium's request.security_lower_tf to fetch 1-minute data for a specific ticker (like Bank Nifty Futures) regardless of what timeframe you are currently viewing.
* Delta Calculation: It analyzes every 1-minute bar within your current candle. If the 1-minute close is higher than its open, it counts as Buy Volume; otherwise, it counts as Sell Volume.
* Imbalance Identification: It compares total Buy Volume vs. Sell Volume. An "Imbalance" is triggered only if one side is at least 3 times (or your chosen imb_ratio) stronger than the other.
* Selective Chart Coloring: Unlike standard indicators, it only changes the color of the candle on your chart if a significant institutional imbalance is detected. If no imbalance exists, the candles remain their original color.
* Ticker Synchronization: It allows you to track the order flow of a "Source Ticker" (e.g., Futures) while trading on a different chart (e.g., Spot).
Here is a concise summary of its functions:
* Intraday Data Splitting: It uses TradingView Premium's request.security_lower_tf to fetch 1-minute data for a specific ticker (like Bank Nifty Futures) regardless of what timeframe you are currently viewing.
* Delta Calculation: It analyzes every 1-minute bar within your current candle. If the 1-minute close is higher than its open, it counts as Buy Volume; otherwise, it counts as Sell Volume.
* Imbalance Identification: It compares total Buy Volume vs. Sell Volume. An "Imbalance" is triggered only if one side is at least 3 times (or your chosen imb_ratio) stronger than the other.
* Selective Chart Coloring: Unlike standard indicators, it only changes the color of the candle on your chart if a significant institutional imbalance is detected. If no imbalance exists, the candles remain their original color.
* Ticker Synchronization: It allows you to track the order flow of a "Source Ticker" (e.g., Futures) while trading on a different chart (e.g., Spot).
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.