Skip to content
Docs
Open Portal
Copy manually

Your browser did not allow direct clipboard access. Select and copy the text below.

Connect LuxAlgo Vela to MT5

Send a one-time Vela alert to PineConnector, then verify a buy or sell on your MT5 demo account.

Connect a LuxAlgo Vela alert to MetaTrader 5 (MT5) through PineConnector. First, send a connection check that does not place a trade. Then send one buy or sell request to your demo account and check the result in MT5.

Vela detects your condition → PineConnector passes on your message → MT5 processes the request

Before you start, you need:

  • A PineConnector account with an MT5 demo account already connected, either through PineConnector Edge (hosted MT5) or your own Windows computer or VPS (a rented Windows server). If you have not connected MT5 yet, complete Connect MT5 first.
  • Access to LuxAlgo Vela on Essential or above, which supports webhook destinations. Check LuxAlgo’s webhook requirements.
  • A Vela chart receiving live prices. For the trade test, the broker’s market must also be open.
  1. Sign in to PineConnector Portal and open Connections.
  2. Find your intended MT5 demo account. Check its broker and account number, and confirm that it is connected.
  3. Check all accounts listed under the same License ID. For this walkthrough, use an ID connected to exactly one demo account.
  4. Select the copy icon beside License ID. Keep the copied value for step 4; paste it unchanged when replacing LicenseID.

No ID for a single demo account? Follow Use a separate License ID before continuing. Check your available allocation in Connections, and ask PineConnector Support if you cannot separate the demo account. Do not disconnect an account running live automation just to complete this test.

Connections showing the License ID copy control above a demo account, with identifiers hidden
In Connections, copy the License ID above your intended account. The red box marks the copy control; the example hides the identifiers.
In Connections, copy the License ID above your intended account. The red box marks the copy control; the example hides the identifiers.Open original
Connections showing the License ID copy control above a demo account, with identifiers hidden
  1. In Vela, open the chart you want to use for the check.
  2. Select Alerts (the bell) on the right-hand edge of the chart.
  3. Select New alert to open New Price Alert.

Use the right-hand Alerts panel shown below. The Alerts item in Vela’s main sidebar opens the older Screener alerts, which use a different setup.

Vela chart beside the Alerts panel, with the Alerts bell and New alert button outlined
Red boxes mark Alerts on the right-hand side of the chart and New alert at the top of the panel.
Red boxes mark Alerts on the right-hand side of the chart and New alert at the top of the panel.Open original
Vela chart beside the Alerts panel, with the Alerts bell and New alert button outlined

In New Price Alert, fill in these settings:

Setting What to enter
Price condition Crossing, with a level close to the current price on your chart. The alert waits for price to cross that level.
Name PineConnector delivery check
Frequency Only once, so this test alert stops after its first trigger.

For a quicker connection check, use Greater than with a level below the current price on a chart receiving live updates. This checks whether price is above the level; it does not wait for a crossing.

Keep the form open. Add the destination and message in steps 3 and 4 before selecting Create alert.

New Price Alert form showing Crossing, a price, the name PineConnector delivery check, and the frequency Only once
The red boxes mark the condition and price, name, and Only once frequency. Set a level for your own chart.
The red boxes mark the condition and price, name, and Only once frequency. Set a level for your own chart.Open original
New Price Alert form showing Crossing, a price, the name PineConnector delivery check, and the frequency Only once

A webhook sends an alert’s message to another service over the internet. Here, the URL tells Vela where to send it: PineConnector. Your License ID goes in the message, not in the URL.

If you already have a PineConnector destination, select it under Send to and check that it uses the URL below. Otherwise:

  1. In the open alert form, go to Send to → Add a destination → Webhook.
  2. Paste the URL below into URL.
  3. Enter PineConnector as the name.
  4. Keep For bots and trade relays switched on.
  5. Select Add webhook, then select PineConnector under the alert’s Send to section.
