OPEN-SOURCE SCRIPT

NASH BBv2: TRADE BY HAND FOR NOW

479
### Overview

**NASH BBv2** is an all-in-one intraday market structure and trend-analysis script designed for futures and equity traders. It combines three distinct institutional concepts into a single chart overlay:

1. **Higher Timeframe Trend Anchoring:** A customizable HTF EMA filter (default: 15-minute 21 EMA) to keep trades aligned with the dominant trend.
2. **Session Open Basis Hierarchy:** Time-anchored opening price levels (Globex, Midnight, and NY Equities Open in Central Time) to score directional bias based on structural alignment.
3. **Automated Fair Value Gap (FVG) Engine:** Real-time 15-minute imbalance detection, complete with 50% equilibrium midlines and real-time mitigation tracking.

---

### Core Components & Mechanics

#### 1. HTF Trend Anchor (15m 21 EMA)

* **Calculation:** Fetches the 21-period Exponential Moving Average from a higher timeframe (default: 15m) using non-repainting `request.security` calls.
* **Trend Filtering:** Flags the market as bullish when price trades above the anchor line, and bearish when below.
* **Visuals:** Features an optional background shading gradient and serves as an execution filter for breakout signals.

#### 2. Session Open Basis Hierarchy (Chicago / CT Timezone)

Anchoring price relative to major institutional shift points provides crucial context for daily expansion:

* **5:00 PM CT (Globex Open):** Establishes the initial baseline for the trading day.
* **11:00 PM CT (MNO / Midnight Open):** Captures the European/London liquidity anchor.
* **8:30 AM CT (NY Open):** Marks the New York Cash Equities opening bell.

**Directional Scoring System:**
At 8:30 AM CT, the script automatically evaluates the spatial hierarchy of these three open levels:

* **Bulls Strong (`Score = +2`):** `5:00 PM Open < 11:00 PM Open < 8:30 AM Open` (Higher highs across session opens).
* **Bears Strong (`Score = -2`):** `5:00 PM Open > 11:00 PM Open > 8:30 AM Open` (Lower lows across session opens).
* **Mixed / No Edge (`Score = 0`):** Opens are out of sequence, signaling choppy or non-trending structural conditions.

#### 3. Intraday Breakout Signals

* **Logic:** Detects when intraday price pierces or closes beyond any of the three anchored open levels (5pm, 11pm, 8:30am CT).
* **Detection Modes:**
* `Wick/Touch`: Fires immediately when high or low crosses the level intraday.
* `Close`: Requires a full candle close beyond the level for strict confirmation.


* **Filter:** Breakout signals are aligned with the HTF EMA (Longs only above EMA, Shorts only below EMA).

#### 4. 15-Minute Fair Value Gap (FVG) Tracker

* **Imbalance Detection:** Identifies 3-bar price inefficiencies on the 15-minute timeframe (`High[2] < Low[0]` for Bullish FVGs; `Low[2] > High[0]` for Bearish FVGs).
* **Mitigation Tracking:** Dynamically extends FVG boxes and draws a 50% equilibrium line until price enters the zone. Once mitigated, the box dims to gray and stops extending.

---

### How to Use

1. **Determine Bias:** Check the 8:30 AM CT NY Open label and background tint. Look for **BULLS STRONG** or **BEARS STRONG** readings for high-conviction daily bias.
2. **Confirm Trend:** Ensure price is on the correct side of the HTF 21 EMA line before taking setups.
3. **Identify Key Zones:** Use the 15m FVG boxes and 50% midlines as high-probability entry or target zones during retests.
4. **Execute Breakouts:** Use the signal triangles (green/red) to catch momentum expansion off key session open lines.

---

### Key Inputs & Customization

| Parameter Group | Option | Description |
| --- | --- | --- |
| **EMA Settings** | `EMA Anchor Timeframe` | Timeframe for the higher timeframe EMA anchor (Default: `15`). |
| | `EMA Period` | Length of the anchor EMA (Default: `21`). |
| | `Filter Signals via EMA` | Enforces trend direction on breakout signals. |
| **Open Levels** | `Timezone` | Primary timezone for session anchors (Default: `America/Chicago`). |
| | `Breakout Detection` | Toggle between `Wick/Touch` or `Close` break modes. |
| | `Show Breakout Signals` | Plot/hide signal triangles on the chart. |
| **FVG Settings** | `FVG Master Timeframe` | Timeframe used for FVG detection (Default: `15`). |
| | `Bullish / Bearish Color` | Custom opacity and color schemes for gap boxes and midlines. |

---

### Alert Setup

This script includes pre-configured alert conditions for seamless execution monitoring:

* **NY Open Alignment:** Fires when the 8:30 AM CT structural score resolves to Bulls Strong, Bears Strong, or Mixed.
* **Breakout Alerts:** Fires real-time notifications on Long or Short open-level breakouts.

---

*Disclaimer: This indicator is designed solely for technical analysis, educational, and research purposes. It does not constitute financial advice, and past structural setups do not guarantee future market performance.*

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。