This Expert Advisor implements the trading strategy EMA 8/18, which is used by many traders. Brief description of the strategy:
The purchase is determined when the EMA 8 indicator intersects with the EMA 18 indicator from the bottom up, while the price from the intersection has passed more than 50 points. Entry into the purchase is made when the price first touches the EMA 8, after that, when the price increases, the transaction is accompanied by a trailing stop in increments of 30-35p. For sales – everything is the same, only the opposite.
In the Expert Advisor, the parameters of the fast EMA and the slow one are adjusted (not always 8 and 18 is the best choice, since the market may have changed since the strategy’s existence). You can also configure other parameters (the value of the trailing stop, set the take profit, the number of points of price passage after the intersection of indicators, the maximum number of transactions after the intersection). And the settings for purchases can be made different from sales, since the price may go down a little differently. The recommended timeframe for this strategy is H1, but the flexibility of the settings allows you to use this strategy on other timeframes.
- Lots – lot size (if you specify 0, the percentage of available funds will be used – the following parameter);
- Percentage of free money – the percentage of free funds to open each new transaction, recommended from 1 to 10;
- MaxSpread – the maximum spread above which the order will not open;
- Magic (unique identifier) – a unique identifier (you need to specify different ones when several Expert Advisors are running in the same terminal);
- Take Profit buy – the closing price of the order when the level of profitability for purchases is reached;
- Stop Loss buy – the closing price of the order when the loss level for purchases is reached;
- Trailing stop (buy) after-move the stop loss after the price through such a number of points (for buying);
- Take Profit sell – the closing price of the order when the level of profitability for sales is reached;
- Stop Loss sell – the closing price of the order when the loss level for sales is reached;
- Trailing stop (sell) after-move the stop loss after the price through such a number of points (for sale);
- Period fast EMA – the period of the fast moving average;
- Fast EMA mode – fast moving average method;
- applicedprice1-price base for calculating the first moving average;
- Period slow EMA – the period of the slow moving average;
- Mode slow EMA-slow moving average method;
- applicedprice2-price base for calculating the second moving average;
- Distance after crossing – the distance that the price should go after crossing the moving averages;
- Max count trades after cross EMA – the maximum number of trades after crossing the moving averages;
- CandlesFactor-coefficient for determining a bullish or bearish candle (if it is set to 0, it is not used);
- CountCandles – the number of candlesticks to search for a bullish or bearish pattern;
- CandlesVolume – number of candles for volume comparison;
- PeriodATR – period of the Average True Range indicator;
- MinLevelATR – minimum level of the Average True Range indicator;
- Trading start hour – trading start hour;
- Trading end hour – trading end hour;
- ShowInfo – show information (slows down testing when enabled).