OPEN-SOURCE SCRIPT
BH Ergodic (TSI-style) [v5]

The BG Ergodic script is a custom momentum and trend-confirmation tool that builds on the classic True Strength Index (TSI) and Ergodic Oscillator concepts. It smooths price momentum over multiple exponential averages to identify underlying trend direction, exhaustion, and potential reversals with reduced noise.
Unlike a standard TSI, the BG Ergodic combines:
Dual-smoothing filters for both momentum and signal lines, giving a cleaner response in choppy markets.
Dynamic color transitions that highlight bullish and bearish phases based on crossovers and slope changes.
Optional histogram plotting to visualize the spread between the Ergodic line and its signal line for early trend-shift detection.
This indicator works best on swing or trend-following timeframes (e.g., 1H–1D) and can be used to:
Confirm trend direction before entries,
Filter false breakouts, or
Spot momentum divergence near key support/resistance zones.
Unlike a standard TSI, the BG Ergodic combines:
Dual-smoothing filters for both momentum and signal lines, giving a cleaner response in choppy markets.
Dynamic color transitions that highlight bullish and bearish phases based on crossovers and slope changes.
Optional histogram plotting to visualize the spread between the Ergodic line and its signal line for early trend-shift detection.
This indicator works best on swing or trend-following timeframes (e.g., 1H–1D) and can be used to:
Confirm trend direction before entries,
Filter false breakouts, or
Spot momentum divergence near key support/resistance zones.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.