Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Exp_WAMI_Cloud_X2 - MetaTrader 5 Expert - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

Exp_WAMI_Cloud_X2 - expert for MetaTrader 5

Exp_WAMI_Cloud_X2 - expert for MetaTrader 5

The trend following trading system Exp_WAMI_Cloud_X2 is based on two indicators the signal Wami . 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 when a position is opened when the lines cross each other. A signal is formed when the bar closes if two conditions are met:

//+------------------------------------------------+
//|Input parameters of EA indicator|
//+------------------------------------------------+
Enter String Trade = "Trade Management" ; //+============== Trade Management==============+
Enter double MM= 0.1 ; //Share of deposit in a transaction
Enter the margin mode MMMode=LOT; //Lot size detection method
Input unit Stop loss_= 1000 ; //Stop loss points
Input unit profit_= 2000 ; //Profit in points
Input string must be traded = "Trade License" ; //+============== Trade License==============+
Enter integer Deviation_= 10 ; //Maximum price deviation (in points)
Enter Boolean BuyPosOpen= True ; //Allow entry into long position
Enter a Boolean value SELL OPEN = TRUE ; //Allow short positions to be opened
//+------------------------------------------------+
//|Input parameters for filtering indicators |
//+------------------------------------------------+
input string filter = "slow trend parameter" ; //+============== trend parameter==============+
Input ENUM_TIMEFRAMES time range = PERIOD_H6 ; //1 chart period of the trend
Input unit InpPeriodMA1 = 4 ; // first MA period
Input ENUM_MA_METHOD InpMethodMA1 = mode_SMA ; // first MA method
Input unit InpPeriodMA2 = 13 ; // Second MA period
Input ENUM_MA_METHOD InpMethodMA2 = mode_SMA ; // Second MA method
Input unit InpPeriodMA3 = 13 ; // The third MA period
Input ENUM_MA_METHOD InpMethodMA3 = mode_SMA ; // The third MA method
Input unit InpPeriodSig = 4 ; // Signal MA period
Input ENUM_MA_METHOD InpMethodSig = mode_SMA ; // Signal MA method
Enter ENUM_APPLIED_PRICE InpAppliedPrice = PRICE_CLOSE ; // Apply price
Input unit signal field = 1 ; // Number of bars to receive entry signals
Enter boolean Buy Close = true ; // Allow closing positions on trend
Enter a Boolean value Sell transaction close = true ; // Allow closing positions according to trend
//+------------------------------------------------+
//|Input parameters of the entry indicator |
="comment">//+------------------------------------------------+ Input string input = "Input parameters" ; //+================ Input parameters==============+ Input ENUM_TIMEFRAMES time range_= PERIOD_M30 ; //2 Entry chart period input unit InpPeriodMA1_ = 4 ; // First MA period input ENUM_MA_METHOD InpMethodMA1_ = Mode_SMA ; // First MA Method input unit InpPeriodMA2_ = 13 ; // The second MA period input unit ENUM_MA_METHOD InpMethodMA2_ = mode_SMA ; // The second MA method input unit InpPeriodMA3_ = 13 ; // The third MA period input unit ENUM_MA_METHOD InpMethodMA3_ = mode_SMA ; // The third MA method input unit InpPeriodSig_ = 4 ; // Signal MA Period input ENUM_MA_METHOD InpMethodSig_ = Mode_SMA ; // Signal MA method input ENUM_APPLIED_PRICE InpAppliedPrice_ = PRICE_CLOSE ; // Apply price input unit signal column_= 1 ; // Number of bars to receive entry signals input Boolean BuyPosClose_= false ; // Allow closing of long positions by signal input boolean SellPosClose_= false ; // Allows closing short positions via signals //+------------------------------------------------+

String parameters with text in the input parameter code are just for better visualization of the expert's input parameters window.

Indicators WAMI_Cloud_HTF in the EA are designed only for easier visualization of trends in the strategy tester; and they do not work in any other mode.

In order for the generated EA to run correctly, the compiled indicator files Wami.ex5 and WAMI_Cloud_HTF.ex5 must be in the <terminal data directory>\MQL5\indicator folder.

Please note that the Trade Algorithms .mqh library file allows trading Expert Advisors with non-zero spreads and the option to set Stop Loss and Take Profit along with opening positions with brokers that offer the following services. You can download more variants of this library via the following link: Trading Algorithms .

The input parameters of the default Expert Advisor were used in the test shown below. Stop Loss and Take Profit were not used during testing.

EURUSD test results in 2016, H4 trend is slow, M30 trend is entering the market quickly:

Exp_WAMI_Cloud_X2 - expert for MetaTrader 5

Figure 1. Example of trade on chart

Exp_WAMI_Cloud_X2 - expert for MetaTrader 5

Figure 2. Test result graph


Attachment download

📎 tradealgorithms.mqh (223.62 KB)

📎 wami.mq5 (16.8 KB)

📎 wami_cloud_htf.mq5 (21.82 KB)

📎 exp_wami_cloud_x2.mq5 (23.1 KB)

Source: MQL5 #21092

Verification code Refresh