If you're looking to ride the waves of the market, the Exp_Sinewave2_X2 trading system is a fantastic tool to consider. This system is all about following trends, leveraging signals from two key indicators: Sinewave2. Here's how it works:
The first indicator helps pinpoint the direction of the slow trend based on the alignment of its main and signal lines. Meanwhile, the second indicator signals the perfect time to open a trade—specifically when these lines cross or come into contact.
For an entry signal to be triggered at the closure of a bar, two conditions need to be met:
- The fast and slow trend signals must align.
- The fast trend must change 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 determining 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_H6; // 1 Chart period for the trend input uint Length=10; // indicator smoothing ratio input uint SignalBar=1; // bar number to receive the 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 entry input uint Length_=10 // indicator period input uint SignalBar_=1; // bar number 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 //+-------------------------------------------------+
Just a heads up: the string variables you see are there to enhance the visual experience of the EA input parameters window.
The indicators Sinewave2_Cloud_HTF included in the EA are solely for making trends easier to visualize during strategy testing and won't be active in other modes.
To ensure that the EA runs smoothly, make sure the compiled indicator files, namely CyclePeriod.ex5, Sinewave2.ex5, and Sinewave2_Cloud_HTF.ex5, are located in the <terminal_data_directory>\MQL5\Indicators folder.
Also, keep in mind that the TradeAlgorithms.mqh library file is essential for using Expert Advisors with brokers that offer a nonzero spread and allow for setting Stop Loss and Take Profit when opening positions. You can grab other versions of this library at Trade Algorithms.
In the tests below, we utilized the default input parameters for the EA. Note that Stop Loss and Take Profit were not applied during testing.

Testing results for GBPUSD over the year 2016, with a slow trend on H8 and entry by fast trend on M30:

Fig. 2. Testing results chart
Related Posts
- Creating an Expert Advisor for Dark Cloud Cover and Piercing Line Patterns with CCI Confirmation
- Harnessing MQL5 Wizard for Trading Signals: 3 Black Crows & 3 White Soldiers with MFI
- Creating a Stochastic-Based EA for Hammer and Hanging Man Patterns in MetaTrader 5
- Harnessing MQL5 Wizard for Bullish and Bearish Harami Signals with CCI Confirmation
- Leveraging MQL5 Wizard: Crafting Trade Signals with Meeting Lines and Stochastic