PROTECTED SOURCE SCRIPT
LinReg Candles + UT Bot - Advanced Trading System (Alrussi)

Overview
LinReg Candles + UT Bot Alerts** combines two powerful trading concepts — *Linear Regression-based candles* and the renowned *UT Bot trailing stop strategy* — into one clean, visual, and alert-ready system.
It’s designed to help traders identify early trend shifts, confirm entries with dual logic, and maintain clear visual context on price strength and reversals.
---
🧠 How It Works
1. Linear Regression Candles
Instead of using raw price data, the indicator smooths candle values (Open, High, Low, Close) using **Linear Regression** over a user-defined period.
This filters out noise and highlights the *underlying directional bias* of price movements.
The optional Signal Line (SMA or EMA) tracks smoothed regression close values for additional confirmation.
2. UT Bot Logic
The UT Bot portion uses an ATR-based dynamic trailing stop and sensitivity control.
It adapts automatically to market volatility and signals:
You can optionally switch to Heikin Ashi candles for smoother trend signals.
3. Combined Confirmation
For higher precision, the indicator also issues **“Combined” alerts** only when both systems agree:
* ✅ Strong Buy: LinReg = Bullish **and** UT Bot = Bullish
* ❌ Strong Sell: LinReg = Bearish **and** UT Bot = Bearish
* ⚪ Wait: Mixed signals (no clear confirmation)
---
🎨 Visual & Display Options
You can fully customize the chart display:
* Enable/disable LinReg candles
* Show or hide UT Bot trailing line
* Toggle Buy/Sell labels
* Color bars according to UT Bot direction
* On-screen **status table** (top-right) shows live:
* LinReg trend
* UT Bot status
* Combined confirmation
---
Pine Script® ⚙️ Key Inputs
| Group | Setting | Description |
| ------------------- | --------------------------------------- | ------------------------------------- |
| **LinReg Settings** | *Length, Smoothing Type* | Controls regression depth & smoothing |
| **UT Bot Settings** | *Key Value (Sensitivity)*, *ATR Period* | Adjusts signal reactivity |
| **Display** | *Candles, Line, Signals, Colors* | Complete visual customization |
---
### 📢 Alerts
Three alert types are built-in and ready for automation:
* UT Long Signal → Buy (UT Bot)
* UT Short Signal → Sell (UT Bot)
* Combined Long/Short → Confirmed dual-signal alerts (LinReg + UT Bot)
---
### 💡 Usage Tips
* Use on H1–H4 timeframes for trend confirmation; M15–M30 for scalping setups.
* Combine with volume or momentum indicators for added confluence.
* Adjust *Key Value (Sensitivity)* — lower = more responsive, higher = smoother.
* For swing trading, use higher **Linear Regression Lengths (30–50)** to capture long-term bias.
---
### ⚠️ Disclaimer
This indicator is a **technical analysis tool**, not financial advice.
Always test on demo accounts before applying to live trades.
---
join my Telegram For More t.me/AlrussiSignals
LinReg Candles + UT Bot Alerts** combines two powerful trading concepts — *Linear Regression-based candles* and the renowned *UT Bot trailing stop strategy* — into one clean, visual, and alert-ready system.
It’s designed to help traders identify early trend shifts, confirm entries with dual logic, and maintain clear visual context on price strength and reversals.
---
🧠 How It Works
1. Linear Regression Candles
Instead of using raw price data, the indicator smooths candle values (Open, High, Low, Close) using **Linear Regression** over a user-defined period.
This filters out noise and highlights the *underlying directional bias* of price movements.
- Green Candles** → Bullish momentum (regression close > regression open)
- Red Candles** → Bearish momentum
The optional Signal Line (SMA or EMA) tracks smoothed regression close values for additional confirmation.
2. UT Bot Logic
The UT Bot portion uses an ATR-based dynamic trailing stop and sensitivity control.
It adapts automatically to market volatility and signals:
- Buy Signal when price crosses above the trailing stop.
- Sell Signal when price crosses below it.
You can optionally switch to Heikin Ashi candles for smoother trend signals.
3. Combined Confirmation
For higher precision, the indicator also issues **“Combined” alerts** only when both systems agree:
* ✅ Strong Buy: LinReg = Bullish **and** UT Bot = Bullish
* ❌ Strong Sell: LinReg = Bearish **and** UT Bot = Bearish
* ⚪ Wait: Mixed signals (no clear confirmation)
---
🎨 Visual & Display Options
You can fully customize the chart display:
* Enable/disable LinReg candles
* Show or hide UT Bot trailing line
* Toggle Buy/Sell labels
* Color bars according to UT Bot direction
* On-screen **status table** (top-right) shows live:
* LinReg trend
* UT Bot status
* Combined confirmation
---
| Group | Setting | Description |
| ------------------- | --------------------------------------- | ------------------------------------- |
| **LinReg Settings** | *Length, Smoothing Type* | Controls regression depth & smoothing |
| **UT Bot Settings** | *Key Value (Sensitivity)*, *ATR Period* | Adjusts signal reactivity |
| **Display** | *Candles, Line, Signals, Colors* | Complete visual customization |
---
### 📢 Alerts
Three alert types are built-in and ready for automation:
* UT Long Signal → Buy (UT Bot)
* UT Short Signal → Sell (UT Bot)
* Combined Long/Short → Confirmed dual-signal alerts (LinReg + UT Bot)
---
### 💡 Usage Tips
* Use on H1–H4 timeframes for trend confirmation; M15–M30 for scalping setups.
* Combine with volume or momentum indicators for added confluence.
* Adjust *Key Value (Sensitivity)* — lower = more responsive, higher = smoother.
* For swing trading, use higher **Linear Regression Lengths (30–50)** to capture long-term bias.
---
### ⚠️ Disclaimer
This indicator is a **technical analysis tool**, not financial advice.
Always test on demo accounts before applying to live trades.
---
join my Telegram For More t.me/AlrussiSignals
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。