Author of the idea — Yury Reshetov, author of the mq5 code — barabashkakvn.
This is another kind of Martingale, because the Expert Advisor tries to fight back, expecting that the losing series will be replaced by a winning series.
Expert Advisor Input Parameters:
- ma_period_DeMarker — DeMarker oscillator period. Optimized with the values from 3 to 100 with step of 1.
- TakeProfit — take profit in pips. Optimized with the values from 10 to 100 with step of 1.
- StopLoss — stop loss in pips. Optimized with the values from 10 to 100 with step of 1.
- lots — lot size of the first order and all orders opened after a losing trade. The parameter is not optimized.
- losseslimit — limit the number of losing trades in a row. The parameter is not optimized. In case the number of losses reaches a limit, the EA stops opening new trades and sends a message e-mail.
- fastoptimize — fast optimization. The parameter is not optimized. If this parameter is true, then the built-in trading system will be optimized fast without using money management. During fast optimization, optimization and testing results will be different.
The EA works only at newly formed bars and open prices. There is no need to optimize it using Every tick mode.
Testing in the "Every tick based on real ticks" mode