OPEN-SOURCE SCRIPT
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.
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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
🐐 Algoat.TV — Read Any Asset in 10 Seconds
Three indicators. Three roles. One complete system.
Free trial, all included , no paywall → Algoat.tv
Community → reddit.com/r/AlgoatTV/
Three indicators. Three roles. One complete system.
Free trial, all included , no paywall → Algoat.tv
Community → reddit.com/r/AlgoatTV/
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
🐐 Algoat.TV — Read Any Asset in 10 Seconds
Three indicators. Three roles. One complete system.
Free trial, all included , no paywall → Algoat.tv
Community → reddit.com/r/AlgoatTV/
Three indicators. Three roles. One complete system.
Free trial, all included , no paywall → Algoat.tv
Community → reddit.com/r/AlgoatTV/
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.