PineConnector webhook URL
Vela → Webhook → URL Text
https://webhook.pineconnector.com/
Alternative URL: also supported
Vela → Webhook → URL Text
https://webhook.pineconnector.com/api/webhook
Vela's Add a destination form with Webhook selected, the PineConnector URL and name filled, and For bots and trade relays on
The red boxes mark the URL, name and trade relay option. Keep the option on, then select Add webhook; it skips alerts that can only be delivered late.
The red boxes mark the URL, name and trade relay option. Keep the option on, then select Add webhook; it skips alerts that can only be delivered late.Open original
Vela's Add a destination form with Webhook selected, the PineConnector URL and name filled, and For bots and trade relays on

To check a saved destination, open Alerts → Destinations. Look for PineConnector with the status On.

Your destinations list with the PineConnector webhook marked On
The red box marks PineConnector and its On status. Select this destination in the alert’s Send to section.
The red box marks PineConnector and its On status. Select this destination in the alert’s Send to section.Open original
Your destinations list with the PineConnector webhook marked On
  1. Under Send to, select the PineConnector webhook.
  2. Expand that destination’s Message editor.
  3. Copy the entire example below and replace the editor’s existing contents with it.
  4. Replace only LicenseID with the value you copied in step 1. Keep both test values unchanged.

The braces and double quotes form a JSON message, a structured format for sending data. You do not need to write code: keep the structure shown below and change the placeholder. The text after "message": is the instruction PineConnector receives. This instruction checks the connection without requesting a trade.

Check the connection without placing a trade
Vela → PineConnector webhook → Message JSON
{
"message": "LicenseID,test,test"
}
PineConnector selected in Vela with the expanded webhook Message editor and JSON preview showing a placeholder License ID
The first red box marks the Message area. The second marks the JSON preview, with the format set to Your own.
The first red box marks the Message area. The second marks the JSON preview, with the format set to Your own.Open original
PineConnector selected in Vela with the expanded webhook Message editor and JSON preview showing a placeholder License ID

If Signal Authentication is enabled: open PineConnector Portal → Bridge, select Modifier, and check Signal Authentication. Use the exact Secret Key configured there. This is an extra check that prevents messages without the matching key from reaching MT5. Signal Authentication guide.

In Vela’s Message editor, add ,secret=SecretKey immediately after the second test, before the closing double quote. Replace SecretKey with your PineConnector key, keeping its uppercase and lowercase letters exactly as saved. If authentication is off, leave the example unchanged apart from your License ID.

Before creating the alert: confirm that your own ID has replaced LicenseID, the preview shows JSON, and the PineConnector destination is selected. Choosing a different Format after pasting can replace your message, so check the contents again if you change it. Vela message formats.

Select Create alert. Once the alert is Live, wait for the price condition to be met.

Bridge Logs is PineConnector’s record of incoming signals and their processing results. Check both Vela and PineConnector:

Where to look What to check
Vela → Alerts → Log Match your alert name and trigger time. Open the event and check the webhook delivery result.
PineConnector Portal → Bridge → Logs Match the time and demo account. Look for the test with Success. If it is In Progress, wait for the final result.
Vela Alerts Log showing the PineConnector demo connection check as Sent with HTTP 200
The red box marks Sent, PineConnector and HTTP 200: a successful webhook response. Match the event in Bridge to confirm processing.
The red box marks Sent, PineConnector and HTTP 200: a successful webhook response. Match the event in Bridge to confirm processing.Open original
Vela Alerts Log showing the PineConnector demo connection check as Sent with HTTP 200

For a terminal receipt check, find your test’s row in Portal → Bridge → Logs and note its Signal ID. This identifies the individual message. Find that same ID in MT5’s Experts log. The PineConnector Expert Advisor (EA) is the software running in MT5 that processes your signals. The Experts log records its messages. Open the terminal and logs in PineConnector Edge, or use Toolbox → Experts in your own MT5 terminal.

MT5 Experts log confirming receipt of the PineConnector connection test
The red box marks the demo terminal’s confirmation that it received the connection test.
The red box marks the demo terminal’s confirmation that it received the connection test.Open original
MT5 Experts log confirming receipt of the PineConnector connection test

Check before continuing:

  • The connection test shows Success in Bridge for your intended demo account.
  • No trade appeared from this test.

