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

Exp_ColorMaRsi-Trigger_MMRec_Duplex - MetaTrader 5 Expert

author EAcpu | 2 reads | 0 comments |

Exp_ColorMaRsi-Trigger_MMRec_Duplex - expert for MetaTrader 5

Exp_ColorMaRsi-Trigger_MMRec_Duplex - expert for MetaTrader 5

Exp_ColorMaRsi-Trigger_MMRec_Duplex - expert for MetaTrader 5

Exp_ColorMaRsi-Trigger_MMRec_Duplex - expert for MetaTrader 5

Two identical trading systems (for long and short trading) are based on ColorMaRsi - indicator signals whose triggers 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 obtained by further complicating the Exp_ColorMaRsi-Trigger_Duplex trading system by changing the volume of the position to be opened.

For this purpose, the EA input parameters block was 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 ColorMaRsi-Trigger.ex5 should be located in in \MQL5\Indicators.

The input parameters of the default Expert Advisor were used during testing as shown below. Stop Loss and Take Profit were not used during testing.

Exp_ColorMaRsi-Trigger_MMRec_Duplex - expert for MetaTrader 5

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


2016 AUDUSD H6 test results:

Exp_ColorMaRsi-Trigger_MMRec_Duplex - expert for MetaTrader 5

Figure 2. Test results chart.


Attachment download

📎 tradealgorithms.mqh (237.01 KB)

📎 colormarsi-trigger.mq5 (15.01 KB)

📎 exp_colormarsi-trigger_mmrec_duplex.mq5 (22.96 KB)

Source: MQL5 #23292

Verification code Refresh