LossLess MA Advanced
The Expert Advisor's trading strategy is based on moving average crossings by the price. The algorithm includes the following functions:
- stop loss order trailing after reaching a certain profit;
- changing a position volume depending on the balance change;
- waiting out losing trades;
- closing unidirectional trades by breakeven;
- limiting losses;
- flat filter.
- Take profit - take profit value;
- Stop loss - stop loss value;
- Start trailing if profit > (pips) - trail a stop loss order if the profit exceeds the specified value; 0 - trailing disabled;
- Start with lot - initial position volume increased in proportion to the balance change;
- MA - moving average smoothing period;
- MA Shift - moving average shift relative to the current bar (cannot be less than zero);
- Bars amount - flat filter, number of bars above/below MA line;
- Close losses - close losing trades (yes/no). If "no", a take profit of the previous losing trade is moved to a trade open level (breakeven) when an opposite signal appears. If the previous trade is profitable, it is closed;
- ...maximum deals - maximum available number of floating losing trades. Trades are opened by opposite signals till the limit is reached;
- Close deals if total loss > (%) - close all open trades if their loss exceeds the specified value.
- Close couple orders by breakeven - close unidirectional trades by breakeven (yes/no);
- Slippage (in pips) - allowed slippage when opening a trade;
- Magic number - magic number of trades.
The EA was tested on the interval May 1 - October 1, 2016, every tick, М30. Testing results are shown on the screenshots.
EA demo signal
EURUSD М30, stop loss order trailing, losing trades are not closed - https://www.mql5.com/en/signals/222800