You have checked message processing; step 5 checks whether a trade opens. If there is no matching result, use the troubleshooting table first.

This step sends a trade request, so check the destination again before creating the alert.

  1. In MT5, confirm that you are using the intended demo account, with no open position or pending order on the symbol you will test.
  2. In Market Watch, find the broker’s exact symbol name. For example, your broker may use EURUSD.a rather than EURUSD. Right-click that symbol and select Specification.
  3. Check the minimum volume (smallest order size), volume step (allowed size increments), Digits (decimal places in the price) and Stops level (the broker’s minimum distance for stops). The examples request 0.01 lots, a 20-pip stop loss and a 40-pip take profit. Use them only if those values meet your broker’s rules; otherwise change the values before sending. How PineConnector pips work.
  4. In Vela, create a new Price Alert for the market you want to test. Set the condition as in step 2, name it PineConnector demo trade, and choose Only once.
  5. Select PineConnector under Send to, expand Message, and paste one of the examples below. Choose either buy or sell, not both.
  6. Make these replacements in the message:
Text in the example What to put there
LicenseID The License ID copied from Connections for your single demo account.
EURUSD The exact, case-sensitive symbol from that account’s MT5 Market Watch, including any suffix.
vol_lots=0.01 The trade size in lots. Change 0.01 if you need a different permitted demo size.
sl_pips=20 The stop-loss distance in PineConnector pips. Change 20 if needed for the broker’s rules.
tp_pips=40 The take-profit distance in PineConnector pips. Change 40 if needed for the broker’s rules.

One PineConnector pip equals 10 quoting points. Its price distance depends on the broker’s symbol precision. For example, if Stops level is 50 points, a 20-PineConnector-pip stop is 200 points and a 40-pip target is 400 points: both exceed that stated minimum. This is a distance calculation, not a guarantee that the broker will accept an order. If you cannot access the MT5 specification, ask your broker for it before choosing the values.

If Signal Authentication is enabled, add ,secret=SecretKey at the end of the instruction, before the closing double quote, and replace the key as in step 4. Keep the JSON braces, commas and double quotes intact.

Demo buy
Vela → PineConnector webhook → Message JSON
{
"message": "LicenseID,buy,EURUSD,vol_lots=0.01,sl_pips=20,tp_pips=40"
}

Illustrative request. Requests a 0.01-lot market buy with a 20-pip stop loss and a 40-pip take profit. No trade was executed for this example.

Demo sell
Vela → PineConnector webhook → Message JSON
{
"message": "LicenseID,sell,EURUSD,vol_lots=0.01,sl_pips=20,tp_pips=40"
}

Illustrative request. Requests a 0.01-lot market sell with the same distances. No trade was executed for this example.

Send and check the result:

  1. Review the demo account, message and trigger. When the broker’s market is open, select Create alert once.
  2. After it fires, find the event in Vela → Alerts → Log and the matching result in PineConnector Portal → Bridge → Logs.
  3. In the intended MT5 demo account, check Trade for an open position or History if it has already closed. Confirm the symbol, buy/sell direction, volume, stop loss and take profit. Check that there is no unintended duplicate. Where to find the trade in MT5.
  4. Remove both temporary Vela test alerts when you finish, including any that never fired. Close the demo test position in MT5 if it is still open.

Delivered does not mean traded. Vela’s delivery result confirms the webhook response. Bridge shows PineConnector’s processing result. Check MT5 to confirm the actual broker outcome.

After the demo trade check, you can replace the simple price condition with your indicator or strategy’s condition.

  1. Find the indicator or strategy’s name on your Vela chart (its legend).
  2. Select Add alert (the bell) beside it.
  3. Check the market and timeframe at the top of the form.
  4. Choose the Condition and When it fires. For example, Once per bar close checks the condition when a candle closes.
Vela Custom Alert form showing the watched RSI line, Crossing up condition, target of 70, and Once per bar close
The red boxes mark Watch and Condition, Target, and When. This RSI example illustrates the controls; use your own indicator and trigger settings.
The red boxes mark Watch and Condition, Target, and When. This RSI example illustrates the controls; use your own indicator and trigger settings.Open original
Vela Custom Alert form showing the watched RSI line, Crossing up condition, target of 70, and Once per bar close

