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

Exp_SilverTrend_Duplex - MetaTrader 5 Expert - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

Exp_SilverTrend_Duplex - expert for MetaTrader 5

Exp_SilverTrend_Duplex - expert for MetaTrader 5

Exp_SilverTrend_Duplex - expert for MetaTrader 5

Two identical trading systems (long and short positions) based on indicator signals Silver Trend can be configured in different ways in one Expert Advisor. For this purpose, all input parameters can be divided into two main groups:

 //+------------------------------------------------------------------------+
//|Input parameters of long trading EA |
//+--------------------------------------------------------+ Magic Number Input Unit L_Magic= Chapter 777 ; //L Magic Number
Enter double L_MM= 0.1 ; // L share of deposit for each transaction
Enter the margin mode L_MMMode=LOT; //L hand setting mode
//+------------------------------------------------------------------------+
//|Input parameters of short trading EA|
//+------------------------------------------------------------------------+
Input unit S_magic= Chapter 555 ; //S magic number
Enter double S_MM= 0.1 ; //S share of deposit for each transaction
Enter margin mode S_MMMode=LOT; //S batch setting mode

These two trading systems use different magic numbers and are absolutely independent of each other. Real financial markets are rarely symmetrical. Trading in rising and falling markets often requires absolutely different parameters of the same trading system. To configure the EA correctly, you should first test only one trading system and disable the second trading system using the relevant switches.

 Enter Boolean L_PosOpen= true ; //L allows entry into long positions
Enter Boolean value L_PosClose= true ; //L allows long positions to be closed

After that, do the same with the second system.

In order for the EA to run, the compiled SilverTrend.ex5 indicator file must be located in \MQL5\Indicators folder.

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

Exp_SilverTrend_Duplex - expert for MetaTrader 5 .

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

2016 USDJPY H6 test results:

Exp_SilverTrend_Duplex - expert for MetaTrader 5

Figure 2. Test results chart.

Exp_SilverTrend_Duplex - expert for MetaTrader 5

Figure 3. Example of a trade with asymmetric setup on the chart.


Attachment download

📎 tradealgorithms.mqh (223.62 KB)

📎 silvertrend.mq5 (23.74 KB)

📎 exp_silvertrend_duplex.mq5 (17.67 KB)

Source: MQL5 #20943

Verification code Refresh