Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Indicator | Exp_NRTR_Duplex

Two identical trading systems (for long and short positions) based on the signals of indicator NRTR, which can be differently configured within one EA. For this purpose, all inputs of the EA are divided into two large groups:

  1. If their names start with L, these are inputs to manage long positions;
  2. If their names start with S, these are inputs to manage short positions.
//+----------------------------------------------+  //| EA input parameters for long positions       |  //+----------------------------------------------+  input uint    L_Magic=777;          //L magic number  input double  L_MM=0.1;             //L share of a deposit in a deal  input MarginMode L_MMMode=LOT;      //L lot size detection method  //+----------------------------------------------+  //| EA input parameters for short positions      |  //+----------------------------------------------+  input uint    S_Magic=555;          //S magic number  input double  S_MM=0.1;             //S share of a deposit in a deal  input MarginMode S_MMMode=LOT;      //S lot size detection method  

These two trading systems use different magic numbers and are absolutely independent on each other. Real financial markets are rarely symmetrical, so it is often a case that absolutely different parameters of the same trading system are required for bullish and bearish trading. For a convenient EA setting, you should initially test only one of the two trading systems, having disabled the second one using relevant switches.

input bool    L_PosOpen=true;       //L permission to enter long positions  input bool    L_PosClose=true;      //L permission to close long positions  

Upon having set up the first system, you should enable and set up the second one only.

For the EA to operate, the compiled NRTR.ex5 indicator file must be in the <terminal_data_folder>\MQL5\Indicators folder.

The default EA inputs were used in tests below. Stop Loss and Take Profit were not used in testing.

MetaTrader Experts, Indicators, Scripts and Libraries

Fig 1. Exemplary trades in a chart with symmetrical settings.

Test results for GBPJPY H4 over the year 2016:

MetaTrader Experts, Indicators, Scripts and Libraries

Fig. 2. Testing results chart.

MetaTrader Experts, Indicators, Scripts and Libraries

Fig. 3. Exemplary trades in a chart with non-symmetrical settings.

21183

Best MetaTrader Indicators + Profitable Expert Advisors