PROTECTED SOURCE SCRIPT
Updated

Traffic Lights - BETA ZONES

2 348
Traffic Lights - BETA ZONES
Overview
The Traffic Light indicator is a simple, visual tool designed to help traders gauge market bias, trend strength, and momentum at a glance. It displays three rows of colored dots (like a traffic light) in a separate pane below your chart:
• Green: Bullish signal (go/buy bias).
• Red: Bearish signal (stop/sell bias).
• Orange: Neutral or caution (mixed/uncertain conditions).
This indicator combines price action (via EMA positioning), trend direction (via RSI), and momentum expansion (via RSI + MACD histogram) to provide a layered view of the market. When all three rows align as green or red, it generates Buy or Sell labels on the main chart for potential entry signals.
It's non-repainting in its core logic (Row 2 uses delayed RSI comparison to avoid noise), making it reliable for live trading. Best used on trending markets like forex, stocks, or crypto on timeframes from 15M to Daily.
How It Works
The indicator evaluates three independent "rows" of conditions, each represented by a colored dot:
1. Row 1: Price Action Signal (EMA Touch) This row assesses the overall trend bias based on price's position relative to a slow EMA (default: 50-period).
o Green: Price is cleanly above the EMA (bullish bias).
o Red: Price is cleanly below the EMA (bearish bias).
o Orange: Price is "touching" or within a volatility buffer around the EMA (neutral/caution). The "touch zone" is defined by ATR padding, which can be toggled off for a stricter (green/red only) mode.
2. Row 2: Buyers/Sellers Trend (RSI) This row tracks the underlying trend of buyer/seller strength using RSI (default: 14-period on close). To reduce noise and repainting, it uses a delayed comparison (RSI[1] vs. RSI[2]):
o Green: RSI is rising (buyers gaining strength).
o Red: RSI is falling (sellers gaining strength). No orange here—it's purely directional.
3. Row 3: Buyers/Sellers Signal (RSI + MACD Histogram) This row focuses on momentum expansion, requiring alignment across RSI zones and MACD histogram:
o Green: RSI > 50 (bull zone), MACD hist > 0 (positive), and histogram is expanding upward.
o Red: RSI < 50 (bear zone), MACD hist < 0 (negative), and histogram is expanding downward.
o Orange: Any mismatch (e.g., pullbacks, consolidations, or weak momentum). MACD defaults: Fast=12, Slow=26, Signal=9.
Signals
• Buy Signal: Triggers a "Buy" label below the bar when all three rows turn green for the first time (crossover from non-aligned).
• Sell Signal: Triggers a "Sell" label above the bar when all three rows turn red for the first time. These are conservative signals—use them for trend confirmation or entries in alignment with your strategy. They don't repaint once fired.
Inputs & Customization
All inputs are grouped for easy tweaking:
• Row 1: Price Action Signal
o Slow EMA Length (default: 50): Adjusts the trend baseline.
o EMA Timeframe (default: empty/current): Use a higher timeframe (e.g., "240" for 4H) for multi-timeframe analysis.
o Enable Orange 'Touch' Zone (default: true): Toggle for strict (green/red only) vs. touch mode.
o ATR Length (default: 3): Volatility period for touch padding.
o Touch Padding (ATR mult, default: 0.15): Widens the orange buffer; set to 0 for wick-touch only.
• Row 2: Buyers/Sellers Trend (RSI)
o RSI Length (default: 14): Period for RSI calculation.
o RSI Source (default: close): Change to high/low/open for different sensitivities.
• Row 3: Buyers/Sellers Signal (RSI + MACD hist)
o MACD Fast/Slow/Signal Lengths (defaults: 12/26/9): Standard MACD settings.
Usage Tips
• Trend Trading: Wait for all-green for long entries or all-red for shorts. Use in conjunction with support/resistance.
• Scalping/Intraday: Enable orange touch zone for more nuance in choppy markets; disable for cleaner signals in trends.
• Multi-Timeframe: Set Row 1 EMA to a higher TF for "big picture" bias while keeping others on current.
• Risk Management: Always combine with stop-losses (e.g., below recent lows for buys). Backtest on your asset/timeframe.
• Limitations: In ranging markets, orange dots may dominate—pair with volatility filters like ADX. Not a standalone system; use as a confirmation tool.
If you have feedback or suggestions, drop a comment below! Happy trading 🚦

Release Notes
Visual Clarity & The Logic of Confluence
  • New Feature: Dynamic Background Fill
In this update, we have introduced a Background Fill feature for the oscillator pane.
• How it works: When all three traffic lights align (All Green or All Red), the background of the indicator panel will light up in the corresponding color.
• The Benefit: This allows you to identify high-confluence zones using your peripheral vision without needing to stare directly at the individual dots. The fill remains active as long as the trend conditions are perfectly met.
________________________________________
Why the RSI + MACD "Mashup"?
Traders often clutter their charts with multiple oscillators (RSI, MACD, Stochastic), trying to mentally align confirm entry signals. This often leads to "Analysis Paralysis."
The Traffic Lights system solves this by stripping away the noise (the squiggly lines) and focusing strictly on Consensus.
The Logic Behind the 3 Rows:
1. Row 1 (The Trend / EMA): Is price structurally bullish or bearish relative to the 50 EMA? This ensures we aren't trading against the dominant flow.
2. Row 2 (The Intent / RSI): Is the Relative Strength Index actually rising compared to previous candles? This detects the immediate shift in momentum before price fully commits.
3. Row 3 (The Power / MACD + RSI): This is the engine. We don't just look for a MACD cross (which can be late) or an RSI level (which can remain overbought for days). We demand that RSI is in favorable territory (>50) AND MACD Histogram is Positive AND Momentum is Expanding.
Why combine them?
RSI measures the speed of the move, while MACD measures the strength of the trend.
• RSI alone can give false reversals in strong trends.
• MACD alone can lag significantly.
• Combined: When both align with the structural trend (Row 1), the probability of a sustained move increases significantly.
Visual Simplicity
Instead of analyzing histogram bars, moving average crossovers, and oscillator levels manually for every candle, this indicator processes that data instantly.
• 3 Greens: Full Confluence (Trend + Momentum + Expansion).
• 3 Reds: Full Capitulation.
• Orange/Mixed: Indecision or Pullback (Stay out).
This system turns complex mathematical confluence into a simple visual binary: Stop or Go.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.