Unlocking the Potential of the Exp_X2MA_JFatl System for MetaTrader 5

Mike 2017.01.20 01:42 25 0 0
Attachments

If you're on the lookout for a reliable trading system, the Exp_X2MA_JFatl might just be what you need. This trend-following system utilizes signals from the ColorX2MA and ColorJFatl indicators. The ColorX2MA helps you identify the overall slow trend direction, while the ColorJFatl assists in pinpointing entry points when there's a shift in the fast trend direction. An entry signal is generated at the close of a bar if two key conditions are satisfied:

  1. Fast and slow trend signals align;
  2. The fast trend has reversed direction.

Here’s a quick look at the EA inputs:

//+-------------------------------------------------+
//| 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="Trading permissions"; //+============== TRADING PERMISSIONS ==============+
input int Deviation_=10; //max price deviation in points
input bool BuyPosOpen=true; //Permission to enter a long position
input bool SellPosOpen=true; //Permission to enter a short position
//+-------------------------------------------------+
//| Input parameters of the filter indicator        |
//+-------------------------------------------------+
input string Filter="SLOW TREND PARAMETERS"; //+============== TREND PARAMETERS ==============+
input ENUM_TIMEFRAMES TimeFrame=PERIOD_H4; //1 Chart period for a trend
input Smooth_Method MA_Method1=MODE_SMA_; //first smoothing averaging method
input uint Length1=12; //first smoothing depth
input int Phase1=15; //first smoothing parameter,
//---- for JJMA within the range of -100 ... +100 it influences the quality of the transition process;
//---- For VIDIA it is a CMO period, for AMA it is a slow average period
input Smooth_Method MA_Method2=MODE_JJMA; //second smoothing averaging method
input uint Length2=5; //second smoothing depth
input int Phase2=15; //second smoothing parameter,
//---- for JJMA within the range of -100 ... +100 it influences the quality of the transition process;
//---- For VIDIA it is a CMO period, for AMA it is a slow average period
input uint SignalBar=1; //bar index for getting an entry 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_M30; //2 Chart period for an entry
input uint iLength=5; // depth of the JMA smoothing
input int iPhase=100; // parameter of the JMA smoothing,
//---- that changes within the range -100 ... +100,
//---- impacts the transitional process quality;
input uint SignalBar_=1;//bar index for getting 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
//+-------------------------------------------------+

Keep in mind that string variables in the input code are there for better visual representation in the EA inputs window.

The ColorJFatl_HTF and ColorX2MA_HTF indicators included in the EA are primarily for enhancing trend visualization in the strategy tester. They won’t be utilized in other operational modes.

To ensure smooth operation of the generated EA, make sure to place ColorX2MA.ex5, ColorX2MA_HTF.ex5, ColorJFatl.ex5, and ColorJFatl_HTF.ex5 compiled files in your <terminal_data_folder>\MQL5\Indicators folder.

Also, note that the TradeAlgorithms.mqh library file enables the use of Expert Advisors with brokers that offer nonzero spreads and allow setting Stop Loss and Take Profit simultaneously with position opening. You can grab more versions of the library from this link: Trade Algorithms.

In the testing results below, we used the default parameters for the Expert Advisor. Notably, Stop Loss and Take Profit were not employed during these tests.

Fig. 1. Examples of trades on the chart

Fig. 1. Examples of trades on the chart

Here are the testing results for 2015 on the EURJPY, with a slow trend observed on H4 and entries based on the fast trend on M30:

Fig. 2. Testing results chart

Fig. 2. Testing results chart

List
Comments 0