Under Send to, select PineConnector and use the same JSON message format, with your own License ID, broker symbol and permitted values.

Decide what each strategy event should do before choosing its PineConnector command. A strategy’s “sell” event might mean entering a short position or exiting a long position; do not assume those are the same instruction. Use the PineConnector command reference to choose the intended action.

A Custom Alert can send the same message every time it fires. Check its frequency and test it on demo before relying on it. If you later change the script or its inputs, recreate the alert so it uses those changes. Remove temporary strategy test alerts when you finish. Create Custom Alerts in Vela · PineConnector commands

The earlier examples put the whole PineConnector instruction inside one message field. You can also give each part its own field: which connection to use, what to do, and which market to trade.

In JSON, the text before the colon is the field name; the text after the colon is its value. For example, "command": "test" means “the command is test”. Keep the field names, double quotes, braces and commas as shown. Several lines still make one message.

Choose one format for each alert. Do not put a message field together with separate license, command or event fields.

Start with this connection check. Create a new Price Alert using steps 2 and 3, keeping the form open. Under Send to → PineConnector → Message, replace the editor’s contents with the complete object below. Replace LicenseID with the ID from step 1.

Start here: check the connection
Vela → PineConnector webhook → Message JSON
{
"source": "luxalgo",
"license": "LicenseID",
"command": "test",
"symbol": "test"
}
  • source — A label saying where the message came from. It does not choose the trading action. Leave "luxalgo" as shown. This field is optional.

  • license — The PineConnector License ID that selects the connected account or accounts. Replace LicenseID with the ID copied from Portal → Connections.

  • command — The action PineConnector should perform. Keep "test" for this check. It does not request a trade.

  • symbol — Normally the broker’s market name, such as EURUSD. For this connection check only, keep "test".

If Signal Authentication is on: add a comma after "symbol": "test", then add "secret": "SecretKey" on a new line before the final brace. Replace the key privately with the one configured in Portal → Bridge → Modifier → Signal Authentication. If authentication is off, no secret field is needed.

Keep this structured message in the editor, check that the preview shows JSON, and use Only once. Select Create alert once, then wait for the condition to trigger. Check Vela’s delivery log and the matching Test → Success result in Bridge; step 4 shows where to find those logs. No position should open from this message.

Vela Price Alert with red boxes around Only once, the structured JSON Message field and its JSON preview
The red boxes mark Only once, where to paste the message, and the JSON preview. The screenshot uses a placeholder License ID.
The red boxes mark Only once, where to paste the message, and the JSON preview. The screenshot uses a placeholder License ID.Open original
Vela Price Alert with red boxes around Only once, the structured JSON Message field and its JSON preview

A trade message replaces the two test values with the action and broker symbol, then adds a trade size. This version also includes a stop loss and take profit, using the same example values as step 5.

  • command: buy — Request a market buy. Use sell for a short entry, not to close an existing buy.

  • symbol: EURUSD — Trade the broker’s exact EURUSD symbol. Replace it if your broker uses a suffix, such as EURUSD.a.

  • vol_lots: 0.01 — Request an entry size of 0.01 lots. Check that the broker permits this size.

  • sl_pips: 20 — Request a stop loss 20 PineConnector pips from entry.

  • tp_pips: 40 — Request a take profit 40 PineConnector pips from entry.

If authentication is on for this object: add a comma after "tp_pips": "40", then add "secret": "SecretKey" before the final brace. The secret is its own JSON field; do not append ,secret=... inside another field’s value.

Demo buy with size, stop loss and take profit
Vela → PineConnector webhook → Message JSON
{
"source": "luxalgo",
"license": "LicenseID",
"command": "buy",
"symbol": "EURUSD",
"vol_lots": "0.01",
"sl_pips": "20",
"tp_pips": "40"
}

Illustrative request; not an executed trade. Replace your License ID and broker symbol. Check the broker’s volume and stop-distance rules before using the example. One PineConnector pip is 10 quoting points, so its price distance depends on the symbol’s precision. Follow step 5 to send once and verify the order in the intended demo account.

