The Strategy Tester is available in both MetaTrader 4 and MetaTrader 5. It is a handy tool that allows you to test and optimize trading strategies. Additionally, it also allows you to test the performance of custom indicators in visual mode.
The Strategy Tester consists of the following windows: Settings, Results, Graph, Report, Log, Optimization Chart, Optimization Results.
You can find out more information via this page.
Please note: The Strategy Tester may not display an accurate value, as it doesn't take into account the time of arrival to the server of the order opening, as well as possible slippage and other factors.