Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Views:
6364
Rating:
(17)
Published:
2017.01.19 16:43
Updated:
2023.03.29 13:47
\MQL5\Experts\ \MQL5\Include\ \MQL5\Indicators\
ColorJJRSX.mq5 (20.26 KB) view
ColorX2MA.mq5 (17.76 KB) view
ColorX2MA_HTF.mq5 (19.62 KB) view
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

Exp_X2MA_JJRSX trend-following trading system is based on ColorX2MA and ColorJJRSX indicator signals. ColorX2MA indicator is used to define the main slow trend direction, while ColorJJRSX indicator allows us to define an entry point when a fast trend direction is changing. An entry signal is generated at a bar closure if the following two conditions are met:

  1. Fast and slow trend signals coincide;
  2. Fast trend has changed its direction.

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 Applied_price_ IPC=PRICE_CLOSE_;//price constant
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 JurXPeriod=8; //JurX period
input uint JMAPeriod=3; //JMA period
input int JMAPhase=100; //JMA averaging parameter,
// for JJMA it varies within the range -100 ... +100 and influences the quality of the transient period;
input Applied_price_ IPC_=PRICE_CLOSE_; //price constant
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
//+-------------------------------------------------+

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

ColorJJRSX_HTF and ColorX2MA_HTF indicators in the EA are included only for more convenient trend visualization in the strategy tester. They are not used in other operation modes.

Place ColorX2MA.ex5, ColorX2MA_HTF.ex5, ColorJJRSX.ex5 and ColorJJRSX_HTF.ex5 compiled files to the <terminal_data_folder>\MQL5\Indicators for the generated EA correct operation.

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.

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 trades on the chart

Fig. 1. Examples of trades on the chart

Testing results for 2015 on GBPUSD, slow trend on H4, entry by fast trend on M30:

Fig. 2. Testing results chart

Fig. 2. Testing results chart

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/16673

Multi Lot Scalper Multi Lot Scalper

Multi Lot Scalper Expert Advisor, MetaTrader 5 version.

ColorJJRSX_HTF ColorJJRSX_HTF

The ColorJJRSX indicator with the timeframe selection option available in the input parameters.

ZigZagOnParabolic_Arrows ZigZagOnParabolic_Arrows

ZigZagOnParabolic with its values displayed as fractal labels.

Zigzag2_R_Color_HTF Zigzag2_R_Color_HTF

The Zigzag2_R_Color indicator with the timeframe selection option available in the input parameters.