OPEN-SOURCE SCRIPT
XAUUSD 15m - 200 EMA (1h) + UT Bot + ADX Strategy

The Strategy Breakdown
1. The Trend Filter (1-Hour 200 EMA)
The Rule: You only look for Buy signals on the 15-minute chart if the current price on the 1-hour chart is trading above its 200 EMA.
Purpose: This keeps you trading in the direction of the macro trend, preventing you from buying into a heavy 1-hour downtrend. Note: Since the 1-hour chart isn't pictured, you must manually confirm this bias before looking at the 15-minute triggers.
2. The Trigger (UT Bot Alerts)
The Rule: Wait for a green "Buy" label to print on the 15-minute candlestick chart.
Setting Check: Your chart shows UT Bot Alerts (2, 1). This is a very sensitive setting, meaning it will react quickly to price changes but will also generate a lot of noise (false signals) during choppy, sideways markets.
3. The Momentum Filter (ADX)
The Rule: At the exact moment the UT Bot "Buy" signal prints, the ADX (Average Directional Index) line must be above 25.
Purpose: ADX measures trend strength, regardless of direction.
ADX > 25: Indicates a strong, active trend.
ADX < 25: Indicates a weak, ranging, or sideways market. Because UT Bot is a trend-following indicator, it fails miserably in ranges. Filtering out entries when ADX is below 25 is crucial.
1. The Trend Filter (1-Hour 200 EMA)
The Rule: You only look for Buy signals on the 15-minute chart if the current price on the 1-hour chart is trading above its 200 EMA.
Purpose: This keeps you trading in the direction of the macro trend, preventing you from buying into a heavy 1-hour downtrend. Note: Since the 1-hour chart isn't pictured, you must manually confirm this bias before looking at the 15-minute triggers.
2. The Trigger (UT Bot Alerts)
The Rule: Wait for a green "Buy" label to print on the 15-minute candlestick chart.
Setting Check: Your chart shows UT Bot Alerts (2, 1). This is a very sensitive setting, meaning it will react quickly to price changes but will also generate a lot of noise (false signals) during choppy, sideways markets.
3. The Momentum Filter (ADX)
The Rule: At the exact moment the UT Bot "Buy" signal prints, the ADX (Average Directional Index) line must be above 25.
Purpose: ADX measures trend strength, regardless of direction.
ADX > 25: Indicates a strong, active trend.
ADX < 25: Indicates a weak, ranging, or sideways market. Because UT Bot is a trend-following indicator, it fails miserably in ranges. Filtering out entries when ADX is below 25 is crucial.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.