OPEN-SOURCE SCRIPT
已更新

Favorable Algo [Favorable Investors]

1 843
SPY 快照🎯 FAVORABLE ALGO V21.2 — by Favorable Investors

A serious HTF Supply/Demand ARM-and-TRIGGER engine with a closed-loop AI Adaptive Auto-Tuner that self-optimizes settings from live performance. No hype. No repainting tricks. No black box. Just real institutional-style logic, exposed and tunable.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 WHAT IT ACTUALLY DOES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

1. Maps real HTF Supply & Demand zones (Daily / 4H / 1H / current TF) using Order-Block detection — the last opposing candle before the impulse, wick + body included.

2. When price taps a zone, the engine ARMS that side (long or short) and watches LTF for a valid trigger:
• Reversal/rejection candle
• 5-pillar confluence stack
• Oscillator extreme turn
• HTF SuperTrend alignment

3. First valid trigger fires a 🟢 BUY or 🔴 SELL signal with full TP1 / TP2 / TP3 + SL.

4. ARMED state auto-expires intelligently:
• Window timeout
• Break-of-Structure through far face of zone
• Run-away (price moved away too far, you missed the entry)
• Regime flip (opposite zone tapped)
• Opposite side fires

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🤖 AI ADAPTIVE AUTO-TUNER (NEW)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Closed-loop, every N bars (default 100), reads:
• Rolling Win Rate (last 50 trades)
• Profit Factor
• Sharpe Ratio
• ATR ratio (volatility regime)
• Discrete regime score (-2 to +2)

Then mutates EFFECTIVE TP / SL / Confluence / ARM Window / Proximity — never touching your raw inputs.

