OPEN-SOURCE SCRIPT
EDUVEST UTBOT ADJ - Adaptive ATR Trailing Stop

EDUVEST UTBOT ADJ - Adaptive ATR Trailing Stop with Session-Based Sensitivity
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ ORIGINALITY
This indicator is an enhanced version of the classic UT Bot concept, featuring automatic session-based ATR sensitivity adjustment. Unlike the original UT Bot which uses a fixed sensitivity value, this version dynamically adapts to different trading sessions (Tokyo, London, New York) and automatically detects asset characteristics to optimize signal generation.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ WHAT IT DOES
- Generates BUY and SELL signals based on ATR trailing stop crossovers with a moving average
- Automatically adjusts sensitivity based on current trading session (Tokyo/London/NY)
- Auto-detects asset type and applies optimized parameters for each instrument
- Displays real-time session information and volatility status
- Provides alert functionality with customizable cooldown periods
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ HOW IT WORKS
【Core Logic: ATR Trailing Stop】
The indicator calculates an ATR-based trailing stop using the formula:
Trailing Stop = Price ± (Sensitivity × ATR)
When price is above the trailing stop and rising, the stop trails below price.
When price is below the trailing stop and falling, the stop trails above price.
【Signal Generation】
- BUY Signal: Price crosses above the trailing stop AND Moving Average crosses above the trailing stop
- SELL Signal: Price crosses below the trailing stop AND Moving Average crosses below the trailing stop
【Session-Based Sensitivity Adjustment】
The indicator adjusts ATR sensitivity based on trading session (JST timezone):
- Tokyo (08:00-15:00): Lower sensitivity (reduced by adjustment value) - typically quieter markets
- London (15:00-23:00): Base sensitivity - moderate volatility
- New York (23:00-08:00): Higher sensitivity (increased by adjustment value) - higher volatility
【Dynamic ATR Adjustment】
When enabled, the indicator compares current ATR to its smoothed average:
- ATR Ratio = Current ATR / SMA(ATR, smoothing period)
- Volatility Multiplier = 1.0 + (Sensitivity × (2.0 - ATR Ratio))
This reduces sensitivity during high volatility (fewer false signals) and increases sensitivity during low volatility (faster response).
【Auto Asset Detection】
The indicator automatically detects the traded instrument and applies optimized parameters:
- Stable pairs (USDJPY, EURUSD, USDCHF): Base sensitivity 1.5-1.8
- Moderate pairs (AUDUSD, USDCAD, EURJPY): Base sensitivity 2.0-2.3
- Volatile pairs (GBPUSD): Base sensitivity 2.8
- Commodities (GOLD/XAUUSD): Base sensitivity 3.5
- Indices (NASDAQ/NAS100): Base sensitivity 4.0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ HOW TO USE
【Recommended Settings】
- Timeframe: 15 minutes or higher (15M, 1H, 4H recommended)
- Best performance on: Forex majors, Gold, NASDAQ
- Enable "Auto Asset Detection" for optimized parameters
【Entry Rules】
- BUY: Enter long when green BUY label appears
- SELL: Enter short when pink SELL label appears
【Session Panel】
The top-right panel displays:
- Current trading session (Tokyo/London/NY)
- Volatility status (High Chance/Medium Chance/Caution)
- Mode (AUTO/MANUAL)
【Alert Setup】
1. Enable "Viewer Alert Display" in settings
2. Set cooldown period (default: 15 minutes) to avoid signal spam
3. Create alert with "Any alert() function call" condition
【Important Notes】
- This indicator does not repaint - signals are confirmed at bar close
- Lower timeframes (1M, 5M) may generate excessive signals
- Always use proper risk management and confirm with other analysis
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ SETTINGS OVERVIEW
🎯 Alert Settings
- Viewer Alert Display: Enable/disable alert labels
- Cooldown Function: Prevent rapid consecutive signals
- Cooldown Time: Minutes between alerts (5-60)
🔧 Dynamic ATR Settings
- Enable Dynamic ATR: Auto-adjust based on volatility
- ATR Period: Calculation period (default: 14)
- ATR Smoothing: Smoothing period for ratio calculation
- Volatility Sensitivity: How much to adjust (0.1-1.0)
🕐 Session ATR Adjustment
- Enable Time Adjustment: Session-based sensitivity
- Show Session Info: Display session panel
📊 Asset Settings
- Auto Asset Detection: Automatically optimize for instrument
- Manual settings available when auto-detection is disabled
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ CREDITS
Based on the original UT Bot concept by QuantNomad.
Enhanced with session-based adaptation and auto-asset detection by EduVest.
License: Mozilla Public License 2.0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ ORIGINALITY
This indicator is an enhanced version of the classic UT Bot concept, featuring automatic session-based ATR sensitivity adjustment. Unlike the original UT Bot which uses a fixed sensitivity value, this version dynamically adapts to different trading sessions (Tokyo, London, New York) and automatically detects asset characteristics to optimize signal generation.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ WHAT IT DOES
- Generates BUY and SELL signals based on ATR trailing stop crossovers with a moving average
- Automatically adjusts sensitivity based on current trading session (Tokyo/London/NY)
- Auto-detects asset type and applies optimized parameters for each instrument
- Displays real-time session information and volatility status
- Provides alert functionality with customizable cooldown periods
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ HOW IT WORKS
【Core Logic: ATR Trailing Stop】
The indicator calculates an ATR-based trailing stop using the formula:
Trailing Stop = Price ± (Sensitivity × ATR)
When price is above the trailing stop and rising, the stop trails below price.
When price is below the trailing stop and falling, the stop trails above price.
【Signal Generation】
- BUY Signal: Price crosses above the trailing stop AND Moving Average crosses above the trailing stop
- SELL Signal: Price crosses below the trailing stop AND Moving Average crosses below the trailing stop
【Session-Based Sensitivity Adjustment】
The indicator adjusts ATR sensitivity based on trading session (JST timezone):
- Tokyo (08:00-15:00): Lower sensitivity (reduced by adjustment value) - typically quieter markets
- London (15:00-23:00): Base sensitivity - moderate volatility
- New York (23:00-08:00): Higher sensitivity (increased by adjustment value) - higher volatility
【Dynamic ATR Adjustment】
When enabled, the indicator compares current ATR to its smoothed average:
- ATR Ratio = Current ATR / SMA(ATR, smoothing period)
- Volatility Multiplier = 1.0 + (Sensitivity × (2.0 - ATR Ratio))
This reduces sensitivity during high volatility (fewer false signals) and increases sensitivity during low volatility (faster response).
【Auto Asset Detection】
The indicator automatically detects the traded instrument and applies optimized parameters:
- Stable pairs (USDJPY, EURUSD, USDCHF): Base sensitivity 1.5-1.8
- Moderate pairs (AUDUSD, USDCAD, EURJPY): Base sensitivity 2.0-2.3
- Volatile pairs (GBPUSD): Base sensitivity 2.8
- Commodities (GOLD/XAUUSD): Base sensitivity 3.5
- Indices (NASDAQ/NAS100): Base sensitivity 4.0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ HOW TO USE
【Recommended Settings】
- Timeframe: 15 minutes or higher (15M, 1H, 4H recommended)
- Best performance on: Forex majors, Gold, NASDAQ
- Enable "Auto Asset Detection" for optimized parameters
【Entry Rules】
- BUY: Enter long when green BUY label appears
- SELL: Enter short when pink SELL label appears
【Session Panel】
The top-right panel displays:
- Current trading session (Tokyo/London/NY)
- Volatility status (High Chance/Medium Chance/Caution)
- Mode (AUTO/MANUAL)
【Alert Setup】
1. Enable "Viewer Alert Display" in settings
2. Set cooldown period (default: 15 minutes) to avoid signal spam
3. Create alert with "Any alert() function call" condition
【Important Notes】
- This indicator does not repaint - signals are confirmed at bar close
- Lower timeframes (1M, 5M) may generate excessive signals
- Always use proper risk management and confirm with other analysis
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ SETTINGS OVERVIEW
🎯 Alert Settings
- Viewer Alert Display: Enable/disable alert labels
- Cooldown Function: Prevent rapid consecutive signals
- Cooldown Time: Minutes between alerts (5-60)
🔧 Dynamic ATR Settings
- Enable Dynamic ATR: Auto-adjust based on volatility
- ATR Period: Calculation period (default: 14)
- ATR Smoothing: Smoothing period for ratio calculation
- Volatility Sensitivity: How much to adjust (0.1-1.0)
🕐 Session ATR Adjustment
- Enable Time Adjustment: Session-based sensitivity
- Show Session Info: Display session panel
📊 Asset Settings
- Auto Asset Detection: Automatically optimize for instrument
- Manual settings available when auto-detection is disabled
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ CREDITS
Based on the original UT Bot concept by QuantNomad.
Enhanced with session-based adaptation and auto-asset detection by EduVest.
License: Mozilla Public License 2.0
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Custom Pine Script Development → fiverr.com/eduvest | 30 Years STEM Education × AI-Powered Trading Tools
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Custom Pine Script Development → fiverr.com/eduvest | 30 Years STEM Education × AI-Powered Trading Tools
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.