Exp_ColorPEMA_Digit_Tm_Plus_MMRec_Duplex - MetaTrader 5 Expert


Two identical trading systems (for long and short trading) based on color PEMA_number 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 in this trading system. This EA is a further development of the trading system Exp_ColorPEMA_Digit_Tm_Plus . The opening and closing blocks for long and short positions have become completely independent; for each of the two trading directions, an EA input variable block has been added to be able to change the volume of the position to be opened:
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 compiled indicator file ColorPEMA_Digit.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.

2017 EURAUD H12 test results:

Figure 2. Test results chart.
Attachment download
📎 Exp_ColorPEMA_Digit_Tm_Plus_MMRec_Duplex.mq5 (25.91 KB)
📎 SmoothAlgorithms.mqh (130.2 KB)
📎 TradeAlgorithms.mqh (242.04 KB)
📎 ColorPEMA_Digit.mq5 (22.39 KB)
Source: MQL5 #23442
Exp_ColorPEMA_Digit_Tm_Plus_MMRec_Duplex - MetaTrader 5 Expert Pre-Use Tips
This page has been supplemented with structured instructions, focusing on the purpose of EA source code, MQL4/MQL5 platform compatibility, testing process and risk control. Before downloading or deploying, it is recommended to first determine whether it is consistent with your own variety, cycle and account environment.
Suitable for who to use
- Users who want to quickly screen EA source code and are willing to do simulation disk verification first.
- People who need to compare MT4/MT5 EAs, indicators, scripts or source code projects.
- Traders who wish to record backtests, parameters and risk boundaries before placing a trade.
Testing and risk control suggestions
- First verify the default parameters in the strategy tester or demo account, and then adjust the symbol, period, spread and trading period one by one.
- Scalping, grid, martin, and high-frequency strategies should focus on observing maximum drawdowns, consecutive losses, slippage, and trading frequency.
- It is not recommended to run any document directly on the real disk. At least observe the simulated disk performance for 2-4 weeks first.
FAQ
Can MT4 and MT5 be used interchangeably?
Usually cannot be used directly. EX4/MQ4 corresponds to MT4, EX5/MQ5 corresponds to MT5, and the source code needs to be compiled in the corresponding MetaEditor.
Is this resource guaranteed to be profitable?
cannot. EAs, indicators and scripts can only be used as trading tools, and the results depend on parameters, market environment, spreads, slippage and risk control.
What else can I continue to watch?
Forex EA download , foreign exchange indicator download , EA evaluation , MQL5 CodeBase .
English Search Notes
This page is also optimized for English search intent around Exp_ColorPEMA_Digit_Tm_Plus_MMRec_Duplex - MetaTrader 5 Expert . Related search terms include: MQL4 source code, MQL5 source code. Test any Forex EA, Expert Advisor, MT4/MT5 indicator, script or MQL source code with historical data and a demo account before live trading.
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •