OPEN-SOURCE SCRIPT

RSI MACD Combined Color Strategy

Overview
This indicator combines RSI and MACD signals to create a powerful visual trading system, inspired by TrendSpider's AI Strategy Coder examples. It colors candles based on the alignment of three key technical conditions, providing clear visual signals for potential trend strength and direction.
Technical Components
Core Conditions

RSI (Relative Strength Index) > 50

Indicates bullish momentum when price is trading above the centerline
Traditional indicator of trend strength


MACD Line > Signal Line

Shows positive momentum
Classic signal for potential upward movement


MACD Line > 0

Confirms bullish territory
Indicates overall positive momentum



Color Coding System

🟢 Green Candles: All three conditions are met

Strongest bullish signal
Suggests high probability trading opportunities


⚪ Grey Candles: One or two conditions are met

Neutral or transitioning market
Suggests caution or waiting for stronger confirmation


🔴 Red Candles: No conditions are met

Bearish signal
Suggests potential downward pressure



How to Use This Indicator
For Entry Signals

Look for transitions from red or grey to green candles
Green candles suggest strong bullish alignment
Consider entering long positions when candles turn green

For Exit Signals

Watch for color transitions from green to grey or red
Consider taking profits when candles change from green to grey
Consider stop losses when candles turn red

Risk Management

Use color transitions as part of your broader strategy
Don't rely solely on color changes for trading decisions
Combine with other technical analysis tools and risk management practices

Customizable Parameters

RSI Length (default: 14)
MACD Fast Length (default: 12)
MACD Slow Length (default: 26)
MACD Signal Length (default: 9)

Best Practices

Use multiple timeframes for confirmation
Look for confluences with support/resistance levels
Consider volume and market context
Start with default settings and adjust based on your trading style
Backtest different parameter combinations

Notes

This indicator works best in trending markets
Grey candles can indicate transition periods
Consider market conditions and volatility when interpreting signals

Credits
Inspired by TrendSpider's AI Strategy Coder examples and adapted for TradingView using Pine Script v5.
Disclaimer
This technical indicator is for informational purposes only. Always conduct your own analysis and consider risk management principles before making trading decisions. Past performance does not guarantee future results.
Candlestick AnalysisMoving Average Convergence / Divergence (MACD)Relative Strength Index (RSI)

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal