Description of work
The expert advisor of class C3 works using an averaging grid. When a signal from the built-in indicator appears, the expert advisor opens a position, sets the takeprofit and the level for opening an averaging position. When the grid is fully opened, the expert advisor sets a stoploss. Only one grid can be opened in the market.
Note: before running the expert advisor, the settings need to be optimized for a specific instrument and timeframe.
Expert advisor settings
General settings
Timeframe
The parameter sets the timeframe on which the expert advisor will work. The parameter is needed if you switch the timeframe while the expert advisor is working, and the expert advisor will work with the timeframe that is set in the settings.
Example: the expert advisor is working on H1, you switch the timeframe to D1 to see the global situation, but the expert advisor continues to work on H1. Although, to evaluate the chart, you can use another chart on which the expert advisor does not work.
Note: if you select the current parameter from the list, the expert advisor will work on the timeframe that is currently active. The parameter is useful when testing on different timeframes, so as not to switch the parameter each time when changing the timeframe for testing.
Magic
The parameter sets a unique identifier for each open position. This parameter is needed if in the future you want to look at the history of transactions with a specific magician in order to assess the profitability of the trading strategy. A magic is assigned to an open position and is stored in the trading history.
Example: you have the same expert advisor working, but with different settings, for example, one expert advisor works with breakeven turned on, and another with breakeven turned off, since the expert advisor is the same, the Magic parameter will help distinguish positions opened by the expert advisor with breakeven turned on from positions with breakeven turned off.
Note: for positions opened manually, the terminal automatically sets the magic = 0, so it is better not to use 0 as a magic.
Money management settings
Position volume
The parameter sets the volume of the position with which the expert advisor opens a position.
Note: set the correct volume for the instrument on which the expert advisor will work. It must be greater than or equal to the minimum volume, less than or equal to the maximum volume, and be a multiple of the volume step. To do this, you can view the specification of the tool, read the instructions.
Position opening settings
This group contains the settings of the indicator that supplies the signals. The settings can be viewed from the specific indicator that the expert advisor works with.
Position closing settings
StopLoss
The parameter sets the distance from the opening price to the loss limit price.
Calculation formula:
For the Buy position: opening price – (StopLoss x point size)
For the Sell position: opening price + (StopLoss x point size)
Example: StopLoss = 100, position opening price = 1.08000, stop loss for the Buy position will be set at 1.07900 (1.08000 – (100 x 0.00001)), for the Sell position – 1.08100 (1.08000 + (100 x 0.00001)).
Note: The parameter is required and must always be greater than 0.
TakeProfit
The parameter sets the distance from the opening price to the profit taking price.
Calculation formula:
For the Buy position: opening price + (TakeProfit x point size)
For the Sell position: opening price – (TakeProfit x point size)
Example: TakeProfit = 100, position opening price = 1.08000, takeprofit for the Buy position will be set at 1.08100 (1.08000 + (100 x 0.00001)), for the Sell position – 1.07900 (1.08000 – (100 x 0.00001)).
Note: The parameter is required and must always be greater than 0.
The point size can be viewed in the instrument specification or on the chart itself, for example, the EURUSD pair has a point size of 0.00001 (5th quotes), the USDJPY pair has 0.001 (3rd quotes).
Grid settings – grid settings
Positions total
The parameter sets the number of open positions in the grid.
Distance between positions
The parameter sets the distance between the positions in the grid. It is measured in points.
Subscribe to the MA7 Trading channel to receive notifications about new programs, updates and other information.
Ask questions in the profile on the MQL5.