← Library
Pine Script v6 · Strategy · TradingView V2.1 — MES Calibrated

IRON-SIGHT-V2.1

8AM Reversal Model — Calibrated for Micro E-mini S&P 500 Futures (MES1!)

File: iron_sight_v2.1.pine Type: strategy() — backtestable Market: MES1! (Micro E-mini S&P 500) Direction: Long & Short Session: 9AM–12PM NY Created: Apr 17, 2026

Overview

IRON-SIGHT-V2.1 is a direct calibration of V2 for the Micro E-mini S&P 500 Futures (MES) contract on CME. The core logic is identical to V2 — 8AM manipulation range, liquidity sweep, IFVG confirmation — but the TP and SL tick values have been adjusted to match realistic intraday MES targets.

V2's 400-tick TP was calibrated for a different instrument. On MES, 400 ticks = 100 S&P points, which is an unrealistic single-session target. V2.1 reduces TP to 160 ticks (40 S&P points / $200 per contract), setting a more achievable 3.2:1 R:R while keeping the same 50-tick SL.

V2 vs V2.1 — Key Difference If you are trading MES futures, always use V2.1. If you are trading a different instrument, use V2 and calibrate the TP/SL ticks yourself via the settings panel. Do not apply V2.1's tick values to equities, crypto, or forex without recalculating for that instrument's tick size.
OVERWATCH
HTF Telemetry
Prev Day H/L · 1H Data
VANGUARD
Execution Engine
Long & Short Entries
SENTINEL
Risk Management
TP / SL Exits

MES Calibration Reference

Instrument Details — MES (Micro E-mini S&P 500) TradingView Symbol: MES1! (continuous contract) · Tick Size: 0.25 S&P points · Tick Value: $1.25 per tick / per contract
Take Profit
160
ticks = 40 S&P pts
$200 / contract
Stop Loss
50
ticks = 12.5 S&P pts
$62.50 / contract
Risk:Reward
3.2:1
TP / SL
Win rate > 24% to profit
ParameterV2 DefaultV2.1 (MES)Rationale
Take Profit 400 ticks 160 ticks 400 ticks = 100 S&P pts on MES — unrealistic intraday. 40 pts is achievable in a single 9AM–12PM session.
Stop Loss 50 ticks 50 ticks Unchanged. 12.5 S&P points provides adequate clearance below the IFVG entry without being too wide.
R:R Ratio 8:1 3.2:1 V2's 8:1 was aspirational. 3.2:1 is realistic for intraday reversal trades and requires a lower win rate to be profitable.
model_id in payload IRON-SIGHT-V2 IRON-SIGHT-V2.1 Separate model registration in SENTINEL DB allows independent P&L tracking for each calibration.

Session Timeline (New York Time)

8:00 AM — Range Opens
Script begins tracking the 8AM manipulation range. Every bar during this hour updates the range high and low (aqua lines on chart).
9:00 AM — NY Cash Open / Range Locks
8AM range is locked. VANGUARD execution window opens. The strategy monitors for liquidity sweeps and IFVG confirmation.
9:00 AM – 12:00 PM — Active Trading Window
All entry conditions evaluated. No new entries after 12PM NY. Open positions remain managed by SENTINEL.
12:00 PM — Window Closes
No new positions. SENTINEL holds open trades until TP (160 ticks / $200) or SL (50 ticks / $62.50) is reached.

Entry & Exit Logic

Logic is identical to V2. The only parameter differences are TP and the model_id in the alert payload.

Long Entry — VANGUARD_LONG

Can Trade
(9AM–12PM)
+
Low Swept
(prior bar)
+
IFVG Long
confirmed
BUY
VANGUARD_LONG

Short Entry — VANGUARD_SHORT

Can Trade
(9AM–12PM)
+
High Swept
(prior bar)
+
IFVG Short
confirmed
SELL
VANGUARD_SHORT
One Position at a Time Entries only placed when strategy.position_size == 0. The strategy will not add to or flip an existing position without first being flat.

Alert Messages — JSON Payload

The alert_message is sent as the webhook POST body when TradingView fires the alert. All fields are required by the NIGHTHAWK server.

Long Entry (BUY)

{ "secret": "tac_com_alpha_9", "model_id": "IRON-SIGHT-V2.1", "ticker": "CME_MINI:MES1!", "action": "BUY", "price": 5243.50, "metadata": { "tier": "8AM_REVERSAL", "liquidity": "Low_Sweep", "note": "IFVG Confirmed", "market": "MES", "timestamp": 1745000000000 } }

Short Entry (SELL)

{ "secret": "tac_com_alpha_9", "model_id": "IRON-SIGHT-V2.1", "ticker": "CME_MINI:MES1!", "action": "SELL", "price": 5260.25, "metadata": { "tier": "8AM_REVERSAL", "liquidity": "High_Sweep", "note": "IFVG Confirmed", "market": "MES", "timestamp": 1745000000000 } }

