Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Exp_ColorMETRO_MMRec_Duplex - MetaTrader 5 Expert

author blogger | 579 reads | 0 comments |

Exp_ColorMETRO_MMRec_Duplex - expert for MetaTrader 5

Exp_ColorMETRO_MMRec_Duplex - expert for MetaTrader 5

Two identical trading systems (for long and short trading) are based on 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. The Expert Advisor is the result of a further development of the Exp_ColorMETRO_Duplex trading system, the purpose of which is to be able to change the number of open positions.

The following Expert Advisor input block has been added for this purpose:

 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 Expert Advisor to run, you should move the compiled ColorMETRO.ex5 indicator file to <terminal data directory>\MQL5\indicators .

The EA default input parameters are used in the following tests. Stop Loss and Take Profit were not used in the test.

Exp_ColorMETRO_MMRec_Duplex - expert for MetaTrader 5

Figure 1. Example of a trade with symmetrical setup on the chart.


2017 EURUSD H4 test results:

Exp_ColorMETRO_MMRec_Duplex - expert for MetaTrader 5

Figure 2. Test results chart.


Attachment download

📎 tradealgorithms.mqh (237.01 KB)

📎 colormetro.mq5 (18.16 KB)

📎 exp_colormetro_mmrec_duplex.mq5 (21.36 KB)

Source: MQL5 #23203

Refresh