A MetaTrader Expert Advisor is essentially a piece of code that automates trading operations in the world's most popular Forex trading platform, MetaTrader by MetaQuotes software. To fully understand what an Expert Advisor is, we must there learn a bit about how that code is created and what it can do.
An Expert Advisor (EA for short) is written in the MetaQuotes programming language (MQL for short). MQL is a visual based programming language that was created specifically for MetaTrader. It was designed to be easy to learn and it contains features that allow for quick and smooth coding of all the basic operations within the MetaTrader platform. This means that the programmer can create a code that can automatically perform pretty much anything that one can do manually in MetaTrader. Usually the code of an Expert Advisor contains some formulas to calculate indicator values, lot sizes, time of day and so on, that are then followed by the rules of an algorithmic trading system that has been turned into MQL code. Usually an EA performs all of its 'calculations and checks its' rules with every new tick of the currency pair it is running on. When the conditions of the trading system have been met it performs certain trading operation, such as opening a new trade, placing a pending order or adjusting stop loss and limit orders. All of this is of course decided by the programmer who coded the EA. It is easy to understand why it is absolutely crucial that EA's be properly coded, since everything they do depends on the code they operate. If the code is poorly written, the EA will make "mistakes" (or even worse) over and over again. Therefore most EA's should never be trusted with trading your real money, because most are programmed by amateurs that do not really know what they are doing. Ideally, you want the EA you use to be created by professional computer programmers.
Now that you know the basics about what an Expert Advisor actually is, let's take a look at how they operate in MetaTrader. The MetaTrader trading platform is very easy to use. It is simple and contains very basic functionality, while at the same time it offers a surprising amount of flexibility for the more advanced users. After you have put the.ex4 file (or.ex5, if using MetaTrader 5 instead of MetaTrader 4) into the "experts" folder of your MetaTrader platform, you will see the EA appear under "Expert Advisors" in the MetaTrader navigation field. All you have to do then to start running your EA is to open up a chart, choose your desired currency pair and time frame, and drag and drop the EA to the chart. Then a window will pop up, where you will in most cases have the opportunity to enter values for some variables of the Expert Advisor, in order to configure it according to your wishes. Usually you can choose what size or risk percentage to trade with, along with turning some features of the trading system on or off. As with every other aspect of the EA, it is up to the programmer who created it to decide what parts of the trading system the user can manually configure at this stage.
That is it! As long as you keep your MetaTrader platform running and it is connected to your broker's server, the Expert Advisor will run and trade automatically for you as the markets move. If you are using an Expert Advisor that has been coded correctly, and is based on a profitable trading system, with time you should see your account equity grow!