OPEN-SOURCE SCRIPT
EMA/SMA + Inside Bar + Liquidity Tag BY RAVI

EMA/SMA + Inside Bar + Liquidity Tag
An all-in-one overlay that combines three tools traders usually run separately: a flexible moving-average suite, automatic inside-bar detection, and a live liquidity (traded-value) tag on the latest candle. Built for Pine Script v6.
What it does
1. Moving Averages (5, 10, 20, 50, 100, 200)
Six independent moving-average lines. Each line can be set to EMA or SMA on its own, so you can mix freely (for example, a 20 EMA alongside a 50 and 200 SMA). Every line has its own on/off toggle, colour, and width control (1 = thinnest, 4 = thickest). A single Source input controls which price all the lines are calculated from.
2. Inside Bar Highlighter
Automatically detects inside bars — candles whose entire range sits within the previous candle's range — and recolours the whole candle so they are easy to spot. The highlight colour is fully customizable. A Strict/Inclusive switch lets you choose between a true inside bar (current high below the previous high and current low above the previous low) or an inclusive version that also counts candles touching the previous high or low.
3. Liquidity Tag
Places a label above (or below) the most recent candle showing the stock's liquidity, formatted in crores by default (e.g. "405.98 Cr"). Three calculation methods are available:
20-Day Avg Liquidity (default): A 20-day volume-weighted average price multiplied by the 20-day average daily volume, which equals the average daily traded value. This is the most representative single gauge of how liquid a stock is, and because it is computed on daily data it reads the same on every chart timeframe.
Turnover (accurate): The current session's running sum of price × volume, built from 1-minute data so it tracks the broker's intraday turnover closely and stays consistent across timeframes.
Price × Day Volume (simple): Current price multiplied by the day's total volume — quick but drifts from true turnover as price moves.
The tag updates live on the latest candle, and its vertical position can be nudged above or below the candle using an ATR-based offset (positive places it above, negative below).
Inputs at a glance
Moving Averages: Source · per-line enable / EMA-SMA / colour / width
Inside Bar: enable highlight · highlight colour · strict vs inclusive
Liquidity Tag: enable · calculation method · averaging period (days) · value divisor (1 crore by default; set to 1 for raw value) · suffix · decimals · vertical offset · tag and text colour
Notes
The liquidity figure depends on the symbol having volume data. Cash equities have it; some indices and continuous-futures feeds do not, where the value may read 0.
Traded value is an estimate. TradingView provides one price per bar rather than every individual tick, so the turnover and 20-day methods are close approximations of exchange turnover rather than penny-perfect figures.
The crore (Cr) formatting suits Indian markets; change the divisor and suffix for other conventions.
This script is for chart analysis and educational use, not financial advice. Always validate signals with
An all-in-one overlay that combines three tools traders usually run separately: a flexible moving-average suite, automatic inside-bar detection, and a live liquidity (traded-value) tag on the latest candle. Built for Pine Script v6.
What it does
1. Moving Averages (5, 10, 20, 50, 100, 200)
Six independent moving-average lines. Each line can be set to EMA or SMA on its own, so you can mix freely (for example, a 20 EMA alongside a 50 and 200 SMA). Every line has its own on/off toggle, colour, and width control (1 = thinnest, 4 = thickest). A single Source input controls which price all the lines are calculated from.
2. Inside Bar Highlighter
Automatically detects inside bars — candles whose entire range sits within the previous candle's range — and recolours the whole candle so they are easy to spot. The highlight colour is fully customizable. A Strict/Inclusive switch lets you choose between a true inside bar (current high below the previous high and current low above the previous low) or an inclusive version that also counts candles touching the previous high or low.
3. Liquidity Tag
Places a label above (or below) the most recent candle showing the stock's liquidity, formatted in crores by default (e.g. "405.98 Cr"). Three calculation methods are available:
20-Day Avg Liquidity (default): A 20-day volume-weighted average price multiplied by the 20-day average daily volume, which equals the average daily traded value. This is the most representative single gauge of how liquid a stock is, and because it is computed on daily data it reads the same on every chart timeframe.
Turnover (accurate): The current session's running sum of price × volume, built from 1-minute data so it tracks the broker's intraday turnover closely and stays consistent across timeframes.
Price × Day Volume (simple): Current price multiplied by the day's total volume — quick but drifts from true turnover as price moves.
The tag updates live on the latest candle, and its vertical position can be nudged above or below the candle using an ATR-based offset (positive places it above, negative below).
Inputs at a glance
Moving Averages: Source · per-line enable / EMA-SMA / colour / width
Inside Bar: enable highlight · highlight colour · strict vs inclusive
Liquidity Tag: enable · calculation method · averaging period (days) · value divisor (1 crore by default; set to 1 for raw value) · suffix · decimals · vertical offset · tag and text colour
Notes
The liquidity figure depends on the symbol having volume data. Cash equities have it; some indices and continuous-futures feeds do not, where the value may read 0.
Traded value is an estimate. TradingView provides one price per bar rather than every individual tick, so the turnover and 20-day methods are close approximations of exchange turnover rather than penny-perfect figures.
The crore (Cr) formatting suits Indian markets; change the divisor and suffix for other conventions.
This script is for chart analysis and educational use, not financial advice. Always validate signals with
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.