Skip to content
Alert sources/TrendSpider

Automate TrendSpider trading alerts

Alert source

Nyria reads a TrendSpider Alert or Strategy Bot webhook and places it as an order at your broker, in TrendSpider's own variables.

alert note
{
  "symbol": "%alert_symbol%",
  "action": "buy",
  "price": "%last_price%"
}

Alerts and bots

Alerts or Strategy Bots

A plain Alert posts from one account-level URL and reaches one strategy. A Strategy Bot posts its own URL and body, so each bot can reach a different strategy.

TrendSpider's own variables

alert_symbol, last_price and bot_symbol fill in with percent signs around the name, not the curly braces TradingView uses.

One URL per strategy

Each strategy has its own webhook URL with its own token. Keep it private, and rotate it from the strategy's Integration tab if it leaks.

Set it up

Copy the webhook URL
Open the strategy in Nyria, select Integration, and copy its webhook URL.
Set it in TrendSpider
Open Account & Settings, check Webhook, paste the URL, and set the method to POST.
Put the payload in the note
TrendSpider posts each alert's note as the request body, sent as JSON when the note is valid JSON.
One account URL, one strategy
The account webhook feeds one Nyria strategy. To feed several, use a Strategy Bot per strategy instead.

Code examples

Alert note
{
  "symbol": "%alert_symbol%",
  "action": "buy",
  "price": "%last_price%"
}
Strategy Bot body
{
  "symbol": "%bot_symbol%",
  "action": "sell",
  "price": "%last_price%"
}

TrendSpider's variables

TrendSpider fills these in when a webhook fires. There is no action or quantity variable: write buy or sell into each alert, and leave quantity out so your Nyria bot sizes the order.

VariableWhereWhat it is
%alert_symbol%AlertThe symbol the alert fired on.
%last_price%BothThe last price when it fired.
%alert_name%AlertThe alert's own name.
%alert_note%AlertThe alert's note text.
%price_action_event%Alerttouch, break_through, bounce, or script_returned_true.
%bot_symbol%Strategy BotThe bot's symbol.
%bot_status%Strategy Botin_position or not_in_position.
%bot_name%Strategy BotThe bot's own name.
%bot_timeframe%Strategy BotThe bot's timeframe.

For options, a strategy set to Provided in alert trades the strike, expiry and type the alert sends, and refuses an entry that leaves one out. One set to From my rules ignores them and picks the contract from its own delta, strike and expiry settings.

A price in the alert is the limit when the strategy's limit is Alert price. Otherwise Nyria prices from the live chain, and an entry it can't price isn't placed.

Trade an account you already alert from

Point the account webhook, or one Strategy Bot, at a strategy.