Strategy Tester in pips
This tool for MetaTrader 4 is specifically engineered to streamline your trading operations. This Expert Advisor serves as automated trading software. It is utilized to monitor financial markets and execute trades based on predefined algorithmic rules, enabling precise position management without the need for constant manual oversight.
How to Setup and Use Strategy Tester in pips
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
Description & Settings
The code was created because the main strategy tester did not meet my expectations.My EAs trades on all symbols and everything depends on the sum of pips, not on the currency. Additionally, symbols have different pip values, so I needed to systematise the results. Another issue is that the standard tester uses current swap points, which made the results seem random to me. In recent months, swap points have changed more than before. In addition, brokers have different swaps. My tester systematised everything.
The results are pre-filtered: rule1,2,3. Of course, you can add your own.- rule1 is in the maxDD function and depends on Lots.- rules2 and 3 are checked in the AnalyzeTrades function before being sent for save.
This EA is just an empty sketch with ready-to-use functions. The JavaScript functions are in a separate file. You can change them as you wish, the file will not be overwritten.You can check it in two ways. Insert the contents of OnTick() from MACD sample.mq4 and adjust the variables, or faster download the working EA and apply the attached optimisation set.
procedure sequence:- set optimisation parameters- enable StrategyTester in pips- set filters- disable “test selected results”run optimisationopen the html file, sort, select/deselect results, save the .csv file to csv_done folder- deselect optimisation parameters- enable “test selected results”- select “stage1 results array”run optimisation
For ShortTrendReversal the two steps above are in the attached .set files.
Finally, before you enable optimisation, disable genetic optimisation. Additionally, if you change the optimisation parameters in the first step, you must clear the tester's cache, as the tester skips calculations, and these are essential.
below windows script for cleaning tester cache and last created file