To discuss how to run the tester, we'll start by creating an example case. So this can also mean how to make a trading robot using this software.
This time we will use the light case example first by using a candlestick chart. So that we do not get lost then we use other sources. In this case I am referring to www.candlesticker.com. I will only show snippets of images from these sources, for more details you can visit the web site.
This time we will make an example case for long positions and an example case for short positions
As you can see in Figure.1, the data that I use here is the latest data when this document was created, From 18-Oct-2021 to 09-Jun-2022. In the example source using the daily time frame (D1). So we use the same time frame.
In the example above, actually the two are not exactly the same, but it is very rare to find a pattern that is truly the same. So the pattern described by the Candlesticker we use as an initial clue only. OK, let's start with the steps for making the trading robot.
1.Create a new command document.
2.Choose the default time frame to D1 ( Daily ), because the chart we are observing is a chart with a daily time frame.
3.Because it is required to apply to conditions of a downward price trend, we need to activate the price trend filter. Then Add a downtrend condition, by clicking the Add button. Then create a trend with variable values as shown.
4.Create Fibonacci Retracement with parameters as shown. This is not really a filter because there are no conditions that must be met from the parameters used, but we will use the values later.
5.Activate the Candlestick filter and add a candle type
For a candle with index 1, as shown in the chart on the candle, it can be seen that there is a difference in value between the opening and closing (opening 1.11432 and closing 1.11487, a difference of 55 points. 2022-28-01), even though our previous definition of a doji is that the opening and closing must be the same. Therefore, we use the deviation approach, fill in the deviation with a value of 100 points, so that the difference in values up to 100 points is considered the same
Activate Range on the Average tab, then select limit(%) and select a minimum limit of 0 and a maximum of 100 to ensure that the index 1 candle will not be a large candle
Activate Ask on the Price Position and Progress Bar tab, then enter the value as shown above. Provide a deviation of at least 2x the spread to ensure the robot will open a position after the price is above the highest price of the index 1 candle, as indicated in the candlestick image
Select Candlestick with code number 104 then click Add button, repeat this step for code number 106, 107, and 108.
Disable Ask, Range and return to zero Deviation which was previously enabled at index 1 and then enter index value to 2
Select the Bear tab and enter a bear candle with code number 300
If all types of candles have been entered correctly then click the OK button
Because we use more than one index candle and the conditions must be in a series, then we must activate the "Turn On Group Filter"
6.Go to the "Auto Trading" tab and activate "Open Position", then select the "Buy (Market)" order.
7.Enter the time limit for opening a position
8.The volume is filled according to your taste, you can start with the smallest value of 0.01 lot. This time I used 0.1 lot
9.Stop Loss can be filled with range values or dynamic values such as candlestick price positions, Fibonacci retracements, or estimated trend values. This time we will use the lowest value of the Fibonacci retracement, because based on the candlesticker instructions we should choose the lowest value of the candle at index 1, However, sometimes similar conditions are also found, but the lowest price of the 2nd index candle is smaller than the 1st index candle. That's why in the previous step we added unconditional Fibonacci Retracements.
10.Take Profit. On the chart it appears that the price may rise by more than 3000 points. So it's quite realistic if we take advantage of at least 2/3 of that value or 2000 points
11.Trailing Stop. Even though we have put a take profit, there is nothing wrong if we also combine it with a trailing stop. Also here I'm using a partial close, to complete our example.
12.Then click the Save button to save the Algorithm command file
Next, a confirmation will appear whether the file will be set as a file to be tested or not.
Answer yes will bring up the next information.
13.Next, run your MT5 which has "f(x)BaS Creator" installed in it. Then go to the "Tools" menu and then "Options"
14.Click the "Expert Advisors" tab. Then make sure "Allow dll" is checked.
Please note that in contrast to "f(x)BaS AUTO" which does not require dll, "f(x)BaS Tester" requires it, because some functions such as displaying message on screen cannot work without dll.
15.Next, select the "View" menu and enter the "Strategy Tester" menu
16.In the "Overview" section select "Visualize"
17.In the "Settings" section, adjust the fields as shown in the image, then click the "Start" button. Wait until your computer finishes the test results