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.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.