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 Expert Advisor | Exp_SpearmanRankCorrelation_Histogram

A trading system based on the signals of the SpearmanRankCorrelation_Histogram indicator. The signal is formed at the bar Close. There are three possible position entry and exit algorithms.

  1. Entry and exit at a zero breakout;
  2. Entry in overbought and oversold zones, exits at zero breakout;
  3. Entry and exit only in the overbought and oversold zones.

To set one of these options, change the value of the following input parameter:

input TradeMode Trade_Mode=ENUM_TRADE_MODE_1;    //Entry and exit algorithm 

For the generated EA to operate correctly, the compiled SpearmanRankCorrelation_Histogram.ex5 indicator file should be available in the <terminal_data_directory>\MQL5\Indicators folder.

Note that the TradeAlgorithms.mqh library file allows using Expert Advisors with brokers who offer nonzero spread and the option of setting Stop Loss and Take Profit during position opening.

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

MetaTrader Experts, Indicators, Scripts and Libraries

Fig. 1. Example of trades on the chart

Testing results for 2017 on EURJPY H4:

MetaTrader Experts, Indicators, Scripts and Libraries

Fig. 2. Testing results chart

23279