Exp_IBS_RSI_CCI_v4_X2 – EA MetaTrader 5

The Exp_IBS_RSI_CCI_v4_X2 trend-following trading system is based on the signals of two IBS_RSI_CCI_v4 indicators. The first indicator determines the direction of the slow trend based on the position of the main and signal lines. The second indicator determines the moment for opening a trade, when the lines are crossed or touched. The signal is formed when a bar is closing if two conditions are met:

  1. Signals of the fast and slow trend match;
  2. Direction of the fast trend has changed.

Input parameters of the Expert Advisor

//+-------------------------------------------------+
//| Input parameters of the EA indicator            |
//+-------------------------------------------------+
input string Trade="Trade management";    //+================ TRADE MANAGEMENT ================+  
input double MM=0.1;               //Share of a deposit in a deal
input MarginMode MMMode=LOT;      //Lot value detection method
input uint    StopLoss_=1000;      //Stop Loss in points
input uint    TakeProfit_=2000;    //Take Profit in points
input string MustTrade="Trade permissions";    //+=============== TRADE PERMISSIONS ===============+  
input int    Deviation_=10;       //Max price deviation in points
input bool   BuyPosOpen=true;     //Permission to enter long positions
input bool   SellPosOpen=true;    //Permission to enter short positions
//+-------------------------------------------------+
//| Input parameters of the filter indicator        |
//+-------------------------------------------------+
input string Filter="SLOW TREND PARAMETERS";    //+============== TREND PARAMETERS ==============+  
input ENUM_TIMEFRAMES TimeFrame=PERIOD_H8;  //1 Chart period for the trend
//---- Middle line parameters
input uint      IBSPeriod=5;
input  ENUM_MA_METHOD   MAType=MODE_SMA;
//---- RSI parameters
input uint   RSIPeriod=14;
input ENUM_APPLIED_PRICE   RSIPrice=PRICE_CLOSE;
//---- CCI parameters
input uint   CCIPeriod=14;
input ENUM_APPLIED_PRICE   CCIPrice=PRICE_MEDIAN;

input int      porog=50; //Threshold
//---- VKWB line filter parameter 
input  ENUM_MA_METHOD   MAType_VKWB=MODE_SMA;     
input int      RangePeriod_VKWB  = 25;
input int      SmoothPeriod_VKWB =  3;
//----
input uint SignalBar=1; //Bar index to get receive signal
input bool   BuyPosClose=true;     //Permission to exit long positions by trend
input bool   SellPosClose=true;    //Permission to exit short positions by trend
//+-------------------------------------------------+
//| Input parameters of the entry indicator         |
//+-------------------------------------------------+
input string Input="ENTRY PARAMETERS";       //+=============== ENTRY PARAMETERS ==============+  
input ENUM_TIMEFRAMES TimeFrame_=PERIOD_H1;  //2 Chart period for the entry 
//---- Middle line parameters
input uint      IBSPeriod_=5;
input  ENUM_MA_METHOD   MAType_=MODE_SMA;
//---- RSI parameters
input uint   RSIPeriod_=14;
input ENUM_APPLIED_PRICE   RSIPrice_=PRICE_CLOSE;
//---- CCI parameters
input uint   CCIPeriod_=14;
input ENUM_APPLIED_PRICE   CCIPrice_=PRICE_MEDIAN;

input int      porog_=50; //порог
//---- VKWB line filter parameter 
input  ENUM_MA_METHOD   MAType_VKWB_=MODE_SMA;     
input int      RangePeriod_VKWB_  = 25;
input int      SmoothPeriod_VKWB_ =  3;
//----
input uint SignalBar_=1;//Bar index to receive an entry signal
input bool   BuyPosClose_=false;     //Permission to exit long positions by signal
input bool   SellPosClose_=false;    //Permission to exit short positions by signal
//+-------------------------------------------------+

String variables containing text in the inputs code are included only for better visual display of the EA inputs window.

Alternative:  Historical Volatility - indicator MetaTrader 5

The IBS_RSI_CCI_v4_HTF indicators in the EA are only intended for a more convenient visualization of trends in the strategy tester, in other operation modes they are inactive.

In order to provide proper operation of the compiled Expert Advisor, you should add the compiled IBS_RSI_CCI_v4.ex5 and IBS_RSI_CCI_v4_HTF.ex5 indicator files to <terminal_data _folder>\MQL5\Indicators.

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 together with position opening. You can download more variants of the library at the following link: Trade Algorithms.

Alternative:  BlauErgodic_HTF - indicator MetaTrader 5

Default Expert Advisor’s input parameters have been used during the tests shown below. Stop Loss and Take Profit have not been used during the tests.

Fig. 1. Examples of deals on the chart

Fig. 1. Examples of deals on the chart

Testing results for 2015 on USDCHF, slow trend on H8, entry by fast trend on H1:

Fig. 2. Chart of testing results

Fig. 2. Chart of testing results


📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks