PINE LIBRARY
BASCOOL_Lib

BASCOOL Library v1
Range–Body Structure Analysis Toolkit for Intraday Trading
The BASCOOL Library provides high-quality, reusable Pine Script components for structural conviction analysis based purely on price action. It is designed for intraday traders who rely on volatility-adjusted range expansion and candle-body efficiency to identify strong, weak, or choppy market conditions.
Included Functions
rbm_from_ohlc() – Range–Body Measure (RBM)
A volatility-normalized structure indicator that evaluates:
Range Expansion:
Smooth EMA of (High–Low), normalized by ATR
→ captures strength of movement relative to volatility
Body Efficiency:
Body-to-Range ratio smoothed with EMA
→ measures how much of the candle’s range is “directional”
The RBM output is a smooth structural strength score typically between 0 and 1, where:
High RBM → strong structure, clean movement, trend-friendly conditions
Low RBM → compressed ranges, weak bodies, low-quality structure
Flat RBM → choppy environment, avoid directional trades
Range–Body Structure Analysis Toolkit for Intraday Trading
The BASCOOL Library provides high-quality, reusable Pine Script components for structural conviction analysis based purely on price action. It is designed for intraday traders who rely on volatility-adjusted range expansion and candle-body efficiency to identify strong, weak, or choppy market conditions.
Included Functions
rbm_from_ohlc() – Range–Body Measure (RBM)
A volatility-normalized structure indicator that evaluates:
Range Expansion:
Smooth EMA of (High–Low), normalized by ATR
→ captures strength of movement relative to volatility
Body Efficiency:
Body-to-Range ratio smoothed with EMA
→ measures how much of the candle’s range is “directional”
The RBM output is a smooth structural strength score typically between 0 and 1, where:
High RBM → strong structure, clean movement, trend-friendly conditions
Low RBM → compressed ranges, weak bodies, low-quality structure
Flat RBM → choppy environment, avoid directional trades
Pine脚本库
秉承TradingView的精神,作者已将此Pine代码作为开源库发布,以便我们社区的其他Pine程序员可以重用它。向作者致敬!您可以私下或在其他开源出版物中使用此库,但在出版物中重用此代码须遵守网站规则。
Gokul Ramachandran – software architect, programmer. Interested in trading and investment. Currently trading and researching strategies that can be employed in NSE.
Contact: gokul4trading@gmail.com]
LinkedIn: linkedin.com/in/gokulramachandran/
Contact: gokul4trading@gmail.com]
LinkedIn: linkedin.com/in/gokulramachandran/
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
Pine脚本库
秉承TradingView的精神,作者已将此Pine代码作为开源库发布,以便我们社区的其他Pine程序员可以重用它。向作者致敬!您可以私下或在其他开源出版物中使用此库,但在出版物中重用此代码须遵守网站规则。
Gokul Ramachandran – software architect, programmer. Interested in trading and investment. Currently trading and researching strategies that can be employed in NSE.
Contact: gokul4trading@gmail.com]
LinkedIn: linkedin.com/in/gokulramachandran/
Contact: gokul4trading@gmail.com]
LinkedIn: linkedin.com/in/gokulramachandran/
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。