Existing Screener alerts: use the strategy event

Section titled “Existing Screener alerts: use the strategy event”

An event tells PineConnector what just happened in the strategy: a long entry, a short entry, a long exit or a short exit. LuxAlgo can fill in that event automatically, so one webhook can carry all four actions.

  1. Open Alerts in LuxAlgo’s main sidebar. Find an existing alert reserved for this demo test and check that its status is Paused before opening it. Do not repurpose an alert used by existing automation. If you do not have a suitable paused alert, use the new chart-alert walkthrough instead.
  2. Select its webhook under WEBHOOKS. Use Payload (JSON) for the trading message; Notifications → Message is a different field.
  3. Enter https://webhook.pineconnector.com/ in URL. The longer /api/webhook form shown in the screenshot also works.
  4. Under Events, select the actions you want this strategy to send. To receive all four, select Long, Short, Exit Long and Exit Short.
  5. Paste the small template below into Payload (JSON). Keep the editor open while you make the replacements and authentication check that follow.
Basic Screener message: four fields
Existing Screener alert → Webhook → Payload (JSON) JSON
{
"license": "LicenseID",
"event": "[[strategy_event]]",
"symbol": "[[ticker]]",
"vol_lots": "0.01"
}

This template can request trades. Use the License ID for your intended demo account. It requests 0.01 lots for an entry and has no explicit stop loss or take profit. If Signal Authentication is on, add the secret using the complete version below before saving.

  • license — The PineConnector connection to receive the message. You: replace LicenseID with the ID from Portal → Connections. Keep it quoted.

  • event — Whether to enter or exit a position. LuxAlgo: leave [[strategy_event]] in the editor. It becomes long, short, exit long or exit short when the alert fires.

  • symbol — The market to trade. ticker means the chart’s market code. LuxAlgo: [[ticker]] becomes the chart ticker. Check that it matches the broker’s exact MT5 symbol.

  • vol_lots — The size of a new buy or sell, in lots. You: change "0.01" if needed to a permitted demo size. It does not set the size of a partial close.

If your broker calls EURUSD EURUSD.a, an incoming EURUSD ticker may need Symbol Mapping. For a single-market alert, you can instead replace [[ticker]] with that broker’s exact symbol. Use a fixed symbol only when the alert is for that same market.

Existing Screener webhook editor with red boxes around URL, the four Events choices, and a four-field JSON payload marked Valid
The red boxes show the URL, Events and Payload (JSON). This is an unsaved example with a placeholder License ID; Save is below this detail view.
The red boxes show the URL, Events and Payload (JSON). This is an unsaved example with a placeholder License ID; Save is below this detail view.Open original
Existing Screener webhook editor with red boxes around URL, the four Events choices, and a four-field JSON payload marked Valid
LuxAlgo sends PineConnector uses Requested action
long BUY Open a buy position.
short SELL Open a sell position.
exit long CLOSELONG Close the buy positions on this symbol that are covered by your EA settings.
exit short CLOSESHORT Close the sell positions on this symbol that are covered by your EA settings.

Use strategy_event, not strategy_order_action. The latter can say sell for both a short entry and the exit of a buy. The event tells PineConnector which of those you mean. Do not add a fixed command field to this template: command takes precedence over event when both are present.

An exit is not a 0.01-lot partial close just because vol_lots is "0.01". Close scope depends on the receiving account and EA settings. Also check your strategy’s sequence on demo: do not assume it sends a separate exit before an opposite entry.

Add your secret key only if authentication is on

Section titled “Add your secret key only if authentication is on”

Open PineConnector Portal → Bridge → Modifier → Signal Authentication to check whether it is On or Off.

  • Off: use the four-field template above. You do not need a secret field.
  • On: use this five-field version instead. Replace both LicenseID and SecretKey before saving. The key must match PineConnector exactly, including uppercase and lowercase letters. It is not Vela’s signing secret.
Screener message with Signal Authentication
Existing Screener alert → Webhook → Payload (JSON) JSON
{
"license": "LicenseID",
"event": "[[strategy_event]]",
"symbol": "[[ticker]]",
"vol_lots": "0.01",
"secret": "SecretKey"
}

