Creating a webhook#
In HookTrader, a "strategy" and its webhook URL are created together via the 4-step wizard. Open Strategies → + New strategy.
Step 1 — Create#
| Field | Notes |
|---|---|
| Name | Free text; shown everywhere the strategy appears. |
| Exchange | Pick a verified API key. Demo and live keys are listed together — the mode badge shows which is which. |
Step 2 — Strategy#
This step defines what HookTrader does when alerts arrive:
- Position sizing — see Strategies → Position sizing. Options are
risk_pct,from_indicator(qty in payload), orfixed_qty. - Allow entries without SL — off by default; turning it on disables risk-based sizing.
- TP levels and actions — up to 10 levels; for each level pick the actions (move SL to BE, reduce by %, activate trail, …). See Strategies → Actions.
- Pair lock — auto-lock on first trade (default) or pick the symbol now. See Strategies → Pair lock.
- Indicator preset — if you picked one in step 0, steps 2 and 3 are pre-filled. See Indicator presets.
Step 3 — Capture and map#
The webhook URL is shown at the top. Copy it into your TradingView alert's Webhook URL field, then fire a test alert. The wizard records the raw payload shape as it arrives.
For each captured shape:
- Open Map to rule.
- Pick the HookTrader event type (
entry,tp_hit,trail,move_sl,exit,custom). - Map raw fields to canonical fields (
side,symbol,sl,qty,tps[], …). - Dry-run to verify the captured payload validates against the v2 envelope after translation.
When several event types share the same payload shape (e.g. entry / TP / SL alerts that only differ in an alert or event string), open Show variants on the cluster to see each distinct value of every varying field — pick one and HookTrader seeds a matching rule for you.
Don't want to wait for a real alert? Use Paste payload at the top of the captures list to drop in a sample JSON object. It lands in the list with source manual and behaves like any other capture.
See Capture and map for the deep dive.
Step 4 — Review and activate#
The review screen shows:
- The minimum required payload keys (live-computed from your strategy + mapping).
- The mapping rules table.
- The strategy summary.
- Outstanding blockers, if any.
Activate to flip the webhook to active. The next incoming alert places a real trade.
Editing later#
The strategy detail page has buttons to:
- Edit mapping — change translation rules on an already-active webhook without going back through the wizard.
- Back to learning — resume captures and suppress trades. Useful for testing changes against a real indicator without firing live orders.
- Pause — suppress trades but keep captures off.
- Reset History — permanently delete closed trade records, notifications, and webhook logs for this strategy. Open trades are not affected.