Expert RSI Stochastic MA Expert Advisor For MT4
WE IMPROVED THIS EXPERT ADVISOR FOR YOU!!!
PLEASE NOTE: This expert advisor was publicly available for free usage on other websites and is not programmed by us. We explain the functionality and possible improvements of the EA. Furthermore, we are convinced that fully automatic Expert Advisors will fail in the long run. On the other hand, our semi-automatic approach with detecting the best setups and then activating our Expert Advisors (e.g. V-Power EA, EdgeZone EA) produced many successful traders and some of them even got prop traders at prop trading firms. Therefore, we added a similar semi-automatic trading feature (to allow only buy or only sell trades) to the free Expert Advisors. You can download the modified version here and enjoy!
Table Of Contents:
- Expert RSI Stochastic MA Expert Advisor For MT4
- The Expert RSI Stochastic MA Expert Advisor for MT4 – Parameters
- The Expert RSI Stochastic MA Expert Advisor for MT4 – Entry Criteria
- The Expert RSI Stochastic MA Expert Advisor for MT4 – Exit Criteria
- The Expert RSI Stochastic MA Expert Advisor for MT4 – Room for Improvement
As the name suggests, the Expert RSI Stochastic MA Expert Advisor For MT4 uses a moving average, relative strength index and stochastic in trading the financial markets. While the manner of utilizing these technical indicators has been standardized in most programs including this trading system, the expert advisor under consideration has a unique way of managing open trades. This can be understood by observing the robot as it opens, manages, and closes trades in back testing.
In terms of profitability, the initial test was negative. The expert advisor failed to make money in the strategy tester when run for a period of five months using one symbol and one period. However, the result was not totally bad. The win rate was about 38 percent, and the robot took an average of 60 trades per month. The maximal drawdown was minimal (i.e., around one percent). The only negative thing about the test result was the final account balance that was lower than the initial balance by a small margin.
The Expert RSI Stochastic MA Expert Advisor for MT4 – Parameters
The Expert RSI Stochastic MA Expert Advisor opens one trade at a time and takes a trade by the tick. During initialization, it performs various checks to make sure the user sets correct values. Otherwise, the robot might fail in executing its algorithm at some point of its operation. These checks cover the inspection of levels for overbought or oversold conditions, lot size, values for stop loss and trailing stop, slippage, and magic number.
Most of the parameters available in inputs are self-explanatory, and many of them pertain to the indicator settings. How the program initiates the trailing stop and trade exit is something unique for this expert advisor. The parameters and their default values are explained below:
- RSI_period = 3 – The trading system uses an RSI with a period of 3.
- RSI_applied_price = PRICE_CLOSE – The RSI value is obtained from the closing prices.
- RSI_up_level = 80 – The underlying asset is considered overbought if the RSI is more than 80.
- RSI_dn_level = 20 – The underlying instrument is said to be oversold if the RSI is less than 20.
- STh_K_period = 6 – The trading system uses a stochastic with a K period of 6.
- STh_D_period = 3 – The stochastic in use has a D period of 3.
- STh_slowing = 3 – The stochastic has a slowing period of 3.
- STh_method = MODE_SMA – The method used for the stochastic is simple average.
- STh_price_field = 0 – This value means that the price field used for the stochastic is low/high.
- STh_up_level = 70 – The stochastic level for overbought condition is 70.
- STh_dn_level = 30 – The stochastic level for oversold condition is 30.
- MA_period = 150 – The trading system employs a moving average with a period of 150.
- MA_shift = 0 – The moving average has a shift of zero.
- MA_method = MODE_SMA – The moving average method is simple average.
- MA_applied_price = PRICE_CLOSE – The moving average is applied to the closing prices.
- Lot = 0.01 – Each trade opened by the robot will have a lot size of 0.01 by default unless the user specifies a different value.
- AllowLoss = 300 – This value is in points. This variable is not used to set the stop loss during trade entry. Rather, it is used to close the trade when losing at least 300 points and when stochastic agrees.
- TrailingStop = 300 – This amount is in points. The stop loss of a trade is trailed when it has become profitable and when the stochastic agrees.
- Slippage = 30 – This value is in points. This variable is used when opening and closing trades.
- Trials = 5 – The expert advisor will try up to five times to open, close or modify a trade if initial attempts fail.
- MagicNumber = 5577555 – A trade opened by this robot will be identified by this unique number.
The Expert RSI Stochastic MA Expert Advisor for MT4 – Entry Criteria
The trading system uses common technical indicators that are built within the MT4 platform to come up with entry signals. The manner of generating signals through these indicators is familiar to many traders. This is fully explained in the list below:
- Moving average (period 150, shift 0, simple averaging, price close) – The expert advisor computes the moving average corresponding to the current candle on the current symbol and timeframe. A buy signal is generated whenever the bid price is above the moving average, and a sell signal is obtained once the ask price is below the moving average.
- Relative strength index (period 3, price close) – The robot checks if the RSI is in overbought or oversold territory. If the RSI value is less than 20, the underlying market is considered oversold, so a bullish signal is indicated. If the RSI value is greater than 80, the underlying instrument is considered overbought, so a bearish signal is provided.
- Stochastic (6, 3, 3, simple mode, price close) – The expert advisor determines if the stochastic has provided an overbought or oversold reading. If both the main line and signal line are less than 30, the symbol is considered oversold, so a buy signal is produced. If both the main line and signal line are greater than 70, the instrument is said to be overbought, so a sell signal is issued.
Once the technical indicators have provided a trade signal and there is no open trade yet on the current symbol, the expert advisor opens a trade in real time. It does not wait for a new candle to form. The lot size of this trade is equal to the value set by the user in inputs. Upon entry, the trade does not come with a stop loss and take profit.
The Expert RSI Stochastic MA Expert Advisor for MT4 – Exit Criteria
The Expert RSI Stochastic MA Expert Advisor uses advanced methods in trade management as it does not make use of stop loss and take profit. In this system, trades are closed either through trailing stop or forced closure by the expert advisor. In both situations, trade exit is triggered by the stochastic indicator.
Trailing stop is activated when a trade is profitable (i.e., bid price is above open price for buy or ask price is below open price for sell) and when the stochastic is overbought for buy or oversold for sell. It is important to note that trailing stop is initiated even if the trade has gained minimal points and there is a possibility to close the trade in loss. The trail stop threshold of 300 points, or 30 pips, is not measured from the open price to the current market price, but rather the program maintains a distance of 30 pips between the market price and the trade stop loss. See code snippet above.
In the other scenario where a trade has not gained any pips and completely drifted away from the entry point, stop trailing is not used at all. In this case, the trade is forcibly closed by the robot if the market goes at least 300 points, or 30 pips, against the trade and if stochastic has reached the overbought or oversold condition. Trade exited this way is always a loser.
The Expert RSI Stochastic MA Expert Advisor for MT4 – Room for Improvement
The Expert RSI Stochastic MA Expert Advisor can be slightly improved programmatically. There are some parts in the code that can be shortened to save code space and to avoid possible errors. In the image above, the block of code within the for loop can be greatly simplified since the intention is only to determine the open price of a market order. At least four lines from this function can be easily removed without negative effects.