- Profit factor of 1.5 is too low.
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;
// 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
- 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
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)
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 |

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!
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)
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
ok, where is the EA?????
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.

// money management
Ilo=0.1* ((AccountBalance()) / 1000);
Lots=NormalizeDouble(Ilo, 1);
if (Lots<0.1) Lots=0.1;
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
Has anyone been able to get this to run on a demo account, I seem to be having no luck? The backtest looks great!
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!
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 :-/

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
EMAplusWPR:
Author: Matus German