Expert Advisor, indicator or script: which do you need?
Choose an Expert Advisor, custom indicator or MetaTrader script based on when it should run and what actions it needs to take.

Start with a sentence that specifies a trigger and an action. “At bar close, mark the signal” and “at bar close, open an order if the spread allows it” can use the same data and still call for different kinds of software.
Use an Expert Advisor to manage trades
An Expert Advisor (EA) stays active on a chart and can respond to terminal events. Use it when the software needs to decide when to submit, modify or close orders without you executing each action. A moving-average strategy might first check for an existing position on the same symbol before placing a new order.
Specify how it should handle rejected requests and what it should do if the terminal restarts with open positions. Both are part of the EA’s expected behavior.
Use an indicator to see or receive a signal
A custom indicator turns data into lines, chart markers, values or alerts. If you want to review each signal before trading, an indicator can cover the full workflow. If an EA needs to use the result, agree on which value it should read and when it becomes final. An intrabar condition may disappear before bar close, leaving a different signal on the historical chart.
A simple acceptance case is to mark specific bars and compare the indicator’s output against the expected values for each one.
Use a script for a one-off task
A script is useful for an action you start on demand. It might export data or close orders that match a symbol filter. Before automating an irreversible action, define the filters, whether a confirmation is needed and how the script should report which operations completed.
What to put in your brief
- The platform, symbol, timeframe and account type where relevant.
- The event that should trigger the tool and the data it needs.
- The expected action and the conditions that should block it.
- One example that should trigger and one that should be skipped.
- Whether you need an alert, an order, a numeric output or a file.
The MQL5 program execution reference explains how each program type runs in MetaTrader 5.