Decision logic:
❄️ FROZEN — WR ≥ freeze threshold + Sharpe ≥ 1.0 → no changes (don't break what works)
🛡️ DEFENSIVE — Sharpe < 0 or WR < 50% → tighten everything
⚠️ MILD TIGHT — WR < 60% or PF < 1.5 → +1 conf, smaller TP1
💎 OPPORTUNIST — WR ≥ 75% + idle market → loosen for more signals
🚀 TP3 RUN — strong regime + WR ≥ 70% → push TP3 farther
📈 VOL SCALE — high vol → wider TP/SL, low vol → tighter

Anti-oscillation built in: bounded clamps, hard min-interval, single-step deltas, frozen-when-winning logic.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 FOUR WIN-RATE PROFILES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

• 🎯 Sniper — 5/5 confluence, tight TP, exit-at-TP1 (~85-90% WR target)
• ⚖️ Balanced — 4/5 confluence, medium TP (~70-80% WR target)
• 🔥 Aggressive — 3/5 confluence, larger TP, more signals
• ⚙️ Custom — full manual control

PLUS a 🔓 Manual Override Layer that lets you dial TP / SL / Conf / Proximity from inside ANY profile without leaving Sniper or Balanced or Aggressive.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧪 WALK-FORWARD AI
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Tracks Sniper / Balanced / Aggressive in parallel as virtual profiles and surfaces the best one by Sharpe / Win Rate / Profit Factor — so you can see in real time which profile this asset actually prefers.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 DASHBOARD (real signal, no clutter)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

• Live ARM/TRIGGER status + countdown
• In-trade P&L, TP1/2/3 progress, trailing SL
• Rolling WR · PF · Sharpe · streak
• Walk-Forward profile leaderboard
• 🤖 Tuner status: ACTIVE / FROZEN / WAITING + next-update countdown
• Live effective TP/SL/Conf values being used right now
• ADX, RSI, regime, HTF zones counter

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 ALERTS (full coverage)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

• ARMED LONG / SHORT
• ARM EXPIRE (timeout/BOS/runaway/flip)
• BUY / SELL fire
• TP1 / TP2 / TP3 hit
• Trade Exit
• Price At HTF Demand / Supply
• AI Regime Changed
• 🤖 Tuner Adjusted Parameters
• ❄️ Tuner Frozen

All alert messages are webhook-ready for automation (BloFin, MT5 bridges, Discord webhooks, etc).

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎨 PREMIUM VISUALS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

• 4 themes — Neon Teal / Midnight Fire / Arctic Aurora / Ruby
• HTF zones extend right (50-bar projection, configurable)
• Armed zones glow + 🎯 ARMED label
• Bar coloring during trades
• Optional EMA ribbon
• Clean trade markers + W/L tags

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛠️ WHO IT'S FOR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Active discretionary and semi-quant traders who want institutional-style HTF S/D logic in code, with the option to either trust the AI tuner or fully manual-tune. Built by a real retail trader running this live in crypto + futures + equities.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ HONEST DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This is an indicator, not financial advice. Past performance never guarantees future results. The AI tuner reduces parameter-tuning friction, it does not eliminate market risk. Always size positions for the worst-case, not the dashboard.

Built by Derek Medina · Favorable Investors
發行說明
🧬 FAVORABLE ALGO V21.7 — PATCH NOTES
═══════════════════════════════════════════════

What's new since V21.6:

🛡 We hardened the TP1 floor. It will never fall below 0.40% again — no matter the asset, mode, or volatility regime. That bug where PYPL was hitting 0.25% TP1 and AMZN was hitting 0.21%? Dead. Squashed at the source.

🧪 The EMAs are no longer one-size-fits-all. The algo now reads each asset's DNA class and swaps in a different EMA preset on the fly. Trender stocks get faster EMAs to catch impulse moves. Choppers and sleepers get slower EMAs to filter out the noise. Same indicator — completely different reaction speed depending on what you throw at it.

🎚 The confluence floor is now self-correcting. If an asset is bleeding PF and win rate, the algo automatically tightens its entry filter. If an asset is printing money, it loosens up to take more setups. You don't tune it — it tunes itself, per ticker, per closed trade.

🌡 Take-profit targets now flex with volatility. When ATR is dead, TP shrinks so we're not begging price to come to us. When ATR expands, TP stretches to capture the move. Always above the 0.40% floor — but it finally breathes with the regime.

💀 SLEEPER auto-suppress is live. If an asset's DNA flags it as a sleeper AND its profit factor is under 1.0 with enough trades to confirm — the algo refuses to take new entries on it. This is the AMZN-style death spiral killer. It just stops trading the asset until DNA reclassifies or PF recovers.

🎯 Realized risk/reward feedback. The algo tracks your actual average win vs average loss. If your wins are tiny compared to your losses, it widens TP1 to give them room. If your wins are massive, it expands TP3 to let them run further. It's adapting to YOUR realized performance — not theoretical targets.

🔬 Asset Memory is the big one. When an asset hits PF ≥ 2.0 and WR ≥ 70%, the algo SNAPSHOTS its current calibration — TP levels, SL multiplier, confluence floor, ARM window — all of it. If performance later degrades, it REVERTS to that known-good snapshot. Per asset. So once it figures out what works on MU, it locks that in. If the regime breaks, it falls back instead of bleeding.

📊 Dashboard got 6 new rows so you can see every adaptive layer at a glance — adaptive EMA preset, CF auto-tune status, vol-regime bucket, sleeper lock state, realized RR ratio, and asset memory snapshots.

🔔 5 new alerts so you know exactly when each adaptive layer fires.

🧠 The core idea: V21.6 adapted on one timescale. V21.7 adapts on FOUR. Every bar (vol regime). Every closed trade (CF auto-tune, memory, realized RR). Every DNA reclassification (EMA preset). Every hostile regime detection (sleeper lock). Same algo — but it now behaves like a different indicator depending on which ticker you load it on. Caps drawdown on hostile assets, compounds on favorable ones, automatically.

✅ Everything from V21.6 is fully preserved. Zone polarity, re-arm, reaction relax, wrong-side veto — all intact. Only upgrades. Nothing removed. Per the rule.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。