EMA Crossover Entry Model with RSI Telemetry and JSON Alert Output
IRON-SIGHT-V1 is a baseline trend-following strategy built on a classic dual-EMA crossover. It enters long when the fast 9-period EMA crosses above the slow 21-period EMA, signaling a momentum shift to the upside.
RSI(14) is captured at entry and included in the alert payload as metadata — it is not used as a filter in V1, making this a pure crossover model. The strategy outputs a structured JSON alert message compatible with webhook-based automation pipelines (e.g., NIGHTHAWK).
model_id, rsi, ema_gap) that downstream systems consume.
V2 extends this architecture with ICT/Smart Money logic.
| Condition | Logic | Notes |
|---|---|---|
| Long Entry | ta.crossover(EMA9, EMA21) |
Fires on the bar where the fast EMA crosses above the slow EMA |
| Short Entry | Not defined | V1 is long-only; no short conditions exist |
| Exit Logic | Not explicitly defined | TradingView default: reversal on opposite crossover or end of backtest |
strategy.exit() or strategy.close() calls.
Positions are closed by TradingView's default behavior (next opposing signal or end of data).
For live trading, manual exits or a downstream system must handle position closure.
When a long entry triggers, the following JSON string is passed as the alert_message:
| Field | Type | Description |
|---|---|---|
model_id | string | Identifies the source strategy for downstream routing |
rsi | float | RSI(14) value at the moment of entry |
ema_gap | float | EMA(9) minus EMA(21) — positive = bullish momentum width |
alert_message field is sent as the POST body.
| Element | Color | Purpose |
|---|---|---|
| Fast EMA line | Blue | EMA(9) — short-term momentum |
| Slow EMA line | Red | EMA(21) — medium-term trend |
| Crossover point | TradingView default marker | Long entry marked automatically by strategy engine |
Alt+P), clear existing code, paste iron_sight_v1.pine.| Feature | V1 Status | V2 Status |
|---|---|---|
| Entry logic | EMA(9/21) crossover | 8AM range + liquidity sweep + IFVG |
| Short entries | Not implemented | Implemented (VANGUARD_SHORT) |
| Explicit exits | Not defined | TP/SL via strategy.exit() (SENTINEL) |
| RSI filter | Metadata only (no filter) | Not used in V2 either |
| HTF data | None | Previous day H/L + 1H highs/lows |
| Session timing | None (trades all hours) | 8AM–12PM NY time only |
| Alert JSON | model_id, rsi, ema_gap | model_id, action, tier, liquidity, note |