Exp_AdaptiveRenko_MMRec_Duplex - MetaTrader 5 Expert


Two identical trading systems (for long and short trading) based on Adaptive Renko charts. Indicator signals that can be configured differently in a single EA, capable of changing the volume of upcoming trades based on the results of previous trades of this trading system. This EA is a further development of the trading system Exp_AdaptiveRenko_Duplex , designed to adjust the size of opened positions.
For this purpose, the EA input block is added:
Input unit L_TotalMMTriger= 5 ; //L The quantity of the last buy transaction to calculate stop loss Input unit L_LossMMTriger= 3 ; //L loss buying transaction quantity to reduce MM Enter double L_SmallMM= 0.01 ; //L share of the margin in the transaction to prevent losses Enter double L_MM= 0.1 ; //L is the share of margin in a transaction during normal trading Enter the margin mode L_MMMode=LOT; //L hand setting mode
Input unit S_TotalMMTriger= 5 ; //S the quantity of the last sell transaction to calculate the stop loss Input unit S_LossMMTriger= 3 ; //S number of losing sell transactions to reduce MM Enter double S_SmallMM= 0.01 ; //S is the share of margin in the transaction when a loss occurs Enter double S_MM= 0.1 ; //S is the share of margin in a transaction during normal trading Enter margin mode S_MMMode=LOT; //S batch setting mode
In the case of such inputs, when choosing from the last 5 trades (3 of which were losses in a single direction), the EA opens the next trade in the same direction with a volume of 0.01 lots. If the last 5 losing trades are less than 3, the position will be 0.1.
In order for the EA to run, the indicator's compiled file Adaptive Renko.ex5 should be in <terminal data directory>\MQL5\Indicators .
The input parameters of the default Expert Advisor were used in the test shown below. Stop Loss and Take Profit were not used during testing.

Figure 1. Example trade with symmetrical setup on the chart.
2017 USDJPY H4 test results:

Figure 2. Test results chart.
Attachment download
📎 tradealgorithms.mqh (242.04 KB)
📎 adaptiverenko.mq5 (20.24 KB)
📎 exp_adaptiverenko_mmrec_duplex.mq5 (23.01 KB)
Source: MQL5 #23374
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •