Browse the docs

Alert reference

Map other indicators to this format with How alerts are read.

Fields#

  • v: required, 2.
  • type: required, see below.
  • symbol: required, such as BTCUSDT or {{ticker}}.
  • ts: required. Unix milliseconds or seconds, such as {{timenow}}. Over the strategy's age limit (default 30 seconds), it is rejected.
  • price: optional, the price when the alert fired.
  • client_id: optional, naming one trade. An entry with a new one replaces the open trade.

Extra fields are ignored.

By type#

  • entry: opens a trade. side (long or short), entry, sl, tps (up to 10 prices), and qty or risk_usd if the strategy sizes from the alert. sl is required unless the strategy allows stopless entries.
  • tp_hit: level (1 to 10). Runs that target's steps if targets come from alerts, else nothing.
  • trail: sl. Tightens the stop. A loosening sl is rejected.
  • move_sl: sl. Moves the stop either way until a strategy step has moved it.
  • exit: reason (sl_hit, trail_exit, signal, manual or emergency). Closes the trade at market.
  • custom: name (up to 50 lowercase letters, digits or _, starting with a letter). Runs that event.

Connector events#

One trade's alerts, all sharing one client_id.

The connector sends every type except custom, plus config. Each adds exchange, interval, is_test, source (signal-connector) and connector_version. An is_test: true alert is never traded.

  • entry adds config_hash and source fingerprints, and omits qty.
  • tp_hit fires once per target, and trail on a confirmed bar.
  • move_sl fires once per trade, moving sl to the entry price.
  • exit sends reason sl_hit or signal.
  • config fires at alert start, about daily, or on demand, with config_hash, the setup and is_test: true.

In RR Levels mode the last tp_hit closes the trade. In Indicator Exit mode an exit does.

client_id reads prefix-SYMBOL-entrytime-side, with no prefix when Client ID Prefix is blank. HookTrader only compares it.

config_hash changes with any trade-shaping setting. Only compare it.