Two MA One RSI - MetaTrader 5 Expert | Forex Indicator Download - MT4/MT5 Resources



Idea from : Yuri Tokman .
MQL5 code by : Vladimir Karputov .
The EA trades based on two indicators iMA (Moving Average, MA) and one iRSI (Relative Strength Index, RSI). A decision on a trading signal is taken only when a new bar appears, while every price change is tracked and closed (if profitable).
An unconventional solution is applied: the slow indicator average period is calculated as the fast average period times two, while the RSI average period is always equal to the fast average period. This reduces the number of parameters in the optimization.
You can also optimize all symbols "<" and "">" in the signal recognition formula. To do this, set its own variables ( InpMoreLessBuy_1 , InpMoreLessBuy_2 , InpMoreLessBuy_3 , InpMoreLessSell_1 , InpMoreLessSell_2 , and InpMoreLessSell_3 ) were introduced. With these variables, the formula is modified as follows:
boolean signal_buy=(! InpMoreLessBuy_1 ? fast array[1]Fast Array [1]>ArraySlow[1]) && ( InpMoreLessBuy_2 ? ArrayFast[0]>ArraySlow[0]: ArrayFast[0]InpMoreLessBuy_3 ? Relative Strength Index > InpRSI_level_UP : RSIBooleanSignal_Sell =( InpMoreLessSell_1 ? FastArray [1] > ArraySlow[1]:ArrayFast[1]InpMoreLessSell_2 ? fast array [0]Fast Array[0]>ArraySlow[0]) && (! InpMoreLessSell_3 ? Relative Strength Index RSI > InpRSI_level_DOWN);
Moving average indicator parameters:
Parameters of the RSI indicator and its signals:
Transaction parameters:
As you can see, in addition to setting indicator parameters, this EA also has the flexibility to set (and disable) stop loss, take profit, trailing, maximum number of positions opened in one direction, closing with profit, and closing opposite positions. You can also manage the position size calculation: you can trade with a permanent lot size ( a lot is above zero and the risk is equal to zero), or you can calculate the lot size dynamically (a lot is a risk above zero and the risk is equal to zero).
In the "OHLC – M1" mode, select the trading symbol and time frame M15. Disable (set to zero) Stop Loss, Take Profit and Trailing, and set the maximum number of positions in each direction to "1". Or copy the following content to the MQL5\Profiles\Tester\ folder. Two MAs and one RSI. The M15 Start.set file already contains the initial optimization parameters of M15.
Select the optimization type as "Fast (Genetic Algorithm)" and select the parameter to be optimized "Balance max".
For optimization, I recommend involving MQL5 Cloud Network : For USDJPY 2017, Cloud Optimization Plus My Quad-Core Laptop

2018.05.28 08:03:19.923 Optimization completed in 7 minutes and 58 seconds
The cost is $0.08.
Attachment download
📎 two_ma_one_rsi.mq5 (57.41 KB)
📎 two_ma_one_rsi_m15_start.set (2.22 KB)
Source: MQL5 #20886
Two MAs and one RSI - MetaTrader 5 Expert | Forex Indicator Download - MT4/MT5 Resource Usage and Screening Suggestions
Two MAs and one RSI - MetaTrader 5 Expert | Foreign Exchange Indicator Download - MT4/MT5 resources are foreign exchange indicator related resources. Before downloading or referencing, it is recommended to confirm the platform version, transaction type, time period, whether DLL is required, whether source code is included, parameter description and historical update records.
Both automated trading tools and foreign exchange indicators should first undergo backtesting, simulated account observation, and small capital verification. Pay special attention to spreads, slippages, maximum drawdowns, position opening frequency, stop loss methods, trading periods and broker rules, and avoid direct real-time execution based only on titles or short-term profit descriptions.
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •