OPEN-SOURCE SCRIPT

Proactive Execution Machine

133
Proactive Execution Machine: Multi-State Momentum Engine
Overview
The Proactive Execution Machine is a comprehensive trading workspace designed to filter market noise and highlight high-probability execution windows. It combines Dynamic Supply/Demand Zones, Manual Level Proximity, and a proprietary Dual-Candle Momentum Scoring system to categorize the market into specific "States" in real-time.

Instead of a simple arrow, this script provides a System Status dashboard that tells you exactly what phase the market is in—whether it's "Level Absorption," a "Demand Vortex," or a "Tired Trend. "Core Components
1. The Momentum Gauge (Bottom Left)
This table provides a deep-dive into order flow by scoring the last two candles based on:
Close Location: Where price closed relative to its range (Upper, Middle, Lower).
Body-to-Wick Ratio: Measuring the "effort vs. result" of the move.
Range Relativity: Whether the current bar is an "Inside" or "Outside" bar relative to the previous candle.
Slope (Linear Regression): A real-time trendline of momentum strength to see if conviction is accelerating or decelerating.
2. Dynamic State Engine The script automatically identifies and colors the chart into three primary zones:
Supply Zone (Red): The upper 30% of the recent price discovery range.
Demand Zone (Green): The lower 30% of the recent price discovery range.
Proximity Zones: When price nears your Manual Levels (PDH, PDL, NY Open, etc.), the engine switches priority to monitor for "Breakouts" or "Level Attacks."
3. System Status (Bottom Right)The dynamic HUD changes size and color based on conviction levels. It will notify you of specific market conditions:
Supply/Demand Overrun: When momentum is so strong it is smashing through reversal zones. Level Absorption/Stalling: When price reaches a key level but momentum has "flattened," suggesting a potential reversal or high-volume churn.
Buy/Sell Now: High-conviction signals triggered only when Location (Zone) and Momentum (Score) align.
How to Trade with the "Machine"
For Trend Followers: Look for the status "TREND (ACTIVE)" combined with a Momentum Score of $\pm 4$ or higher.
For Reversion Traders: Watch for "WATCH LONGS/SHORTS" when price enters a Supply or Demand zone. Wait for the status to flip to "BUY/SELL NOW" as momentum begins to shift back toward the mean.
For Level Traders: Input your daily levels (VAH, VAL, POC) in the settings. The machine will automatically prioritize these levels, changing status to "AT LEVEL" the moment price enters your specified proximity.

Key Settings
Manual Levels: Input up to 5 custom price levels for the proximity engine.
Proximity Sensitivity: Adjust how close price must be to a level (in points/pips) to trigger an "At Level" state.
Aggression (1-5): Tuning the pivot detection. Lower numbers respond faster to micro-structure; higher numbers focus on major swing points.

Visual Coding
Candle bodies are colored to assist with single candle pattern detection:
Lime/Pink Bar Highlights: The script uses a custom color engine to highlight "Shaved" (Marubozu) bars.
Lime indicates aggressive bullish conviction, while Pink (Fuchsia) highlights aggressive bearish conviction.
Green indicates bull engulfing candle
Red indicates bear engulfing candle
Orange is an outside bar
Yellow an inside bar
Gray a Doji bar
Black all other bars

Dynamic Zones: The chart features two primary background areas:

Red Zone (Top): The Supply Zone, identifying where sellers historically reclaim control.

Green Zone (Bottom): The Demand Zone, identifying where buyers historically step in.

System Status HUD (Bottom Right): This is the "brain" of the machine. The text size is adjusted to attract the trader's attention when the slope of the momentum increases above 5 (bullish expansion) or greater than - 5 (Bearish expansion). The system status changes color based on the market state too:

HUD Coloring:
Aqua: Active Bullish Trend.
Gray: Bull trend tired.
Orange: Active Bearish Trend.
Gray: Bear trend tired.
Red: For sell now.
Green: For buy now.
Lime: Bull price level under attack.
Marron: Bear price level under attack.
Gray: Price level absorption.
Yellow: Price at level and stalling.

Maroon: An "Overrun" or "Vortex" where price is smashing through supply/demand with extreme momentum.

The text size serves as a "Volatility Alarm." * When the text is Small, the market is in a "sideways" or "absorbing" state. You should be cautious about entering new trend trades.

When the text is Large, the Machine has detected that "Aggressive" participants have entered the order flow. This is your cue that a "Level Attack" or a "Trend Breakout" is currently in progress.

The 1-Minute Tactical Setup Guide:
Proactive Execution Machine Operating on the 1-minute (1m) timeframe requires a balance between speed and noise filtration. Because the Proactive Execution Machine uses a "State Engine" logic, it is uniquely suited for the high-velocity environment of the NY Open.

I follow these three tactical steps to optimize the chart for the 1m timeframe:

Step 1: Calibrate the "Proximity Sensitivity" On a 1m chart, a "Level" isn't a single price—it's a zone.
Adjustment: In the script settings, set your Proximity Sensitivity to a value that represents the average "noise" of your instrument.
For ES (S&P 500 Futures): 1.5 to 2.5 points.
For NQ (Nasdaq Futures): 5 to 10 points.
For Forex (EURUSD): 1 to 2 pips.
The Goal: You want the "AT LEVEL" status to trigger just as price is "sniffing" the level, giving you time to prepare your order before the touch.

Step 2: Watch the "History" Column in the Momentum Gauge
The bottom-left table is your most important tool for the 1m chart. It shows you the momentum of the last three bars ($T-0$, $T-1$, $T-2$).
Momentum Sequence: Look for a "Sequence of Three." If you see $T-2$ (Neutral), $T-1$ (Long), and $T-0$ (STR Long), you have a momentum explosion.
The Trap: If you see STR LONG followed immediately by a NEUTRAL bar while in a Supply Zone, the "Machine" will shift to "SUPPLY STALLING." This is your signal to tighten your trailing stop or take profit—it means the bulls are hitting a wall of sell orders.

Step 3: The "Level Attack" Execution
The script features a unique state called "LEVEL ATTACK." This is designed specifically for breakout/breakdown traders.
The Setup: Price is approaching a Manual Level (like the NY Open or PDH).
The Signal: If the status changes to "LEVEL ATTACK (BULL)," it means the momentum score is high ($>3$) and the slope is positive while within the proximity of the level.
The Action: This is a "Proactive" entry. Instead of waiting for the candle to close above the level, you are entering as the "Machine" detects institutional pressure "attacking" the level.
Daily Routine for the "Machine"
1) 09:25 AM: Input your 5 manual levels (PDH, PDL, NY Open, VAH, VAL).
2) 09:30 AM: Wait for the first 5 minutes of volatility to settle.
3) The Window: Look for the System Status to move from "IDLE" to a colored state.
4) The Trigger: Never take a signal if the Momentum Gauge is in the "Neutral" (Yellow) zone. Only execute when the gauge shows LONG/SHORT or STR LONG/STR SHORT.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.