OPEN-SOURCE SCRIPT
Inside Bar (Body-based) Ind/Alert

Description:
This indicator detects Inside Bar patterns based strictly on the candle body (open/close range) of the mother candle, rather than the traditional high/low wick method. An inside bar is highlighted when the current candle’s entire body is contained within the body of the previous candle.
It can be useful for traders who want a more conservative and reliable definition of inside bars, focusing on true consolidation periods and filtering out signals caused by extended wicks.
Features:
Body-based Inside Bar detection:
The indicator colors and marks candles where the current bar’s body is fully within the previous bar’s body.
Bullish/Bearish identification:
Bullish inside bars are marked in green, bearish in red.
Double Inside Bar Detection:
An optional feature marks when two consecutive candles’ bodies are inside the same mother bar body—potentially indicating stronger consolidation.
Alerts:
Set alerts for single or double inside bars for automated monitoring.
How to Use:
Add the indicator to your chart.
Look for colored bars or plotted shapes for inside bar signals based on candle bodies.
Use alerts to get notified in real time when inside bar patterns appear.
Note:
This script uses only the candle body (open and close) for inside bar calculations, which may help filter out less reliable signals found with wick-based approaches.
This indicator detects Inside Bar patterns based strictly on the candle body (open/close range) of the mother candle, rather than the traditional high/low wick method. An inside bar is highlighted when the current candle’s entire body is contained within the body of the previous candle.
It can be useful for traders who want a more conservative and reliable definition of inside bars, focusing on true consolidation periods and filtering out signals caused by extended wicks.
Features:
Body-based Inside Bar detection:
The indicator colors and marks candles where the current bar’s body is fully within the previous bar’s body.
Bullish/Bearish identification:
Bullish inside bars are marked in green, bearish in red.
Double Inside Bar Detection:
An optional feature marks when two consecutive candles’ bodies are inside the same mother bar body—potentially indicating stronger consolidation.
Alerts:
Set alerts for single or double inside bars for automated monitoring.
How to Use:
Add the indicator to your chart.
Look for colored bars or plotted shapes for inside bar signals based on candle bodies.
Use alerts to get notified in real time when inside bar patterns appear.
Note:
This script uses only the candle body (open and close) for inside bar calculations, which may help filter out less reliable signals found with wick-based approaches.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.