OPEN-SOURCE SCRIPT
ที่อัปเดต:

Luxy BOSS MODE - Support & Resistance

10 866
BOSS MODE S/R is a comprehensive Support & Resistance system that detects, scores, and learns from every zone reaction — then automatically generates trade plans with entry, stop, target, and position size.

Unlike traditional S/R indicators that simply draw lines, BOSS MODE combines 6 detection engines, an adaptive scoring algorithm, a real-time momentum classifier powered by the Luxy Energy Index, and a Trade Plan Generator that calculates exact risk parameters based on your account.

── WHAT MAKES IT DIFFERENT ──

1. Adaptive Weight Scoring
Every zone is scored 0-100 based on 7 factors: volume at touch, higher-timeframe origin, confluence with other zones, freshness, touch count, regime alignment, and historical performance. After 20+ observed zone outcomes (first bounce or first break per zone), the system adjusts its scoring weights based on which factors correlated with bounces vs breaks on that specific chart and asset.

2. LEI-Powered Momentum Classifier
Uses the Luxy Energy Index (Extension + Velocity + Volume exhaustion model) to classify each approaching zone as likely BOUNCE or BREAK. LEI ≥ 70 = exhausted move arriving at zone = bounce expected. LEI ≤ 30 = energized move = break risk.

3. Trade Plan Generator
For qualifying setups (Grade A/B zone, regime-aligned, R:R above your minimum), the indicator auto-calculates:
  • Entry — just beyond zone boundary
  • Stop Loss — opposite side of zone + ATR buffer
  • Target — nearest zone in trade direction
  • Position Size — based on your account size and risk %
  • R:R ratio — only shows when above your minimum


4. Per-Zone Intelligence
Every zone tracks its own history: how many times it bounced vs broke, average bounce distance in ATR units, and hold rate. Labels show this inline: ⬆ SUPPORT 📐 82 5/7 +0.4ᴬ = score 82, held 5 of 7 tests, avg distance from zone mid at touch: 0.4 ATR.

สแนปชอต


── 6 DETECTION ENGINES ──

  • 📐 Swing Pivots — Classical swing highs/lows on current, Daily, and Weekly timeframes
  • 🧱 Order Blocks — Last candle before a strong impulsive move, confirmed by volume
  • 📊 Volume POC — Highest-volume price cluster over lookback period
  • 💨 Fair Value Gaps — 3-candle imbalances where price left unfilled ranges
  • 💧 Liquidity Pools — Equal high/low clusters where stops accumulate
  • ⚓ Anchored VWAP — Auto-anchors on gap+volume events (earnings, catalysts)


All 6 sources feed into the same unified zone object, allowing true confluence scoring across methodologies.

สแนปชอต


── REGIME-AWARE SCORING ──

The market regime (STRONG_BULL / WEAK_BULL / RANGE / WEAK_BEAR / STRONG_BEAR / SQUEEZE) drives the scoring bias. In a bullish regime, support zones receive a significant score bonus while resistance zones score lower — reflecting the statistical reality that zones aligned with the trend hold more reliably.

Regime is calculated from ADX + Bollinger Band Width + EMA slope, giving 5 states plus a Squeeze override when volatility compresses to the bottom 10% of the last 100 bars.


── VISUAL SYSTEM ──

Zones are rendered with a 4-layer heat-map system:
  • Atmospheric halo — fades beyond zone boundaries, scales with score
  • Main fill — neon color: cyan family for support, red/orange for resistance, intensity proportional to score
  • Hot core strip — brighter inner band at zone midpoint
  • Entry line — solid bright stripe at the price-contact edge (top for support, bottom for resistance)
  • Grade-A pulse ring — glowing outline when a high-conviction zone is within 1.5 ATR of price
  • Score bar — vertical progress bar to the right of each zone, height = score 0-100


Simple View: A separate layer draws just two clear boxes — nearest SUPPORT (green) and nearest RESISTANCE (red) — with text centered inside. Designed for traders who want instant visual clarity without analyzing all zones.

สแนปชอต


── TRADE PLAN GENERATOR ──

Configure in the 💰 Trade Plan settings group:
  • Account Size ($) — your total trading capital
  • Risk per Trade (%) — standard is 1.0% per trade
  • Min R:R to Show — only displays setups where the calculated reward exceeds this multiple of risk


When a qualifying setup is found, three dashed lines appear on the chart (blue = entry, red = stop, green = target) with a summary label showing direction, prices, share count, and R:R ratio. The Dashboard shows it in the 💰 Active Setup row. An alert fires with the full trade plan.

Important: The Trade Plan Generator identifies setups based on zone proximity and regime alignment. All trade decisions remain entirely the responsibility of the user. Past zone reactions do not guarantee future performance. Always apply your own analysis and risk management.

สแนปชอต


── DASHBOARD (14 rows) ──

The information panel shows in real-time:
  • Market Regime with color coding
  • Asset Class / Session (PRE/RTH/AH for stocks)
  • Active zones breakdown (0A/1B/3C format)
  • Nearest Resistance price, grade, ATR distance
  • Nearest Support price, grade, ATR distance
  • ATR% Rank (volatility context)
  • Active Warning (8 types, color-coded by severity)
  • Anchored VWAP value and anchor reason
  • Squeeze detector
  • Zone Hit Rate (historical bounce %)
  • Active Detection Sources
  • Scenario suggestion
  • Adaptive Weights status
  • Active Trade Plan (Entry / Stop / Target / Shares / R:R)


Every cell has a detailed tooltip explaining what the value means and how to use it.


