https://mql5tutorial.com/?s=backtest
In this video, we will run the first automated test. If you click on the Expert Advisor folder, you will see some files. And an example folder. Now please click on the Expert Samples folder and in the examples you will find an Expert Advisor called Moving Average. Now let's click on View, Strategy Tester or press Ctrl and R on your keyboard. And now you should see the Strategy Tester panel here and here you want to select the Moving Average Ex Five file. Select a currency pair here, select the 1-minute chart. That's the M1 chart. Now let's change the data quality to 1-minute OHLC, that's opening highs, lows and closing prices, and click Start. And this is what you can expect from the built-in strategy tester example. That's the moving average. I think you will agree with me that there is plenty of room for improvement here. Let's go back to the settings, enable visualisation mode and start another test. And now you can watch the simple Moving Average expert advisor trade. And if you spend enough time, you might notice that your account balance is continuously decreasing. I'll speed this up for you. It is 3 January and we have made a loss of about $150. Now you know how to start your first MQL5 backtest and trade the Moving Average Ex Five file. This is included by default in the MetaTrader5 example folder. And I promise you, it will produce a loss. And in the next few videos, we'll change that.