Skip to main content
Home / Guides / MetaTrader 5 / PFX Executor (part 2 of 3)
Guide · MetaTrader 5 · part 2 of 3 · about 15 minutes

Send a test alert to PFX Executor.Part 2 of 3: one alert, watched from start to finish.

Part 2 sends one test alert from TradingView and follows it through the website and into the terminal. Use a demo account. Every part of this chain is new until you have watched it work once, and the Strategy Tester cannot test alerts.

~15 minstart to finish
7 stepstick each one off
Demokeep the test on practice money
Watchedone alert, end to end
✓
Watch one alert, end to end.

If the alert is not on the website, the problem is the TradingView alert, not the EA. That one check saves most of the guessing. If a step doesn't look like the picture, that's normal: open the "Not seeing it?" box under it.

0

Before you start

Part 1 must be done, and the terminal must be on a demo.

Words you'll see. Route key = the word that links an alert to one EA. Instance = the field in the alert that carries the route key.
1

Create a test alert in TradingView

The alert sends a message to your webhook address.

  1. In TradingView, create an alert. Set Webhook URL to the address you copied in part 1.
  2. In the message box, use a body like the example below. Only action and symbol are required.
  3. The instance must equal your Route key. The indicator must contain the Accept alerts whose indicator contains setting.
{ "instance": "Demo-1", "indicator": "PFX", "symbol": "{{ticker}}", "action": "buy", "lots": 0.01 }
The example is a placeholder. Use your own Route key name, and a size you would accept. Maximum lot size on the EA still applies.
Not seeing it?

TradingView says the message is invalid. Check the body is valid JSON: quotes around every name, and commas between lines.

2

Fire the alert once

One alert, so you can follow it cleanly.

  1. Fire the alert once, for example by letting it trigger, or by using TradingView's test option if it has one.
  2. Do not create several alerts while you test. One is easier to follow.
Not seeing it?

I don't know how to trigger it. Set the alert condition so it is true right now, or wait for the condition you chose. Do not force it on a live account.

3

Check the website first

The alert log shows what arrived.

  1. On precisionfx.io, open Automation → Alert log.
  2. Find your alert. It should be listed with its action and symbol.
  3. If it is not listed, the problem is the TradingView alert. Fix that before you touch the EA.
Not seeing it?

The alert is not in the log. Check the webhook address in TradingView matches the one you copied, and that the alert actually fired.

4

Check the terminal acted

The Experts tab shows the EA collecting and acting.

  1. Open Toolbox → Experts in MetaTrader 5.
  2. Look for the EA collecting the alert, then acting on it.
  3. Check the order on the account, then close it on the demo.
The Strategy Tester cannot test alerts. It runs only a tiny demo cycle, so judge the Executor on live demo alerts, not on the tester.
Not seeing it?

The website shows the alert, but the EA does nothing. Turn on Verbose debug logging. The EA says why it skipped, and that is the first thing to read.

5

Check the symbol and the route

The two most common reasons a good alert does nothing.

  1. The symbol must exist at your broker with the exact same spelling.
  2. If your broker spells it differently, set Symbol aliases to translate it. For example, one broker's NAS100 might be US100.cash at another.
  3. The Route key must match the alert's instance exactly. A trailing space counts.
Not seeing it?

Only the symbol is wrong. Use Symbol aliases, then re-attach the EA.

6

Turn logging down when it works

Verbose logging helps while you set up. Turn it off after.

  1. Turn on Verbose debug logging while you set up, so the EA explains every skip.
  2. Once the test works, turn it off again.
Not seeing it?

The Experts tab is very busy. That is verbose logging. Turn it off once the test works.

Your safety nets

Three ways to keep the test safe.

1

Demo only

Keep this test on a demo account until you have watched it work several times.

2

Maximum lot size

Set it deliberately. It is your last line of defence.

3

One alert at a time

Test with one alert, then add more only once the first one behaves.

!

Before any live account

Test on demo first. Check symbol names, set maximum lot size deliberately, and read your firm's rules if the account is a funded or challenge account.

All done

You're set up.Nicely done.

Risk warning: Trading carries a high risk of loss and is not suitable for everyone. The Executor places real orders from alerts you send. A test on a demo is not a guide to live results. MetaTrader and MQL5 are trademarks of MetaQuotes Ltd.; PrecisionFX is not affiliated with or endorsed by MetaQuotes.