ENVO HQ
Command Center
Tuesday, March 24
0
Projects
0
Agents
Gateway
0%
Live
11:05 AM
ENVO HQ
← Docs
hq/agents/agt_trading/2026-02-11/ALERTS_SPEC_V2_7

ALERTS SPEC V2 7

Updated: 3/24/2026, 3:04:20 PM

Alerts Spec — EnvoTrades Smart Signals V2.7 (TradingView → Webhook)

Scope: build/test spec only. Not trading advice.

1) When an alert fires

In the shipped V2.7 scripts, alerts fire on allowed signals only:

  • buy_signal / sell_signal are gated by:
    • Confirm On Close (default ON) ⇒ barstate.isconfirmed
    • Session filter (if enabled/effective)
    • Range filter (required in Safe mode)
    • Daily bias (optional)
    • HTF confirmation (optional)
    • RSI filter (effective)
    • BOS/structure gate (effective)
    • Allow Buy/Sell toggles

Alert call:

  • alert(payload, alert.freq_once_per_bar_close)

Implications:

  • Payload timestamp uses time_close (close time of the bar that generated the signal).
  • No intrabar alerts when Confirm On Close = ON.

2) Payload format

Content type

  • TradingView sends the message as a raw string.
  • The V2.7 message is JSON (single object).

JSON schema (current)

{
  "version": "2.7",
  "script": "EnvoTrades Smart Signals",
  "symbol": "<syminfo.ticker + optional suffix>",
  "tickerid": "<syminfo.tickerid>",
  "timeframe": "<timeframe.period>",
  "timestamp": 1700000000000,
  "direction": "BUY|SELL",
  "entry": 123.45,
  "sl": 120.00,
  "tp1": 130.00,
  "tp2": 140.00,
  "score": 85,
  "grade": "A",
  "pass": "ALLOW|SESSION|RANGE_OFF|BIAS_OFF|HTF_OFF|RSI|BOS_OFF",
  "block": "SESSION|RANGE",
  "risk_percent": 1.0
}

Field notes:

  • entry/sl/tp1/tp2/score can be null when unavailable.
  • pass and block are pipe-delimited reason codes for easy splitting downstream.
    • *_OFF codes indicate a category was not required/enabled but still awarded for scoring.

Reason codes (enumeration)

PASS/BLOCK lists may include:

  • ALLOW
  • SESSION, SESSION_OFF
  • RANGE, RANGE_OFF
  • BIAS, BIAS_OFF
  • HTF, HTF_OFF
  • RSI, RSI_OFF
  • BOS, BOS_OFF

3) Receiver (webhook) requirements

Minimum receiver behavior:

  1. Parse JSON.
  2. Validate required keys: version, symbol, timestamp, direction.
  3. Validate numeric fields are numbers or null.
  4. Enforce idempotency:
    • Suggested key: tickerid + timeframe + timestamp + direction.
  5. Log/store full payload for replay.

4) Automation mapping guidance (non-broker-specific)

Suggested mapping for an MT5 EA / bridge:

  • symbol → broker symbol (may require mapping table)
  • direction → trade direction
  • entry → informational (signal-close entry)
  • sl, tp1, tp2 → order levels
  • risk_percent → position sizing input (EA-defined)
  • score, grade, pass, block → journaling/telemetry only (do not assume profitability)

5) BLOCKED / NEED

NEED (to finalize receiver validation rules):

  • Exact broker symbol mapping rules (suffix/prefix, CFD naming).
  • Price precision rules (digits/point) for each instrument.
  • Whether you want to allow tp2=null.
Files are read from second-brain/brain/ on your machine.