OPEN-SOURCE SCRIPT

Multi-Method Candle Repainter by Mustang Algo

49
# 🎯 Candle Repainter - Price Direction by Mustang Algo

## Overview
A powerful and intuitive indicator that repaints candles in real-time based on price direction detection. This tool helps traders quickly identify market trends by coloring candles according to bullish, bearish, or neutral momentum using multiple proven technical analysis methods.

## 🌟 Key Features

### 5 Detection Methods
Choose from multiple sophisticated algorithms to detect price direction:

1. **EMA Trend** - Compares price against Exponential Moving Average with momentum confirmation (price above EMA + upward movement)
2. **Price vs SMA** - Classic crossover method using Simple Moving Average (price position relative to SMA)
3. **Momentum** - Pure momentum-based detection for aggressive signals (rate of price change)
4. **Higher High/Lower Low** - Structure-based analysis identifying swing points and price patterns
5. **Supertrend** - Popular ATR-based trend following system for reliable trend identification

### Visual Features
- 🟢 **Green Candles** - Bullish trend detected
- 🔴 **Red Candles** - Bearish trend detected
- ⚪ **Gray Candles** - Neutral/indecisive market
- 🔺 **Triangle Signals** - Mark trend changes (optional, clean by default)
- 📊 **Background Coloring** - Subtle background highlighting for zones
- 📈 **Overlay Indicators** - Display the chosen MA/Supertrend line for reference

### Smart Signal System
- **Default Mode**: Shows triangles ONLY on trend changes (cleaner charts, less noise)
- **All Candles Mode**: Display signals on every bullish/bearish candle (more aggressive)
- Fully customizable signal visibility
- Real-time statistics dashboard

## ⚙️ Customizable Parameters

### Method-Specific Settings
- **EMA Length** (default: 20) - For EMA Trend method - adjust based on your timeframe
- **SMA Length** (default: 50) - For Price vs SMA method - classic period for trend detection
- **Momentum Period** (default: 14) - For Momentum method - sensitivity control
- **HH/LL Lookback** (default: 10) - For Higher High/Lower Low method - swing detection range
- **ATR Period** (default: 10) - For Supertrend method - volatility measurement period
- **ATR Multiplier** (default: 3.0) - For Supertrend method - trend sensitivity control

### Visual Controls
- Toggle signal display on/off
- Choose between change signals or all candles
- Background highlighting control
- Clean, minimalist interface

## 📊 Real-Time Dashboard
A compact information table displays:
- Current trend direction (BULLISH 🔼 / BEARISH 🔽 / NEUTRAL ➡️)
- Active detection method
- Creator credit (Mustang Algo)
- Real-time status updates

## 🔔 Built-in Alerts
Set up automated alerts for:
- Bullish trend changes - "Switch to BULLISH trend"
- Bearish trend changes - "Switch to BEARISH trend"
- Get notified on any device when market direction changes

## 💡 How to Use

### For Day Traders
- Use **EMA Trend** with shorter periods (10-20)
- Enable "Show on all candles" for continuous feedback
- Combine with volume for confirmation
- Best on 5m-15m timeframes

### For Swing Traders
- Use **Supertrend** or **Price vs SMA** with longer periods (50-200)
- Keep default "changes only" mode for cleaner entries
- Perfect for multi-timeframe analysis
- Best on 1H-4H-Daily timeframes

### For Scalpers
- Use **Momentum** method for fastest signals
- Lower timeframes (1m-5m)
- Combine with support/resistance levels
- Quick entries on trend changes

### For Position Traders
- Use **Higher High/Lower Low** on higher timeframes
- Weekly or Daily charts
- Focus on structural changes in the market

## 🎨 Best Practices

1. **Multiple Timeframes**: Always confirm direction on a higher timeframe before entering
2. **Combine Methods**: Test different detection methods for your specific asset and timeframe
3. **Risk Management**: Always use stop-losses - don't rely solely on color changes
4. **Backtesting**: Test parameters on historical data before live trading
5. **Context Matters**: Use with support/resistance, volume, and market structure
6. **No Holy Grail**: This is a tool to assist your analysis, not a standalone trading system

## ⚠️ Important Notes

- This is a **repainting indicator** - signals may adjust as new price data arrives (by design for real-time trend following)
- Best used for **trend confirmation and direction bias**, not as standalone entry/exit signals
- Different methods work better in different market conditions (trending vs ranging)
- Always combine with proper risk management and position sizing
- No indicator is perfect - false signals can occur, especially in choppy/ranging markets

## 📈 Recommended Settings by Market

### Crypto (High Volatility)
- Method: **Supertrend**
- ATR Period: 10
- ATR Multiplier: 3.0
- Timeframe: 15m - 4H
- Works well in trending crypto markets

### Forex (Trending Markets)
- Method: **EMA Trend** or **Price vs SMA**
- Period: 20-50
- Timeframe: 1H - Daily
- Excellent for major pairs

### Stocks (Moderate Volatility)
- Method: **Higher High/Lower Low**
- Lookback: 10-15
- Timeframe: Daily - Weekly
- Great for swing trading stocks

### Indices (Clear Trends)
- Method: **Price vs SMA**
- SMA Length: 50-200
- Timeframe: 4H - Daily
- Classic trend following on indices

### Commodities
- Method: **Supertrend**
- ATR Period: 10-14
- Timeframe: 1H - Daily
- Adapts well to commodity volatility

## 🚀 Quick Start Guide

1. Add indicator to your chart
2. Select your preferred detection method from the dropdown
3. Adjust parameters based on your timeframe and market
4. Observe candle colors for trend direction
5. Look for triangle signals on trend changes
6. Set up alerts for automated notifications
7. Combine with your existing trading strategy

## 🔧 Advanced Tips

- **Combining with other indicators**: Works great with RSI, MACD, or volume indicators
- **Filter false signals**: Use on higher timeframe to filter lower timeframe noise
- **Trend confirmation**: Wait for 2-3 consecutive colored candles before entry
- **Exit strategy**: Consider exiting when candle color changes or use fixed targets
- **Avoid ranging markets**: This indicator performs best in trending conditions

## 📚 Educational Value

This indicator teaches:
- How different technical methods identify trends
- The concept of trend following vs momentum trading
- The importance of trend direction in trading decisions
- How to combine multiple timeframes for better analysis

## 🏆 Credits

**Created by Mustang Algo**
Version 1.0 - November 2025

For the trader who values simplicity, clarity, and effective trend detection.

## 📞 Support & Feedback

If you find this indicator useful:
- Leave a comment with your feedback
- Share your results and optimal settings
- Suggest improvements or additional features
- Report any bugs or issues

---

## Tags
`trend` `candles` `repainter` `moving-average` `supertrend` `momentum` `signals` `alerts` `price-action` `trend-following` `daytrading` `swingtrading` `multi-method` `beginner-friendly`

## Category
**Trend Analysis / Candles**

## License
Open source - Free to use and modify for personal trading

---

*Remember: Trading involves risk. Always use proper risk management and never risk more than you can afford to lose. This indicator is a tool to assist your analysis, not financial advice.*

Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.