Download MetaTrader 5

Experts: EMAplusWPR

To add comments, please log in or register
MetaQuotes Software Corp.
Moderator
182424
MetaQuotes Software Corp. 2011.02.07 08:30 

EMAplusWPR:

Expert advisor that trade in the trend of EMA and buy/sell signals get from Williams %R

Author: Matus German

MQL4 Comments
16319
MQL4 Comments 2011.02.07 15:46  

Great EA gery18... simple yet effective, goes through 10year test on EURUSD, what is quite an achivement. I will consider to give it a try on a live account soon.

whroeder1
14753
whroeder1 2011.02.07 17:38  
  1. Profit factor of 1.5 is too low.
  2. Lots=NormalizeDouble(Ilo, 1);
    if (Lots<0.1) Lots=0.1;
    if (Lots>maxLots) Lots=maxLots; 
    This assumes minLots = 0.1 and lotStep = 0.1; On IBFX it was 0.1/0.01 and is now 0.01/0.01. Do it right:
    double  minLot  = MarketInfo(Symbol(), MODE_MINLOT),    //IBFX= 0.10
            lotStep = MarketInfo(Symbol(), MODE_LOTSTEP),   //IBFX= 0.01
            maxLot  = MarketInfo(Symbol(), MODE_MAXLOT );   //IBFX=50.00
    Lots = MathFloor(Lots/lotStep)*lotStep;
    if (Lots < minLot)  Lots = minLot;
    if (Lotsx> maxLots) Lots=maxLots; 
    

  3. // exit market conditions     
       for(cnt=0;cnt<total;cnt++)
       {
          OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
          if(OrderType()<=OP_SELL &&   // check for opened position 
             OrderSymbol()==Symbol())  // check for symbol
          {
    
    You MUST count down when closing/deleting, or modifying multiple order in the presence of other charts. Always check return codes
    // exit market conditions     
       for(pos=OrdersTotal()-1;pos>=0;pos--) if(
          OrderSelect(pos, SELECT_BY_POS, MODE_TRADES)
       && OrderType()<=OP_SELL    // check for opened position 
       && OrderSymbol()==Symbol()  // check for symbol
       && OrderMagicNumber()  == magic.number){     // my magic number
    

  4. EAs should adjust for 5 digit brokers, TP, SL, and slippage
    //++++ These are adjusted for 5 digit brokers.
    double  pips2points,    // slippage  3 pips    3=points    30=points
            pips2dbl;       // Stoploss 15 pips    0.0015      0.00150
    int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)
    int     init(){
        if (Digits == 5 || Digits == 3){    // Adjust for five (5) digit brokers.
                    pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;
        } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0; }
        // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
    

MQL4 Comments
16319
MQL4 Comments 2011.02.08 16:24  

Very good EA.

I have changed just one thing:

// exit market conditions     
   for(cnt=total-1;cnt>=0;cnt--)
   { 

Here the result of my backend testing...

Strategy Tester Report
EMAplusWPR
ForexPlace-Demo Server (Build 226)


Symbol EURUSD (Euro vs US Dollar)
Periode 5 Minuten (M5) 2009.01.02 08:00 - 2010.10.29 23:20 (2009.01.01 - 2011.01.01)
Modell Jedes Ticksignal (präziseste Methode, die auf allen nächsten verfügbaren kleineren Zeitrahmen basiert)
Parameter TakeProfit=500; maxStopLoss=50; maxLots=1; maxContracts=3; EMA=144; iWPRPeriod=46;
Balken im Test 118742 Ticks modelliert 17171623 Modellierungsqualität n/a
Fehler in Charts-Anpassung 40243
Ursprüngliche Einlage 3000.00
Gesamt netto Profit 9190.24 Brutto Profit 60313.72 Brutto Loss -51123.48
Profit Faktor 1.18 Erwartetes Ergebnis 10.47
Drawdown absolut 922.01 Maximaler Drawdown 2945.84 (19.46%) Relative Drawdown 45.30% (2818.26)
Trades gesamt 878 Short Positionen (gewonnen %) 412 (66.02%) Long Positionen (gewonnen %) 466 (70.17%)
Profit Trades (% gesamt) 599 (68.22%) Loss Trades (% gesamtl) 279 (31.78%)
Grösster Profit Trade 421.20 Loss Trade -355.00
Durchschnitt Profit Trade 100.69 Loss Trade -183.24
Maximum aufeinanderfolgende Gewinne (Profit in Geld) 18 (1766.34) Aufeinanderfolgende Verluste (Verlust in Geld) 12 (-1467.14)
Maximal Aufeinanderfolgender Profit (Anzahl der Gewinne) 1845.89 (16) Aufeinanderfolgende Verluste (Anzahl der Verluste) -1606.25 (10)
Durchschnitt aufeinanderfolgende Gewinne 5 aufeinanderfolgende Verluste 2

MQL4 Comments
16319
MQL4 Comments 2011.02.09 14:20  
This is a great EA... I will analyze all the trades and will try to bring this up to a higher level! Thanks for the idea!
chris
9
chris 2011.02.09 21:19  
sebecht:

Very good EA.

I have changed just one thing:

// exit market conditions     
   for(cnt=total-1;cnt>=0;cnt--)
   { 

Here the result of my backend testing...

Strategy Tester Report
EMAplusWPR
ForexPlace-Demo Server (Build 226)


Symbol EURUSD (Euro vs US Dollar)
Periode 5 Minuten (M5) 2009.01.02 08:00 - 2010.10.29 23:20 (2009.01.01 - 2011.01.01)
Modell Jedes Ticksignal (präziseste Methode, die auf allen nächsten verfügbaren kleineren Zeitrahmen basiert)
Parameter TakeProfit=500; maxStopLoss=50; maxLots=1; maxContracts=3; EMA=144; iWPRPeriod=46;
Balken im Test 118742 Ticks modelliert 17171623 Modellierungsqualität n/a
Fehler in Charts-Anpassung 40243
Ursprüngliche Einlage 3000.00
Gesamt netto Profit 9190.24 Brutto Profit 60313.72 Brutto Loss -51123.48
Profit Faktor 1.18 Erwartetes Ergebnis 10.47
Drawdown absolut 922.01 Maximaler Drawdown 2945.84 (19.46%) Relative Drawdown 45.30% (2818.26)
Trades gesamt 878 Short Positionen (gewonnen %) 412 (66.02%) Long Positionen (gewonnen %) 466 (70.17%)
Profit Trades (% gesamt) 599 (68.22%) Loss Trades (% gesamtl) 279 (31.78%)
Grösster Profit Trade 421.20 Loss Trade -355.00
Durchschnitt Profit Trade 100.69 Loss Trade -183.24
Maximum aufeinanderfolgende Gewinne (Profit in Geld) 18 (1766.34) Aufeinanderfolgende Verluste (Verlust in Geld) 12 (-1467.14)
Maximal Aufeinanderfolgender Profit (Anzahl der Gewinne) 1845.89 (16) Aufeinanderfolgende Verluste (Anzahl der Verluste) -1606.25 (10)
Durchschnitt aufeinanderfolgende Gewinne 5 aufeinanderfolgende Verluste 2


Backtest on demo with a n/a as a result is not significant, download historical data to obtain a 90% modelling quality
MQL4 Comments
16319
MQL4 Comments 2011.02.15 06:47  

ok, where is the EA?????

loh yoke wah
64
loh yoke wah 2011.02.16 07:28  
wseyle:

ok, where is the EA?????


http://codebase.mql4.com/en/code/10116 it was just beside the ADV of the MT4&5&mobile at the right hand side.
MQL4 Comments
16319
MQL4 Comments 2011.02.16 18:09  
// money management
Ilo=0.1* ((AccountBalance()) / 1000);
Lots=NormalizeDouble(Ilo, 1);
if (Lots<0.1) Lots=0.1;

if (Lots>maxLots) Lots=maxLots;


T akeProfit=200; maxStopLoss=50; maxLots=10; maxContracts=2; EMA=144; iWPRPeriod=46;

Start deposit 500 USD

MQL4 Comments
16319
MQL4 Comments 2011.02.17 08:39  
Has anyone been able to get this to run on a demo account, I seem to be having no luck? The backtest looks great!
MQL4 Comments
16319
MQL4 Comments 2011.02.18 09:04  
bunyip101:
Has anyone been able to get this to run on a demo account, I seem to be having no luck? The backtest looks great!

I'm running it on demo since monday - not a lucky week :-/
12
To add comments, please log in or register