What is an expert advisor?
An expert advisor is a program that trades a set of rules for you inside the platform. It carries out the rules without hesitation, and it carries out bad rules just as faithfully.
- Level 11 Your Trading Plan
- 第 21 课,共 25 课
- 阅读约 5 分钟
- 2 道题
An expert advisor, or EA, is a program that runs inside a trading platform, reads the prices and places, changes and closes orders by fixed rules. “Expert Advisor” is MetaTrader’s name for it. cTrader calls the same thing a cBot, TradingView calls a set of tested rules a strategy, and “trading robot” and “bot” are the everyday words. An EA is a trading system written in code.
What is inside one
The parts are those of section 11.3: a setup, an entry, a stop, an exit and a size, each written as an instruction. Level 2 noted the languages: MQL4 for MetaTrader 4 and MQL5 for MetaTrader 5. cTrader’s cBots are written in C# or Python, and TradingView’s strategies in Pine Script. A program written for one platform does not run on another.
What automation removes and what it leaves
| It removes | It leaves |
|---|---|
| Hesitation and late entries | The need for an edge. It runs losing rules as exactly as winning ones |
| Signals missed while you sleep | Every cost: spread, commission, swap and slippage |
| Mistakes in the size sum | Monitoring: connection, platform updates, errors, unusual markets |
| A moved stop, for as long as it runs | The trader’s hand on the switch |
The last row matters most. An EA follows the plan until its owner turns it off, and owners turn robots off after a losing run. Level 12 covers that decision.
It runs only while the platform runs
MetaTrader’s help lists turning off the platform, or closing the chart the EA is attached to, among the ways an EA is shut down. A robot on a laptop stops when the laptop sleeps. A stop loss already held at the broker stays in force. A trailing stop or exit rule that lives inside the robot does not run. For that reason EAs are usually run on a rented server that stays on, which adds a monthly cost.
The same robot at two brokers
Results differ between brokers for reasons outside the code.
- Spread, commission and swap differ.
- Fills differ in speed and slippage.
- Servers keep different clocks, so four-hour and daily candles begin at different hours. A rule on candle closes then sees different candles and takes different trades.
- Symbol names, contract sizes and the smallest allowed stop distance differ.
A robot tested on one broker’s prices has to be tested again on the account it will trade.
Where it fits
Automation comes after testing, never in place of it. The example system of this level could be coded exactly as written, and it would then lose money after costs without a single late entry. The next lesson applies section 11.4 to robots, including bought ones.
Key points
- An expert advisor is a trading system written as a program that runs inside a platform.
- MetaTrader calls it an Expert Advisor, cTrader a cBot and TradingView a strategy.
- Automation removes hesitation and missed signals. It leaves the need for an edge, the costs and the monitoring.
- An EA stops when the platform stops, and the same EA gives different results at different brokers.
快速检查
这些问题不计入你的测验分数。
Common mistakes
- Expecting the robot to supply the edge. It supplies execution. The rules still have to be worth executing.
- Leaving it unwatched. A lost connection, a platform update or a change in the broker’s conditions can stop it or change what it does.
- Running it on a different broker without retesting. Candle times, spreads and swaps differ, and so do the trades.
- Switching it off after each losing run and on after each winning one. The owner then trades a different system from the one that was tested.
Another example
A robot is run on a rented server that costs 20 dollars a month. On an account of 2,000 dollars that is 1% of the account every month, or 12% a year, before a single trade is placed. The robot has to earn that much after its trading costs to leave the account where it started. On an account of 20,000 dollars the same server is 0.1% a month. Fixed monthly costs, like fixed subscriptions, weigh on small accounts first.
Questions people ask
What is algorithmic trading in forex?
It is trading carried out by a computer program that follows written rules, with no person deciding each order. For a retail trader that usually means an expert advisor running on a platform. The program can watch the market without rest and act at once, and it has no judgement beyond its rules.
Do I need a VPS to run an expert advisor?
Not strictly. An expert advisor runs wherever the platform is running, including a home computer. It stops when that computer sleeps or loses its connection, so anyone running a robot around the clock usually rents a server that stays on. That adds a monthly cost to count against results.
What is the difference between an expert advisor and an indicator?
An indicator calculates and draws something from prices and cannot place trades. An expert advisor can open, change and close orders. Many expert advisors use indicators inside their rules, and an indicator with alerts still leaves the order to the trader.
Do expert advisors work on all brokers?
A MetaTrader expert advisor will usually load on any broker’s MetaTrader of the same version. Its results will differ, because spreads, commission, swap, execution and candle times differ between brokers. Some brokers also restrict certain automated methods in their terms.
无需账户即可免费阅读课程。登录后 PipCircle 会记住你停下的位置、保存测验分数并颁发徽章。 免费登录
Trading foreign exchange and CFDs carries a high risk of losing money. PipCircle Learn is education and is not investment advice.