Manual Test Payload (FORCE MANUAL TRIGGER)

{ "secret": "tac_com_alpha_9", "model_id": "IRON-SIGHT-V2.1", "ticker": "CME_MINI:MES1!", "action": "TEST", "price": 5243.50, "metadata": { "market": "MES", "note": "MANUAL_TRIGGER", "timestamp": 1745000000000 } }
FieldDescription
secretAuth token. NIGHTHAWK returns 401 Unauthorized if missing or wrong.
model_idRoutes signal to the correct SENTINEL DB record. Must match exactly.
tickerTradingView's full symbol ID including exchange prefix.
actionBUY, SELL, or TEST.
priceClose price of the bar that triggered the entry.
metadata.marketAlways "MES" for V2.1 — used for downstream routing and logging.
metadata.timestampUnix millisecond timestamp from TradingView's timenow.

On-Screen Go/No-Go Dashboard

The dashboard appears in the top-right corner of the chart and updates in real time on the final bar (barstate.islast). It shows 6 status rows covering all conditions required for a valid entry.

IRON-SIGHT-V2.1 | MES
Status
8AM Range Set
Liquidity Swept
IFVG Confirmed
Trading Window (9-12 NY)
Sweep Direction
Low
Signal Bias
WAIT
RowConditionGreen When
8AM Range Setnot na(range_8am_high) and not na(range_8am_low)The 8AM hour has passed and range is captured
Liquidity Sweptswept_high or swept_lowPrice has broken above or below a reference level
IFVG Confirmedifvg_long or ifvg_shortAn IFVG pattern has formed on the current bar
Trading Window (9-12 NY)can_trade (hour ≥ 9 and < 12)Current time is within the active execution window
Sweep DirectionText displayShows "Low" (long bias) or "High" (short bias)
Signal Biaslong_condition / short_conditionAll conditions aligned — LONG or SHORT bias active

Manual Test Block — FORCE MANUAL TRIGGER

Found in the Execution Logic settings group. When toggled ON and an alert is active with condition set to "Any alert() function call", the strategy fires a TEST payload to NIGHTHAWK immediately on the next bar close.

Two Different Alert Types Production signals use strategy.entry(alert_message=...) — set TradingView alert condition to Order fills. The manual test block uses alert() — set condition to Any alert() function call. These require separate alerts in TradingView.

Use this block to verify the full NIGHTHAWK pipeline is operational before trading sessions without waiting for a live signal to form.

All Configurable Inputs

GroupParameterV2.1 DefaultNotes
Mission Timing8AM Range Start Hour8Hour in NY time when range tracking begins
Mission Timing8AM Range End (NY Open)9Hour when trading window opens and range locks
Mission TimingTimezoneAmerica/New_YorkMust match your target session
Execution LogicRequire IFVG for EntrytrueIf false, enters on sweep alone (less selective)
Execution LogicTake Profit (Ticks)160MES: 40 S&P pts / $200 per contract
Execution LogicStop Loss Buffer (Ticks)50MES: 12.5 S&P pts / $62.50 per contract
Execution LogicFORCE MANUAL TRIGGERfalseToggle ON to fire a TEST webhook for pipeline verification

TradingView Setup — MES

  1. Open a chart on MES1! (CME Micro E-mini S&P 500 continuous contract). Use 5-minute or 15-minute timeframe for intraday 8AM setups.
  2. Open Pine Editor (Alt+P), clear existing code, paste iron_sight_v2.1.pine, click Add to chart.
  3. In the indicator settings (&gear;), verify timezone is America/New_York. TP is pre-set to 160 ticks, SL to 50 ticks for MES.
  4. Open the Strategy Tester tab to review backtest performance before going live.
  5. Production alert: hover indicator name → ···Add alert → condition: Order fills → Webhook URL to NIGHTHAWK.
  6. Test alert: Create a second alert → condition: Any alert() function call → same Webhook URL. Toggle FORCE MANUAL TRIGGER ON to test the pipeline.
  7. Verify NIGHTHAWK returns {"status":"Logged"} with model_status: "OBSERVATION" or "LIVE".

V2 vs V2.1 — Changelog

ChangeV2V2.1
Take Profit400 ticks160 ticks
Stop Loss50 ticks50 ticks (unchanged)
R:R Ratio8:13.2:1
model_idIRON-SIGHT-V2IRON-SIGHT-V2.1
metadata.market fieldNot present"MES"
Dashboard header"IRON-SIGHT-V2""IRON-SIGHT-V2.1 | MES"
Dashboard trading window label"Trading Window""Trading Window (9-12 NY)"
color.cyan bugFixed → color.aquaCarried forward (fixed)
ta.crossedout bugFixed → ta.crossover/crossunderCarried forward (fixed)