Welcome, fellow traders! Today, we're diving into an exciting trading tool: the Exp_BrainTrend2_V2_Duplex. This nifty Expert Advisor offers two identical trading systems that you can set up in different ways, all under one roof.
Understanding the Input Parameters
The input parameters are neatly divided into two categories:
- L: These parameters manage your long positions.
- S: These parameters take care of your short positions.
//+----------------------------------------------+ //| Input parameters of the EA for long trades | //+----------------------------------------------+ magic numberinput uint L_Magic=777; //L magic number input double L_MM=0.1; //L share of a deposit per trade input MarginMode L_MMMode=LOT; //L lot setting mode //+----------------------------------------------+ //| Input parameters of the EA for short trades | //+----------------------------------------------+ input uint S_Magic=555; //S magic number input double S_MM=0.1; //S share of a deposit per trade input MarginMode S_MMMode=LOT; //S lot setting mode
Each trading system operates independently thanks to different magic numbers. This setup is crucial because the financial markets are rarely in perfect sync. Often, you'll need distinct parameters to trade effectively in a rising versus a falling market.
Testing Your Strategy
Before diving in, it’s wise to test one system at a time. Disable the other system using the relevant switches while you get the hang of it. Here’s how you can set permissions for your long positions:
input bool L_PosOpen=true; //L permission to enter long positions input bool L_PosClose=true; //L permission to exit long positions
Once you're comfortable with the first system, repeat the process for the second.
Getting Started
For the Expert Advisor to function correctly, make sure to save the compiled indicator file BrainTrend2_V2.ex5 to your <terminal_data_folder>\MQL5\Indicators directory.
The default input parameters below were used during tests. Note that Stop Loss and Take Profit settings were not applied in these tests.

Fig.1. Examples of deals on the chart with symmetrical settings.
Here are the test results for GBPJPY on the H6 timeframe over the year 2016:

Fig.2. Testing results chart.

Fig.3. Examples of deals on the chart with non-symmetrical settings.
Comments 0