Goldilocks and the Three Bears - [Algoat_Alpha]Goldilocks and the Three Bears is a multi-layer confluence indicator that identifies
when three independent technical dimensions — trend, momentum, and direction — all
align in the same direction. Inspired by the classic fairy tale, it waits for
conditions that are "just right" before signaling.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW IT WORKS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The indicator evaluates three independent layers on every bar:
Papa (Trend) — A Moving Average (SMA or EMA) establishes the macro trend.
Price above the MA = bullish trend. Price below = bearish trend. This is the
slowest-moving component and acts as the structural filter.
Mama (Momentum) — The Relative Strength Index measures whether buying or selling
pressure dominates. RSI above the midline (default 50) = bullish momentum.
Below = bearish momentum. This prevents entries against exhausted moves.
Baby (Direction) — The MACD-Signal crossover captures the fastest directional
shift. MACD above its signal line = bullish direction. Below = bearish direction.
This is the trigger layer.
A signal fires only when ALL THREE flip into alignment simultaneously — the exact
bar where the last component joins the other two. This transition-based logic
prevents redundant signals during sustained trends.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHY CONFLUENCE MATTERS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Each indicator alone produces frequent false signals:
• MA alone triggers late in ranges
• RSI alone triggers too early in trends
• MACD alone whipsaws in choppy markets
By requiring all three to agree, the indicator filters out noise that any single
layer would miss. The three layers operate on different mathematical principles
(price vs. average, momentum oscillator, moving average convergence/divergence),
so their agreement represents genuine multi-dimensional confluence — not just the
same signal measured three times.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Add the indicator to your chart. The dashboard shows the real-time state of
all three layers.
2. When all three show "Bull" → Goldilocks Zone (bullish). A 🐂 label appears
on the chart at the entry bar.
3. When all three show "Bear" → Goldilocks Zone (bearish). A 🐻 label appears.
4. "Still Cooking" means the layers are mixed — no directional consensus yet.
Hover over any signal label for a detailed tooltip showing the exact values
of all three components at the time of the signal.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
FEATURES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• Auto light/dark theme detection — dashboard adapts to your chart background
• Discord-ready webhook alerts — alert messages are formatted as Discord embed
JSON, ready to pipe directly into a webhook channel
• Pine Screener compatible — includes Signal State, individual component states,
and a Bull Count (0-3) for flexible scanner filtering
• Minimal chart footprint — only the MA line and signal labels are drawn;
bar coloring is off by default
• Fully configurable — all indicator lengths, thresholds, dashboard position
and size are adjustable in settings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ALERTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Three alert conditions are available:
• 3 Bulls Aligned (Long Entry)
• 3 Bears Aligned (Short Entry)
• Full Confluence (Any Direction)
All alert messages include ticker, timeframe, price, and component status.
Messages are pre-formatted as Discord webhook JSON — just paste your webhook
URL in TradingView's alert notification settings.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PINE SCREENER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Scanner columns exported:
• Signal State → 1 (bullish), -1 (bearish), 0 (no confluence)
• Papa Bull / Mama Bull / Baby Bull → individual component states (1 or 0)
• Bull Count → number of bullish layers (0 to 3), useful for "almost there" scans
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This indicator does not repaint and does not use request.security().
All calculations are performed on the current chart's timeframe.
Open source under MPL 2.0.
Stay Liquid.
Indicatore Pine Script®






















