Autotrading
Autotrading, or algorithmic trading, uses computer programs to execute trades automatically based on set criteria. These algorithms analyze market conditions and technical indicators to place trades quickly and precisely, removing emotional decision-making. Autotrading can backtest strategies on historical data to optimize performance and reduce risks. This approach allows traders to seize market opportunities 24/7, ensuring consistent and timely trade execution, enhancing efficiency, and potentially increasing profitability.
Algo-trading came about as a means to eliminate the human factor and monetize market imbalances. But the logic at base is the same as what we’ve reiterated time and again throughout this course: identify a potential market opportunity, formulate a strategy and carry out said strategy. All three can be automated. And you won’t need a Cray supercomputer to do that. MT5 is more than sufficient.
On it, we have technical tools that can define a mean value and identify a departure from that mean. We have tools that can define potential targets and we have orders to automate the opening and closing of our orders. We can even define risk-reward ratios and so forth. And we have a huge community of programmers who create codes, algorithms and trading bots in a special programming language that talks directly to the Metatrader platform. It’s called MetaQuotes Language, or MQL.
There are 3 types of programs we can write with MQL – custom indicators, scripts and expert advisers. A custom indicator is precisely what it says: just as we have pre-formulated technical indicators in MT5, we can create our own. Instead of merely changing the PARAMETERS of an indicator, we can actually change the way indicators work on the mathematical level. A script is a piece of code that performs an instruction once a requirement is fulfilled – somewhat like a pending order, only the requirement will be more than simply achieving a price specific level.
Expert advisers are a little more complex, and we’ll now take a closer look at them. These are mini robots that scan a market and undertakes a set of trading activities when requirements are met.
Now, you don’t NEED to be a programmer to create an expert adviser, but it helps. You can simply use the MQL wizard that guides you through a series of steps
When you open the wizard, it applies the current chart and timeframe as a default, but these can be changed.
Now, you don’t need to start from scratch – there are 50 EAs already in the wizard. You can select one or combine several to create your own. Each one includes a set of instructions on when to open a position, how to manage it once its open, and money management – how much of your equity to invest in any position.
Next, select up to 64 technical indicators you want to apply and change the default values if you feel the need to.
Finally, set your risk management tools, opening and closing orders and click finish. The wizard will compile the code for you and you’re ready to go.
It’ll appear under your list of EAs and you can apply it immediately. Click on it, change the parameters if needed and click on start.
You can even add your adviser to the market if it’s good enough to sell. MQL is more than just a language, it’s an entire community of traders and developers. They’ll test your EA and if it passes – they’ll approve it for publication.