Mastering Simple EMA, WMA, and RSI Trading with Expert Advisors on MetaTrader 4

Mike 2010.04.19 17:06 28 0 0
Attachments

Description:

Looking to enhance your trading strategies? This Expert Advisor (EA) is straightforward to use, and with a little practice, even those with limited programming knowledge can tweak it to suit their needs.

This EA executes trades based on the intersection of Moving Averages (MA), specifically the Exponential Moving Average (EMA) and Weighted Moving Average (WMA), with the Relative Strength Index (RSI) acting as a filter.

Here’s how it works:

  • If RSI > 50, the EA will only allow Buy trades.
  • If RSI < 50, only Sell trades are permitted.
Key Variables:
  • period_EMA = 28 - This sets the period for the EMA line.
  • period_WMA = 8 - This defines the period for the WMA line.
  • period_RSI = 14 - This sets the period for the RSI indicator.
  • stoploss = 0 - This determines the stop loss level at trade opening (a value of 0 means no stop loss).
  • takeprofit = 500 - This specifies the take profit level at trade opening (a value of 0 means no take profit).
  • risk = 10 - If the Lot size is set to 0, the EA will calculate the Lot size as a percentage of available funds based on this risk value.
  • Magic = 777 - This unique identifier ensures that the EA’s orders do not interfere with manually opened trades or those from other EAs.
  • CloseCounter = false - Set this to true if you want the EA to close trades on the opposite signal. For example, if you open a Buy trade, it will close it if a Sell signal occurs.
  • Lot = 0.1 - You can set the Lot size, but if you input 0, it will be calculated automatically.
  • TrailingStop, Tip.Fr.or.Candl - These are used for the Trailing Stop feature in the EA. For more details, check this link: Trailing Stop Details




Tips:

If you set takeprofit = 0, make sure you set CloseCounter = true; otherwise, the orders will not close when they should.

Setting stoploss = 0 means there's no protective stop in place. While this can make for a more visually appealing balance line in the tester, it does come with the risk of larger drawdowns.

List
Comments 0