# Send a test alert

> Place a test trade on a demo account first from the dashboard, then from a TradingView alert, and check every stage along the way.

Source: https://zb-connector.com/docs/get-started/send-a-test-alert/

You end this page knowing that each stage works: the EA, the dashboard and the TradingView alert. You test the EA first, so a TradingView problem cannot hide an EA problem.

> **Use a demo account first.** Run every step on a MetaTrader 5 demo account. Switch to a live account only after the go-live checklist is done.

**Before you start:** the EA is attached and shows **Status: Connected** ([install the EA](https://zb-connector.com/docs/install/install-the-ea/)). Find your broker’s exact symbol name and its minimum volume in MT5. The examples use `EURUSD` and `0.01`; yours may differ (for example `EURUSD.m`).

## Part A: test the EA from the dashboard

1.  Open **Send Command** in the dashboard and choose your license at the top.
    
2.  Choose **Long**. Enter your **Symbol**, a **Volume (lots)** equal to your broker’s minimum, and `test_1` as the **Position ID / Comment**. Send the command.
    
    > **What you should see:** The page confirms Command sent to the EA.
    
3.  Look at MT5 and the Experts log.
    
    > **What you should see:** A new position is open on your demo account, and the Experts log shows a line like Trade placed successfully. Ticket=… | long EURUSD | Lot=0.01 | … | posID=test_1.
    
4.  Open **Licenses**, then your license, and find **Command History**.
    
    > **What you should see:** The command is listed. A successful open normally stays Delivered: the trade itself shows in MT5 and under Accounts. Executed and Failed appear when the EA reports a result, which it does for closes, stop changes and failed opens.
    
5.  Close the test position: on **Send Command**, choose **Close by ID**, enter `test_1` and send it.
    
    > **What you should see:** The position closes in MT5, and the close shows as Executed in Command History.
    

If a step failed, see [the trade did not execute](https://zb-connector.com/docs/troubleshooting/trade-not-executed/).

## Part B: test the TradingView alert

1.  In TradingView, create an alert on a chart. For a quick test, pick a condition that will be met soon, and set the frequency to trigger **once** so it does not fire again.
    
2.  In the alert’s notification options, tick **Webhook URL** and enter:
    
    `https://dev.api.zb-connector.com/webhook/`
3.  Replace the message with the following, using your key, your symbol and your minimum volume:
    
    **Alert message**
    
    ```json
    {
      "license": "YOUR_LICENSE_KEY",
      "action": "long",
      "symbol": "EURUSD",
      "volume": 0.01,
      "positionID": "tradingview_test_1"
    }
    ```
    
    The message must be valid JSON: straight double quotes, no trailing comma. `volume` is in lots, and `positionID` is text in quotes. Create the alert.
    
4.  Wait for the alert to fire, then check the stages in this order.
    
    > **What you should see:** 1. TradingView. The alert log lists the alert. 2. Webhook. Its Webhook status shows the request succeeded. 3. ZB Connector. Command History lists the command at that time. 4. MT5. The Experts log shows Trade placed successfully with posID=tradingview_test_1, and the position is open.
    
5.  Close the position: send `closeByID` with `tradingview_test_1` from **Send Command**, or create a second alert with this message:
    
    **Close the test position**
    
    ```json
    {
      "license": "YOUR_LICENSE_KEY",
      "action": "closeByID",
      "positionID": "tradingview_test_1"
    }
    ```
    
    > **What you should see:** The position is closed in MT5 and Command History shows the close as Executed.
    

HTTP 200 from the webhook means **queued**. Only the later stages prove the trade ran.

## If it does not work

Go to the first checkpoint in part B that you did not see, and follow [find where the alert stopped](https://zb-connector.com/docs/troubleshooting/find-where-it-stopped/). It tells you what each stage means and where to look next. The most common causes are a wrong `license` value, a symbol name that does not match your broker’s, and an alert message that is not valid JSON.

## Next step

Work through the [go-live checklist](https://zb-connector.com/docs/get-started/go-live-checklist/). To build other messages, read the [commands overview](https://zb-connector.com/docs/commands/overview/).