The extra secret field checks permission to send the signal. It does not change the market, action or trade size. Do not put a real key in a screenshot or a message you share for help.

Add optional details only when you need them

Section titled “Add optional details only when you need them”

The four basic fields, plus your secret when required, are enough for the entry/exit template. These extra fields help describe the message; you can leave them out.

  • source — A sender label. "luxalgo" identifies where the alert came from; it does not change the trade.

  • comment — A label for the trade. [[strategy_name]] asks LuxAlgo to fill in the strategy’s name. This label does not make a close command affect only that strategy.

  • meta — A group of extra information. PineConnector ignores this group when building the trading instruction.

  • meta.strategy_id — The strategy’s identifier in LuxAlgo, supplied by [[strategy_id]]. This is not your PineConnector License ID or Signal ID.

  • meta.price — The price associated with the strategy’s order in LuxAlgo, supplied by [[strategy_order_price]]. It does not set the broker’s order price and is not proof of a broker fill.

  • meta.time — When LuxAlgo fired the alert, supplied by [[timenow]]. It is not the time the broker executed a trade.

Show the complete example with optional labels and extra information

This combines the fields explained above. It is an alternative complete message, not something to paste after the basic template. Replace your License ID, check the broker symbol and entry size, and remove the entire secret line if authentication is off. The source, comment and whole meta group are optional.

Complete Screener example with optional fields
Existing Screener alert → Webhook → Payload (JSON) JSON
{
"source": "luxalgo",
"license": "LicenseID",
"event": "[[strategy_event]]",
"symbol": "[[ticker]]",
"vol_lots": "0.01",
"comment": "[[strategy_name]]",
"secret": "SecretKey",
"meta": {
"strategy_id": "[[strategy_id]]",
"price": "[[strategy_order_price]]",
"time": "[[timenow]]"
}
}

The Screener templates are illustrative requests, not executed trades. Entry events request the stated lot size; exit events request the corresponding close command. None of these Screener examples specifies a stop loss or take profit.

  1. Check the destination account, broker symbol, permitted lot size and secret if required. All accounts under the License ID can receive its alerts.
  2. Confirm Payload (JSON) shows Valid. This checks the JSON structure only, not your account details or the resulting trade. The square-bracket tokens should still be visible in this editor; LuxAlgo replaces them when an event fires.
  3. Select Save only when those checks are complete. Saving a paused alert is not the same as turning it on; keep it paused until you are ready for its selected events to send requests.
  4. When you enable the alert and an event fires, match its delivery in LuxAlgo with the result in Portal → Bridge → Logs, then check the intended MT5 account’s Trade or History tab.
  5. For an entry, confirm symbol, direction and volume. For an exit, confirm the intended position closed and no unintended opposite position opened. If the outcome is unclear, investigate the original event before sending another request.

If PineConnector reports an unresolved placeholder, inspect the sent message and the alert type. A token such as [[ticker]] must have become a real value before PineConnector uses it as a broker symbol. A green Valid label in the editor does not establish that substitution worked.

What you see What to check
Webhook is missing Check your LuxAlgo plan. If the destination is missing, add it under Webhooks in LuxAlgo Account Alerts. If it is already On and still missing from the alert’s Send to section, check webhook availability with LuxAlgo before creating the alert.
The alert is live with no event in Log Check the market, live quote and trigger level.
Vela shows a delivery failure Open the delivery result. Check the URL and that you pasted the full JSON into the webhook’s Message.
Vela shows delivery but Bridge has no matching result Check the License ID, the demo account’s connection and the Signal Authentication key if enabled. Troubleshoot an alert
Bridge shows a rejection, or the step 5 trade is missing Check the License ID, authentication, broker symbol and the error in Bridge or the PineConnector EA’s Experts log in MT5. Troubleshoot an alert · EA errors

Before repeating a trade request, wait for the final result in Bridge Logs and check Trade and History in MT5 for the original order. If the result is unclear, troubleshoot the alert before sending again.

Cookie settings (opens in a new tab)