OPEN-SOURCE SCRIPT

Auto Trend Channel + Buy/Sell Alerts

1 133
This indicator automatically detects trend channels using a linear regression line, and dynamically plots upper and lower channel boundaries based on standard deviation. It helps traders identify potential Buy and Sell zones with clear visual signals and customizable alerts.

💡 How It Works:
🧠 Regression-Based Channel: Calculates the central trend line using ta.linreg() over a user-defined length.

📏 Dynamic Boundaries: Upper and lower channel lines are offset by a multiplier of the standard deviation for precision volatility tracking.

✅ Buy Signals: Triggered when price crosses above the lower boundary — potential bounce entry.

❌ Sell Signals: Triggered when price crosses below the upper boundary — potential reversal exit.

🔔 Alerts Enabled: Get real-time alerts when price touches the channel lines.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.