OPEN-SOURCE SCRIPT
Trend Flip Exhaustion Signals

This Pine Script is designed to generate buy and short trading signals based on a combination of technical indicators. It calculates fast and slow EMAs, RSI, a linear regression channel, and a simplified TTM squeeze histogram to measure momentum.
- Short signals trigger when price is above both EMAs, near the upper regression channel, momentum is weakening, volume is fading, and RSI is overbought.
- Buy signals trigger when price is below both EMAs, near the lower regression channel, momentum is strengthening, volume is surging, and RSI is oversold.
- Signals are displayed as labels anchored to price bars (with optional plotshape arrows for backup).
- The script also plots the EMAs and regression channel for visual context.
In short - it’s a trend‑following entry tool that highlights potential exhaustion points for shorts and potential reversals for buys, with clear on‑chart markers to guide decision‑making.
- Short signals trigger when price is above both EMAs, near the upper regression channel, momentum is weakening, volume is fading, and RSI is overbought.
- Buy signals trigger when price is below both EMAs, near the lower regression channel, momentum is strengthening, volume is surging, and RSI is oversold.
- Signals are displayed as labels anchored to price bars (with optional plotshape arrows for backup).
- The script also plots the EMAs and regression channel for visual context.
In short - it’s a trend‑following entry tool that highlights potential exhaustion points for shorts and potential reversals for buys, with clear on‑chart markers to guide decision‑making.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.