OPEN-SOURCE SCRIPT
Trend Analyzer v0.6

Trend Analyzer EMA Only v0.6
Simple yet powerful EMA trend analysis with multi-timeframe support!
Overview:
This comprehensive indicator focuses on EMA-based trend analysis with clean visual presentation. It provides clear BUY/SELL signals, trend tracking with unique IDs, peak detection, and multi-timeframe analysis across M15, M30, and H1 timeframes.
Key Features:
✅ EMA Trend Analysis - Fast and Slow EMA crossover signals
✅ Trend Tracking - Unique trend IDs with start/end markers
✅ Peak Detection - Automatic peak identification during trends
✅ Multi-Timeframe - Analysis across M15, M30, and H1 timeframes
✅ Visual Clarity - Dotted lines connecting labels to candles
✅ Statistics - BUY/SELL count and average trend length
How It Works:
The indicator calculates signal strength using weighted analysis:
• MACD (50%) - Primary trend momentum
• RSI (30%) - Overbought/oversold conditions
• Volume (20%) - Volume confirmation
Signal Logic:
• BUY - Fast EMA crosses above Slow EMA + both slopes positive
• SELL - Fast EMA crosses below Slow EMA + both slopes negative
• NEUTRAL - EMAs too close (below threshold)
Visual Elements:
• 🟢 BUY - Green label with trend ID
• 🔴 SELL - Red label with trend ID
• ⚪ NEUTRAL - Gray label with trend ID
• 🟡 PEAK - Yellow label marking trend extremes
• ⚫ END - Gray label marking trend end
Information Table:
Real-time display showing:
• Current Timeframe trend state
• Multi-Timeframe analysis (M15, M30, H1)
• PEAK Labels status
• Offset Type configuration
• Trend Strength percentage
• Statistics (BUY/SELL count, average trend length)
Settings:
• Fast EMA Length - 9 (default)
• Slow EMA Length - 21 (default)
• Min Trend Bars - 3 (filters short trends)
• Label Offset Type - ATR, % of price, or Dynamic
• Show PEAK Labels - On/Off toggle
Best Practices:
🎯 Works best in trending markets
📊 Use as overlay on main chart
⚡ Combine with price action analysis
🛡️ Always use proper risk management
Pro Tips:
• Green background = Strong uptrend, Red background = Strong downtrend
• Watch for trend change arrows for early reversal signals
• Use the information table for quick market assessment
• Monitor trend statistics for market behavior insights
Alerts:
• BUY Alert - "BUY signal detected"
• SELL Alert - "SELL signal detected"
Version 0.6 Improvements:
• Optimized performance
• Enhanced visual clarity
• Improved multi-timeframe analysis
• Refined trend detection algorithms
Created with ❤️ for the trading community
This indicator is free to use for both commercial and non-commercial purposes.
Simple yet powerful EMA trend analysis with multi-timeframe support!
Overview:
This comprehensive indicator focuses on EMA-based trend analysis with clean visual presentation. It provides clear BUY/SELL signals, trend tracking with unique IDs, peak detection, and multi-timeframe analysis across M15, M30, and H1 timeframes.
Key Features:
✅ EMA Trend Analysis - Fast and Slow EMA crossover signals
✅ Trend Tracking - Unique trend IDs with start/end markers
✅ Peak Detection - Automatic peak identification during trends
✅ Multi-Timeframe - Analysis across M15, M30, and H1 timeframes
✅ Visual Clarity - Dotted lines connecting labels to candles
✅ Statistics - BUY/SELL count and average trend length
How It Works:
The indicator calculates signal strength using weighted analysis:
• MACD (50%) - Primary trend momentum
• RSI (30%) - Overbought/oversold conditions
• Volume (20%) - Volume confirmation
Signal Logic:
• BUY - Fast EMA crosses above Slow EMA + both slopes positive
• SELL - Fast EMA crosses below Slow EMA + both slopes negative
• NEUTRAL - EMAs too close (below threshold)
Visual Elements:
• 🟢 BUY - Green label with trend ID
• 🔴 SELL - Red label with trend ID
• ⚪ NEUTRAL - Gray label with trend ID
• 🟡 PEAK - Yellow label marking trend extremes
• ⚫ END - Gray label marking trend end
Information Table:
Real-time display showing:
• Current Timeframe trend state
• Multi-Timeframe analysis (M15, M30, H1)
• PEAK Labels status
• Offset Type configuration
• Trend Strength percentage
• Statistics (BUY/SELL count, average trend length)
Settings:
• Fast EMA Length - 9 (default)
• Slow EMA Length - 21 (default)
• Min Trend Bars - 3 (filters short trends)
• Label Offset Type - ATR, % of price, or Dynamic
• Show PEAK Labels - On/Off toggle
Best Practices:
🎯 Works best in trending markets
📊 Use as overlay on main chart
⚡ Combine with price action analysis
🛡️ Always use proper risk management
Pro Tips:
• Green background = Strong uptrend, Red background = Strong downtrend
• Watch for trend change arrows for early reversal signals
• Use the information table for quick market assessment
• Monitor trend statistics for market behavior insights
Alerts:
• BUY Alert - "BUY signal detected"
• SELL Alert - "SELL signal detected"
Version 0.6 Improvements:
• Optimized performance
• Enhanced visual clarity
• Improved multi-timeframe analysis
• Refined trend detection algorithms
Created with ❤️ for the trading community
This indicator is free to use for both commercial and non-commercial purposes.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน