The expert allows you to build a trading system based on an arbitrary set of technical indicators MT5. The EA uses the following signals:
- OpenBuy / OpenSell - opening positions;
- StopBuy / StopSell - closing positions;
- TakeProfitBuy / TakeProfitSell - get TP levels;
- StopLossBuy / StopLossSell - getting SL levels;
- NoLossBuy / NoLossSell - transfer to the breakeven state;
- MinProfitBuy / MinProfitSell - closing part of a position;
- CancelBuy / CancelSell - allow a repeated signal to open.
Each signal is formed from several consecutive steps (for Open - 10 steps, for the others - 2 steps), set via input parameters. Each step contains the following fields:
- indicator (drop-down list) - select the indicator from the MT5 list, including CUSTOM, as well as, in addition, the Open, Close, High, Low prices, the current Bid and Ask prices, the lowest Low and the highest High of the specified interval (Lowest, Highest);
- tf (drop-down list) - select the time period;
- action (drop-down list) - step action:
- EmptyAction is an empty action;
- Above - more than the previous one;
- Below - less than previous
- AboveArg - more argument;
- BelowArg - less argument
- AddPoint - adding a specified value of points
- NotEmpty is not equal to 0 and EMPTY_VALUE
- CrossUp - upward intersection of the previous indicator;
- CrossDown - downward intersection of the previous indicator;
- MoveUp - move up the current indicator;
- MoveDown - downward movement of the current indicator;
- param - parameters line separated by commas (int - only numbers, double - numbers with a dot separator, bool - true or false, string - framed with a single quote), for the CUSTOM indicator, the first parameter should be a string with the indicator name;
- bar - bar index;
- line - buffer index;
- arg - step argument (double).
In the input parameters, the name of the steps is encoded with delimited text: <signal name> _ <step> _ <parameter>, for example, OpenBuySignal_0_indicator is a parameter that sets the type of indicator for step 0 of the OpenBuy signal.
The list of parameters for setting up trading:
- startLot - fixed volume of deals;
- riskPercent - percentage to calculate the volume of the remaining funds (with a non-zero SL);
- takeProfit - fixed TP;
- takeProfit_factor - calculation of TP but SL level
- stopLoss - fixed SL;
- noLoss - fixed level of transfer to breakeven;
- noLoss_factor - breakeven level as a percentage of available funds;
- minProfit - fixed level of partial closure;
- minProfit_percent - level of partial closure as a percentage of available funds;
- minProfit_factor - size of partial closure
- trailStop - fixed trailing level;
- trailStop_factor - trailing level from TP level;
- trailStep - trailing step;
- numOrders - the number of transactions in one direction;
- bothOrdersDir - the resolution of Buy transactions in the presence of Sell and vice versa.
Parameters that have fixed values are calculated on 4-digit quotes and automatically recalculated for 5-digit ones.
In the default settings of the advisor, the following strategy is configured on the moving averages MA (8), MA (24), MA (72). For purchase transactions:
- fast moving above average, average above slow;
- the last candle is bearish, closes below the fast moving at a distance of more than 15 points above the slow one;
- a buy deal is opened with the SL level 2 points lower than the slow moving one, TP is 2.5 times the SL;
- the volume is calculated from the specified 3% risk per trade, when making a profit of 1.5% of the balance of funds - transfer to breakeven and closing half of the volume
- Trailing is not half TP and closing half of the volume when receiving each subsequent 1.5% profit.
Transactions for sale - mirror. In the video - the results of the strategy run in the tester.
See the articles.