UT Bot Trend Signal ATR Trailing Stop Multi Filter
- 지표
- 버전: 1.0
- 활성화: 5
UT Bot Trend Signal ATR Trailing Stop Multi Filter
UT Bot KU v1.00 - Technical Overview and Operational Manual
1. General Overview
UT Bot KU v1.00 is a technical analysis custom indicator designed for the MetaTrader 4 platform. The software combines an Average True Range (ATR) dynamic trailing stop algorithm with real-time candlestick color coding, directional entry arrows, automated risk-to-reward target level projections, and a modular 15-filter confirmation suite. The primary objective of this indicator is to assist traders in identifying trend direction, filtering market noise during consolidation phases, and visualizing structured Stop Loss (SL) and Take Profit (TP) zones directly on the price chart. This tool functions strictly as a visual analytical and notification aid and does not execute automated trades. Every component of the indicator is engineered for transparent technical reading, allowing traders to evaluate volatility-adjusted price boundaries alongside optional multi-indicator confluence without cluttering the workspace.
2. Operating Principle and Signal Logic
The core calculation engine evaluates price volatility using the Average True Range (ATR) multiplied by a user-defined sensitivity factor to establish a dynamic trailing stop threshold. As price advances or declines, the trailing baseline ratchets in the direction of the prevailing trend and holds steady during minor counter-trend pullbacks until a decisive closing price breach occurs.
- Trend State and Candlestick Coloring: When the closing price remains above the calculated ATR trailing stop line, the market state is classified as bullish, rendering candlestick bodies and wicks in aqua alongside a rising trailing line. When the closing price falls below the trailing stop line, the state shifts to bearish, coloring candlesticks in red with a descending trailing line. During initial historical bar warm-up prior to directional establishment, the trailing line displays in blue.
- Buy Signal Generation: A preliminary bullish signal occurs when the closing price crosses from below to above the ATR trailing stop line after having previously tracked beneath it. If any optional confirmation filters are enabled in the input settings, all active filter conditions must evaluate as valid simultaneously on the signal bar before the upward Buy arrow is plotted below the candle low.
- Sell Signal Generation: A preliminary bearish signal occurs when the closing price crosses from above to below the ATR trailing stop line after having previously tracked above it. All enabled filter modules must simultaneously confirm bearish alignment before the downward Sell arrow is plotted above the candle high.
- Exit and Reversal Guidance: Traders may manage open positions using the plotted 1R, 2R, and 3R ATR target lines, trailing stops along the dynamic trailing line, or exiting upon the appearance of an opposing directional signal. Partial profit-taking strategies can utilize TP1 and TP2 while leaving remaining exposure to trail toward TP3 or an opposite crossover.
- Repainting Behavior and Bar Calculation: Signal stability is controlled by the WaitForCandleClose parameter. When set to true (default), signals are evaluated and confirmed exclusively on closed historical bars (Bar 1). Confirmed arrows on closed bars remain fixed and do not recalculate, shift, or disappear. When set to false, signals are evaluated dynamically on the active forming bar (Bar 0) and may fluctuate until the current candle closes. Note that if the optional Fibonacci Retracement filter is enabled, its internal swing detection relies on ZigZag parameters which require subsequent price bars to confirm swing extremes.
3. Key Technical Features
- Dynamic ATR Trailing Stop Engine: Continuously adapts support and resistance trailing thresholds to current instrument volatility using configurable ATR periods and multipliers, responding rapidly to volatility expansions while maintaining steady trailing levels during directional runs.
- Dual-Buffer Candlestick Visualization: Overlays bullish and bearish colors directly onto chart wicks and bodies using histogram buffer pairs for immediate visual trend recognition without requiring separate sub-windows.
- Automated ATR Risk-to-Reward Target Projection: Automatically draws horizontal entry, Stop Loss, TP1 (1:1 RR), TP2 (2:1 RR), and TP3 (3:1 RR) lines with price labels for the most recent valid signal, updating automatically when a newer confirmed signal occurs.
- Modular 15-Filter Confirmation Framework: Includes fifteen independent technical filters (RSI Cross, ADX Trend, Single MA, Ichimoku Senkou Span B, RSI 75 Trend, Double MA, Awesome Oscillator, Parabolic SAR, Heiken Ashi, CCI Trend, CCI Overbought/Oversold, RVI Trend and Signal, MACD Histogram and Zero Line, Support/Resistance Zones, Fibonacci Retracement, and Supertrend) that can be combined in any configuration to match trend-following, momentum-breakout, or pullback trading methodologies.
- Multi-Channel Alert System: Supports MetaTrader terminal pop-up alerts, custom WAV audio alerts, and mobile push notifications containing symbol, timeframe, direction, and calculated Entry, SL, TP1, TP2, and TP3 price levels.
- Non-Repainting Closed-Bar Mode: Ensures historical signal integrity and reliable chart review when operating in confirmed candle close mode.
4. Trading Recommendations, Workflow, and Operational Specifications
- Recommended Instruments: Suitable for major and minor Forex currency pairs (such as EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD, EURJPY), precious metals (XAUUSD, XAGUSD), stock indices (US30, NAS100, GER40), and liquid CFD instruments. Always evaluate broker spread characteristics and tick size before deploying on exotic pairs or low-liquidity sessions.
- Supported Timeframes: Compatible with all standard MT4 timeframes (M1 to MN1). M5 and M15 are suited for intraday momentum trading during active London and New York sessions, while H1 and H4 provide broader trend structures with fewer consolidation signals.
- Practical Setup Workflow: Start by attaching the indicator with default core settings (keyvalue = 1.0, atrperiod = 1) to observe raw volatility shifts on your chosen instrument. Adjust keyvalue upward (for example to 1.5 or 2.0) on noisy instruments to reduce whipsaws, then selectively enable one or two complementary filters—such as a higher-period Moving Average or ADX filter—to align entries with broader market structure.
- Account and Execution Environment: Compatible with both Hedging and Netting account types across Standard, Raw, and ECN broker feeds. Because this is a visual analytical indicator rather than an order-execution robot, low-latency VPS hosting is not mandatory unless continuous 24/5 mobile push notifications are required while your local workstation is offline.
- Computational Resource Management: By default, all 15 secondary filters are disabled to maintain minimal CPU and memory overhead. Enabling multiple complex filters simultaneously (such as Supertrend, Heiken Ashi, Support/Resistance, and ZigZag Fibonacci) increases per-tick calculation load during historical initialization. If running the indicator across numerous open charts simultaneously on modest hardware, keep unused filters disabled and limit the maximum bars in chart settings under MetaTrader Tools > Options > Charts.
5. Graphical User Interface (GUI) Elements
- Aqua Candlesticks and Aqua Trailing Line: Indicate bullish market structure where closing prices hold above the ATR trailing stop threshold.
- Red Candlesticks and Red Trailing Line: Indicate bearish market structure where closing prices hold below the ATR trailing stop threshold.
- Blue Trailing Line: Indicates a neutral initialization state prior to directional trend confirmation on the earliest historical bars.
- Aqua Upward Arrow (Code 233): Plotted below the candle low (offset by 15 points) to mark a confirmed Buy signal that has passed all enabled filter checks.
- Red Downward Arrow (Code 234): Plotted above the candle high (offset by 15 points) to mark a confirmed Sell signal that has passed all enabled filter checks.
- Target Projection Lines and Labels: Displays a solid gold Entry line, dashed red SL line, dashed lime green TP1 (1R) line, dashed medium sea green TP2 (2R) line, and dashed dodger blue TP3 (3R) line anchored from the latest signal bar to the right margin, accompanied by exact price labels formatted to the symbol digits.
6. Complete Input Parameters Documentation
Below is the complete reference of all configurable parameters available in the MetaTrader 4 Inputs tab:
Section 1: UT Bot Core Settings
- InpCoreGroup (Default: "=== 1. UT BOT CORE SETTINGS ==="): Visual section header separating core algorithm parameters in the inputs window.
- keyvalue (Default: 1.0): Sensitivity multiplier applied to the ATR value to determine trailing stop distance. Higher values widen the stop distance and reduce signal frequency; lower values increase sensitivity to short-term price swings.
- atrperiod (Default: 1): Number of bars used to calculate the Average True Range for the core trailing stop engine.
Section 2: Signal Execution Settings
- InpExecGroup (Default: "=== 2. SIGNAL EXECUTION SETTINGS ==="): Visual section header for signal timing controls.
- WaitForCandleClose (Default: true): Determines signal confirmation timing. When true, signals trigger only after the candle closes (non-repainting). When false, signals evaluate dynamically on the current open bar.
Section 3: Alert and Notifications
- InpAlertGroup (Default: "=== 3. ALERT & NOTIFICATIONS ==="): Visual section header for notification settings.
- Use_Alert_Popup (Default: true): Enables or disables the standard MetaTrader desktop pop-up alert window upon signal confirmation.
- Use_Alert_Sound (Default: true): Enables or disables audible WAV sound alerts when a signal occurs.
- Use_Push_Notification (Default: true): Enables or disables sending formatted signal messages to the MetaTrader mobile app via MetaQuotes ID.
- Use_Sound_Only (Default: false): When set to true, suppresses desktop pop-up windows while continuing to play audio alerts.
- Sound_File_Buy (Default: "alert.wav"): Filename of the WAV audio file located in the MetaTrader Sounds directory played for Buy signals.
- Sound_File_Sell (Default: "alert2.wav"): Filename of the WAV audio file located in the MetaTrader Sounds directory played for Sell signals.
Section 4: ATR and Target Levels (SL/TP)
- InpTargetGroup (Default: "=== 4. ATR & TARGET LEVELS (SL/TP) ==="): Visual section header for risk-to-reward projection settings.
- Show_SLTP_Lines (Default: true): Toggles the display of horizontal Entry, Stop Loss, and Take Profit lines and price labels on the chart.
- Target_ATR_Period (Default: 7): Lookback period in bars used to compute the ATR baseline for Stop Loss and Take Profit distances.
- Target_ATR_Multiplier (Default: 1.5): Multiplier applied to Target_ATR_Period to establish the 1R Stop Loss distance from the entry price.
- Right_Extension_Bars (Default: 1): Number of bars to extend target lines and text labels to the right of the current active bar (Bar 0).
- Label_Font_Size (Default: 8): Font size in points for the Entry, SL, TP1, TP2, and TP3 text labels.
- Color_Entry_Line (Default: clrGold): Color of the horizontal entry price line and label.
- Color_SL_Line (Default: clrRed): Color of the Stop Loss projection line and label.
- Color_TP1_Line (Default: clrLimeGreen): Color of the first Take Profit (1:1 risk-to-reward) line and label.
- Color_TP2_Line (Default: clrMediumSeaGreen): Color of the second Take Profit (2:1 risk-to-reward) line and label.
- Color_TP3_Line (Default: clrDodgerBlue): Color of the third Take Profit (3:1 risk-to-reward) line and label.
- Target_Line_Style (Default: STYLE_DASH): Line drawing style (solid, dash, dot) applied to SL and TP projection lines.
- Line_Width (Default: 1): Pixel thickness of the projected Entry, SL, and TP horizontal lines.
Section 5: Filter 1 - RSI Cross Filter
- InpFilter1 (Default: "=== 1. RSI CROSS FILTER ==="): Visual header for the Relative Strength Index crossover filter.
- Use_RSI_Cross_Filter (Default: false): Enables filtering signals based on RSI crossing out of oversold or overbought zones.
- RSI_Length (Default: 14): Averaging period in bars for the RSI calculation.
- RSI_Price_Source (Default: PRICE_CLOSE): Applied price series used for RSI computation.
- RSI_Oversold (Default: 30.0): Lower threshold level that RSI must cross upward to validate a Buy signal.
- RSI_Overbought (Default: 70.0): Upper threshold level that RSI must cross downward to validate a Sell signal.
Section 6: Filter 2 - ADX Trend Strength Filter
- InpFilter2 (Default: "=== 2. ADX FILTER ==="): Visual header for the Average Directional Index filter.
- Use_ADX_Filter (Default: false): Enables filtering out signals during low-momentum or ranging markets using ADX.
- ADX_Period (Default: 10): Calculation period in bars for the ADX indicator.
- ADX_Min_Level (Default: 20.0): Minimum ADX main line value required to permit Buy or Sell signals.
Section 7: Filter 3 - Single Moving Average Filter
- InpFilter3 (Default: "=== 3. SINGLE MA FILTER ==="): Visual header for the single Moving Average trend filter.
- Use_MA_Filter (Default: false): Enables price-versus-Moving-Average directional filtering (Buy above MA, Sell below MA).
- MA_Period (Default: 50): Number of bars used for the Moving Average calculation.
- MA_Method (Default: MODE_SMA): Smoothing algorithm (Simple, Exponential, Smoothed, Linear Weighted).
- MA_Shift (Default: 0): Horizontal bar shift applied to the Moving Average.
Section 8: Filter 4 - Ichimoku Senkou Span B Filter
- InpFilter4 (Default: "=== 4. ICHIMOKU SENKOU SPAN B FILTER ==="): Visual header for the Ichimoku Kinko Hyo cloud baseline filter.
- Use_Ichimoku_Filter (Default: false): Enables filtering signals relative to the Ichimoku Senkou Span B line (Buy above Span B, Sell below Span B).
- Ichimoku_Tenkan (Default: 9): Tenkan-sen (Conversion Line) calculation period in bars.
- Ichimoku_Kijun (Default: 26): Kijun-sen (Base Line) calculation period in bars.
- Ichimoku_SenkouB (Default: 52): Senkou Span B (Leading Span B) calculation period in bars.
Section 9: Filter 5 - Long-Period RSI Trend Filter
- InpFilter5 (Default: "=== 5. RSI 75 FILTER ==="): Visual header for the macro RSI midline filter.
- Use_RSI75_Filter (Default: false): Enables macro momentum filtering where Buy requires RSI above 50.0 and Sell requires RSI below 50.0.
- RSI_Filter_Period (Default: 75): Lookback period in bars for the macro RSI trend filter.
Section 10: Filter 6 - Double Moving Average Crossover Filter
- InpFilter6 (Default: "=== 6. DOUBLE MA FILTER ==="): Visual header for the dual Moving Average alignment filter.
- Use_DoubleMA_Filter (Default: false): Enables trend alignment filtering requiring fast MA_A to be above slow MA_B for Buy, and below for Sell.
- MA_A_Period (Default: 30): Calculation period in bars for the fast Moving Average (MA A).
- MA_A_Method (Default: MODE_EMA): Smoothing method for MA A.
- MA_A_Applied (Default: PRICE_CLOSE): Applied price type for MA A.
- MA_A_Shift (Default: 0): Bar shift offset for MA A.
- MA_B_Period (Default: 140): Calculation period in bars for the slow Moving Average (MA B).
- MA_B_Method (Default: MODE_EMA): Smoothing method for MA B.
- MA_B_Applied (Default: PRICE_CLOSE): Applied price type for MA B.
- MA_B_Shift (Default: 0): Bar shift offset for MA B.
Section 11: Filter 7 - Awesome Oscillator Filter
- InpFilter7 (Default: "=== 7. AWESOME OSCILLATOR FILTER ==="): Visual header for Bill Williams Awesome Oscillator (AO) filters.
- Use_AO_Filter (Default: false): Master switch enabling Awesome Oscillator momentum validation.
- Use_AO_Volume_Filter (Default: false): Requires AO value to exceed minimum magnitude thresholds (AO_Buy_Min or AO_Sell_Max).
- AO_Buy_Min (Default: 4.0): Minimum positive AO histogram value required for Buy validation when volume filter is active.
- AO_Sell_Max (Default: -4.0): Maximum negative AO histogram value required for Sell validation when volume filter is active.
- Use_AO_Color_Filter (Default: false): Requires AO histogram slope to be rising (green) for Buy and falling (red) for Sell.
- Use_AO_Zero_Filter (Default: false): Requires AO histogram to be above 0.0 and rising for Buy, or below 0.0 and falling for Sell.
Section 12: Filter 8 - Parabolic SAR Filter
- InpFilter8 (Default: "=== 8. PARABOLIC SAR FILTER ==="): Visual header for the Parabolic Stop and Reverse filter.
- Use_SAR_Filter (Default: false): Enables trend confirmation requiring price to be above Parabolic SAR dots for Buy and below for Sell.
- SAR_Step (Default: 0.02): Acceleration factor step increment for Parabolic SAR.
- SAR_Maximum (Default: 0.2): Maximum acceleration factor limit for Parabolic SAR.
Section 13: Filter 9 - Heiken Ashi Candle Filter
- InpFilter9 (Default: "=== 9. HEIKEN ASHI FILTER ==="): Visual header for smoothed Heiken Ashi candle direction filtering.
- Use_HeikenAshi_Filter (Default: false): Enables filtering requiring a bullish Heiken Ashi candle (HA Close > HA Open) for Buy and bearish (HA Close < HA Open) for Sell.
Section 14: Filter 10 - CCI Trend Filter
- InpFilter10 (Default: "=== 10. CCI TREND FILTER ==="): Visual header for Commodity Channel Index zero-line filtering.
- Use_CCI_Filter (Default: false): Enables filtering requiring CCI to be above 0.0 for Buy and below 0.0 for Sell.
- CCI_Period (Default: 50): Lookback period in bars for the CCI trend calculation.
- CCI_Applied (Default: PRICE_CLOSE): Applied price source for the CCI trend filter.
Section 15: Filter 11 - CCI Overbought and Oversold Filter
- InpFilter11 (Default: "=== 11. CCI OB & OS FILTER ==="): Visual header for CCI extreme threshold filtering.
- Use_CCI_OBOS_Filter (Default: false): Enables momentum breakout filtering using upper and lower CCI levels.
- CCI_OBOS_Period (Default: 14): Calculation period in bars for the CCI OB/OS oscillator.
- CCI_OBOS_Applied (Default: PRICE_CLOSE): Applied price series for the CCI OB/OS filter.
- CCI_Overbought (Default: 100.0): Upper CCI level threshold used in signal validation.
- CCI_Oversold (Default: -100.0): Lower CCI level threshold used in signal validation.
Section 16: Filter 12 - Relative Vigor Index (RVI) Filters
- InpFilter12 (Default: "=== 12. RVI FILTERS ==="): Visual header for RVI zero-line and signal-line filters.
- Use_RVI_Filter (Default: false): Enables filtering requiring the main RVI line to be above 0.0 for Buy and below 0.0 for Sell.
- RVI_Period (Default: 75): Calculation period in bars for the main RVI trend filter.
- Use_RVI_Signal_Filter (Default: false): Enables filtering requiring the RVI main line to be above the RVI signal line for Buy and below for Sell.
- RVI_Signal_Period (Default: 20): Calculation period in bars for the RVI signal crossover filter.
Section 17: Filter 13 - MACD Histogram and Zero-Line Filters
- InpFilter13 (Default: "=== 13. MACD FILTERS ==="): Visual header for Moving Average Convergence Divergence filters.
- Use_MACD_Filter (Default: false): Enables filtering based on MACD histogram polarity (Main > Signal for Buy, Main < Signal for Sell).
- MACD_FastEMA (Default: 12): Fast Exponential Moving Average period in bars.
- MACD_SlowEMA (Default: 26): Slow Exponential Moving Average period in bars.
- MACD_SignalSMA (Default: 9): Signal line Simple Moving Average period in bars.
- MACD_Applied (Default: PRICE_CLOSE): Applied price source for MACD calculation.
- Use_MACD_Zero_Filter (Default: false): Enables filtering requiring the MACD main line to be above 0.0 for Buy and below 0.0 for Sell.
Section 18: Filter 14 - Support, Resistance, and Fibonacci Filters
- InpFilter14 (Default: "=== 14. SR & FIBONACCI FILTERS ==="): Visual header for price structure and swing retracement filters.
- Use_SR_Filter (Default: false): Enables proximity filtering requiring Buy signals to occur near recent support lows and Sell signals near recent resistance highs.
- SR_Period (Default: 50): Lookback window in bars used to identify local support and resistance extremes.
- SR_Zone_Points (Default: 80): Tolerance zone width measured in broker points around detected support or resistance levels.
- Use_Fib_Filter (Default: false): Enables filtering requiring price to interact with a Fibonacci retracement zone derived from recent ZigZag swings.
- Fib_Level_1 (Default: 0.382): First Fibonacci retracement ratio boundary (38.2%).
- Fib_Level_2 (Default: 0.618): Second Fibonacci retracement ratio boundary (61.8%).
- ZigZag_Depth (Default: 12): Minimum number of bars required between swing highs and lows for ZigZag detection.
- ZigZag_Deviation (Default: 5): Minimum price deviation in points required to form a new ZigZag swing point.
- ZigZag_Backstep (Default: 3): Minimum bar separation between consecutive local swing extremes.
Section 19: Filter 15 - Supertrend Filter
- InpFilter15 (Default: "=== 15. SUPERTREND FILTER ==="): Visual header for the Wilder ATR-based Supertrend direction filter.
- Use_Supertrend_Filter (Default: false): Enables trend direction filtering requiring Supertrend to be in an uptrend for Buy and a downtrend for Sell.
- ST_AtrPeriod (Default: 10): ATR lookback length in bars used in the Supertrend volatility band calculation.
- ST_Factor (Default: 3.0): Volatility multiplier applied to the ATR bands in the Supertrend calculation.
7. Risk Disclaimer
Trading foreign exchange, commodities, indices, and other financial instruments carries a high level of risk and may not be suitable for all investors. Past performance, historical signal behavior, or backtesting results do not guarantee future performance. This software is a technical analysis and charting tool intended solely to assist traders in evaluating market conditions; it does not constitute financial advice and does not guarantee trading profits. Always test the indicator thoroughly on a MetaTrader demo account to understand its operational behavior and parameter sensitivity before applying it to live market analysis.
