NixoraTrade

Alerts from an indicator or your own code

Naming the instruction yourself: the verbs, a message builder, and the advanced controls — partial closes, trailing stops, ATR stops and one-message reversals.

When the alert comes from an indicator, TrendSpider, or your own code, nothing on the other side knows whether you are in a trade. So you say exactly what to do. That is all this page is: how to say it.

New here? Sending messages to Nixora covers where your webhook address lives and the two switches that must be on before anything trades.

Copy one of these to start

TradingView indicatorTradingView

An indicator does not know whether you are in a trade, so you need one alert to buy and another to sell.

{"action":"open","side":"buy","symbol":"{{ticker}}","vol_lots":0.10}
TrendSpiderTrendSpider

Same message — TrendSpider fills its own placeholders before it sends.

{"action":"open","side":"buy","symbol":"%alert_symbol%","vol_lots":0.10}
Custom codePython · JS · PHP · cURL

Anything that can POST JSON works. Put your webhook address in the URL.

curl -X POST https://hook.nixoratrade.com/h/YOUR_TOKEN \
  -H "Content-Type: application/json" \
  -d '{"action":"open","side":"buy","symbol":"EURUSD","vol_lots":0.10}'

Build your own

Build your message

Choose what you want. The message updates as you type — copy it into your alert, or copy the Pine line into your script.

Paste this into the alert's Message box
…
Or put this in your script
…

Two options there are worth switching on:

The same generator, with more options, is in the app under Auto Signals → Syntax & Builder.

The shape of a message

{"action":"open","side":"buy","symbol":"EURUSD","vol_lots":0.5}

The thing to memorise: the verb is action, and the direction is a separate field, side. There is no "action":"buy". Opening is open plus a side; the other verbs are for closing and managing what is already there.

The everyday verbs

Opening

{"action":"open","side":"buy","symbol":"EURUSD","vol_lots":0.5}

To rest an order at a price instead of buying now, add orderType and price:

{"action":"open","side":"buy","symbol":"EURUSD","orderType":"limit","price":1.0750}

Getting out

{"action":"closelong","symbol":"EURUSD"}

The last two differ in one thing only: whether orders that have not filled yet are cancelled too.

Changing what is already there

{"action":"modifylong","symbol":"EURUSD","sl_price":1.0820}

Only the fields you include change. Leave tp_price out and your target stays where it is.

Stopping the account

{"action":"eaoff"}

eaoff is the one to wire to a "something is wrong" condition: it prevents new damage without closing positions you may want to handle yourself.

Beyond the basics

Everything below is optional. Skip it until you need it.

Closing part of a position

{"action":"closelongpct","symbol":"EURUSD","close_pct":50}

Watch the unit. On the pct verbs the number is a percentage: 50 is half the position, not fifty lots. Percentages travel well when one alert feeds several accounts; a fixed lot size does not.

Turning a position around in one message

{"action":"closelongopenshort","symbol":"EURUSD","vol_lots":0.5}

Read the names left to right and they say what they do. They exist as one verb so the turn is a single instruction — two separate alerts can arrive out of order and leave you the wrong way round.

Using PineConnector already? Its shorthand works unchanged: cl+ol, cl+os, cs+ol, cs+os, cls+ol, cls+os.

Placing a waiting order with its stops attached

{"action":"newsltpbuylimit","symbol":"EURUSD","price":1.0750,"sl_price":1.0700,"tp_price":1.0900}

Read the name as new · sl/tp · buy · limit. The point is that the order and its protection arrive together — an order placed first and protected afterwards is unprotected in between.

Sizing by risk instead of lots

A fixed lot size is too big on one account and trivial on another. These size to the account:

{"action":"open","side":"buy","symbol":"EURUSD","vol_pct_eq_loss":1,"sl_pips":20}

That risks 1% of equity, worked out from the stop — so it needs a stop to measure against.

Stops that manage themselves

Set these at entry and the EA runs them; no follow-up alert is needed.

{"action":"open","side":"buy","symbol":"EURUSD","vol_lots":0.5,"sl_pips":20,"betrigger":10,"beoffset":1}

That moves the stop to break-even once the trade is 10 pips up. There are trailing-stop and ATR-trailing equivalents, all listed in the Keyword reference.

Working on one specific order

Three verbs take a ticket — close, modify and cancel — and act on that one order alone.

{"action":"close","ticket":148302,"vol_lots":0.01}
{"action":"modify","ticket":148302,"sl_price":1.0820}
{"action":"cancel","ticket":148302}

A ticket is the number your broker gave that one order, so these only work on your account address — see How alerts are routed.

Writing a note instead of trading

alert records a line in the Journal and places nothing — useful for marking a session open or a change in conditions, so the Journal reads as a story rather than a list of fills.

{"action":"alert","symbol":"EURUSD","ref":"london-open"}

When something is refused

A refusal is not silence. It is recorded against the alert that caused it, with the reason in plain words, next to the accepted orders in the Journal.

The habit worth forming: when an alert does not do what you expected, read the refusal before changing the alert. It usually names the fix.

Everything in one place

Every verb and every parameter, with what it does and an example, is in the Keyword reference.