── MULTI-ASSET SUPPORT ──

The asset engine auto-detects chart type and adjusts accordingly:
  • Stocks — ATR-based zones, session-aware (PRE/RTH/AH)
  • Stocks under $1 — percent-based zone widths (ATR is unreliable for extreme low-price securities)
  • Crypto — 24/7, percent bands, no session breaks
  • Forex — pip-based zone widths
  • Indices — volume-agnostic fallback
  • Futures — rollover-aware


สแนปชอต


── SETTINGS OVERVIEW ──

  • 🎯 Trading Mode — Scalp / Intraday / Swing (affects zone widths and sensitivity)
  • 🧭 Regime Classifier — ADX, BB, and EMA periods
  • 🎯 Zone Detection — Toggle each of the 6 engines independently
  • 📐 Swing Pivots — Left/right lookback bars and zone width
  • 🧱 Order Blocks — Lookback period, minimum move %, volume threshold
  • 📊 Volume POC — Lookback bars and histogram bins
  • 💨 Fair Value Gaps — Minimum gap size %
  • 💧 Liquidity Pools — Lookback and touch tolerance %
  • ⚓ Anchored VWAP — Auto-anchor thresholds and manual catalyst date
  • ⚖️ Scoring — Individual weight controls for all 7 scoring factors
  • 🌍 Asset-Class Adaptation — Override or force Sub-$5 mode
  • 🚨 Warnings — Toggle each of 8 warning types with ATR distance control
  • 🎨 Visual Settings — Top-N zones, adaptive hide, transparency, Simple View toggle
  • 📊 Dashboard — Position, size, show/hide
  • 💰 Trade Plan — Account size, risk %, minimum R:R
  • 🔔 Alerts — Standard or structured JSON for webhook automation



── ALERTS ──

8 alert types:
  • Any Warning (catch-all)
  • Sweep Imminent
  • Regime Shift near Grade-A zone
  • Trap Suspected (low-volume false breakout)
  • Zone Approach
  • Squeeze Detected
  • Trade Plan — LONG Setup
  • Trade Plan — SHORT Setup


Enable Structured JSON Alerts to receive webhook-ready payloads with full zone data, regime, warning type, and trade plan details.


── EXTERNAL LIBRARY ──

This script imports Luxy Energy Index (LEI) by OrenLuxy for the momentum classifier. LEI measures move exhaustion using Extension from VWAP, Velocity (5-bar rate of change), and Volume as a modifier.


── IMPORTANT NOTES ──

  • This indicator is for educational and analytical purposes only. It does not constitute financial advice.
  • Past zone performance (hit rate, average bounce) does not guarantee future results.
  • The Trade Plan Generator calculates position sizes mathematically based on user inputs — always verify sizing with your broker before placing orders.
  • Adaptive weights require 20+ observed bounce/break events to activate. On new charts, base weights are used.
  • The LEI library requires separate import — the indicator will prompt if not accessible.



── CREDITS ──

  • Luxy Energy Index (LEI) — OrenLuxy. Exhaustion methodology drawing on academic research by Campbell-Grossman-Wang (1993) on volume-return relationships, ATR normalization by J. Welles Wilder Jr., and standard VWAP methodology.
  • S/R concepts inspired by VSA (Volume Spread Analysis), SMC (Smart Money Concepts), and classical pivot point theory.


Past performance does not predict future results. This tool is for informational purposes only and does not constitute investment advice. Trading involves substantial risk of loss.

Release Note
UPDATES

New Features:
• Key Levels — Prior Day High/Low, Prior Week High/Low, and Premarket High/Low now register as zones (stocks/futures)
• Flip-Retest warning — alerts when price retests a zone that previously flipped from support to resistance (or vice versa), a classic continuation setup
• Real multi-source confluence — when two+ detectors (Swing, Order Block, POC, FVG, Liquidity, AVWAP, Key Level) agree on the same price AND same direction, they now merge into one zone with a real confluence score, instead of the second detection being silently dropped

Accuracy Improvements:
• Bounce/break judgment now waits a few bars after the touch (configurable) to measure the actual reaction, instead of judging on the same noisy bar as the touch
• Trade Plan target must now be a real, decent-quality zone (score ≥50) — no longer picks a throwaway zone as target
• Trade Plan alerts fire once per setup, not every single bar the setup stays valid
• Structural levels (Weekly/Daily swings, Key Levels) are now protected from being silently evicted out of memory just because they score low during a strong trend — a strong uptrend no longer erases all overhead resistance from tracking
• Regime-fit scoring softened for counter-trend zones, so resistance in a strong uptrend (or support in a strong downtrend) isn't automatically pushed to the bottom of the list

Bug Fixes (found via review + live testing):
• Fixed: opposite-direction zones (e.g. a resistance detection) could incorrectly merge into a same-price zone of the other polarity, inflating its score with contradictory evidence
• Fixed: a zone touched twice in quick succession could lose its bounce/break judgment entirely
• Fixed: if a zone flipped polarity while a judgment was pending, it could be scored in the wrong direction
• Fixed: Fair Value Gap zones could be deleted before their bounce/break outcome was ever recorded
• Fixed: merging a Key Level (PDH/PDL/etc.) into an existing zone silently dropped its label
• Removed dead condition in the Flip-Retest warning check
• Fixed a compile error (bitwise.and/or is not valid Pine syntax — rewritten with arithmetic)

Cosmetic:
• Zone tooltips and legend expanded to explain the new Flip and Key Level indicators
• Dashboard header/warning/sources text updated to reflect 7 detection sources and the new warning type

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน