EMAplusWPRv1_1 - MetaTrader 4 Expert | MT4 EA Download - MetaTrader 4 Resources






Expert Advisor who trades based on EMA trends and gets buy/sell signals from Williams %R
I tried to create an Expert Advisor that can trade with a starting equity of 1000 euros and minimize drawdowns. Hope you like it. I appreciate every feedback.
5 minutes optimized for EURUSD
I removed some bugs, changed the position size, and you can define the percentage of your account you want to risk on a single trade. I added a simple trailing stop, which is disabled if TrailingStop = 0.
You use it at your own risk. I am not responsible for your losses, you must change, test and optimize it for your purposes.
External double profit = 200 ; // take profit External double maximum stop loss = 50 ; // stop loss External double maximum lot size = 10 ; // Maximum lot size per position outer double max number of contracts = 2 ; // max open positions, 2 is best for smoother equity External double EMA = 144 ; // EMA identifies trends outer integer iWPRPeriod = 46 ; // Williams percentage range to determine buy/sell signal integer iWPR retracement = 30 ; // retracement of Williams percentage to allow next trade External double trailing stop = 50 ; // Trailing stop, use 0 to disable trailing stop external integer risk = 2 ; // the percentage of your account you want to risk on the trade external double magic number = 13131 ;
Strategy test report
To use My Position Size, increase the maxLots size and define the risk - how much % of your account you want to risk on a single trade.
For position size I use the following code:
minAllowedLot = market information( symbol (), MODE_MINLOT); //IBFX=0.10 lotStep = market information( symbol (), MODE_LOTSTEP); //IBFX=0.01 Maximum allowed lot = market information( symbol (), MODE_MAXLOT); //IBFX=50.00 balance = account balance(); iLO = ((Balance * Risk / 100 ) / Maximum Stop Loss); lot = normalized double (ilo, 0 ) * lot_step; if (lot < minAllowedLot) lot = minAllowedLot; if (lot size > maxLots) lot size = maxLots; if (lot size > maxAllowedLot) lot size = maxAllowedLot;
Strategy test report
Attachment download
📎 emapluswpr_v_2.mq4 (12.11 KB)
Source: MQL5 #10201
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •