1. An Introduction to Expert Advisor

Bookmark and Share

1. What is Expert Advisor?

In MetaTrader 4, there is a function called “Expert Advisor”, which allows the computer to automatically analyze one chart and to go on trading automatically using that result.

For example, by using Expert Advisor you can do the following things.

  1. In a USD/JPY daily chart;
  2. If USD eclipsed the top price of the previous 10 days, take one position in long and clear up short position.
  3. If USD fell below the lowest price of the previous 10 days, take one position in short and clear up long position.

The example above is really simple, but by combining these kinds of rules you can make your own “investing robot”.

2. Process of Producing a Program (Making Trade Rules)

A typical way of making your own program is like this:

  1. Think of a trading rule
    - Ex. “If it keeps on moving to one way for __ days, make an order in that direction”.
  2. Turn the rule into a program.
    - Describe the trading rule in a programming language.
  3. Back test the program
    - Test the program using the past data.
  4. Operate the program
    - Operate the program with your own deposit.

Please note that “3. Back testing the program” is especially important.

It is safe to assume as desirable when the past data carry the same trends as the predicted future price fluctuation. For example, a pattern such as high likelihood of a price entering a declining trend when it goes below the support line can be thought of as universally true.

Therefore, a program which did well in the past is very likely to do well (i.e. make profit) in the future as well. Of course, you always have to keep in mind the possibility of over-fitting.