Experts: Moving Average

 

Moving Average:

The Expert Adviser Moving Average uses for trade signal generation one moving average.

Author: MetaQuotes Software Corp.

 
excellent idea about money management
 
hi !
let me try it !
 
Umm, a modeling quality of 25% is a bit too low.
 
What are the stoploss/trailing stops? I can't find them anywhwere. Or does this close by % loss alone?

I tested it w/ 400.00, and got stopped on one with -$3.10...which is nowhere near the 2% loss the thing is set at???
 
if(losses>1) lot=NormalizeDouble(lot-lot*losses/DecreaseFactor,1);

Function is incorrect i.m.o.

if(losses>1 && DecreaseFactor > losses) lot=NormalizeDouble(lot-lot*(losses/DecreaseFactor),1);

should work better.

 

My test results:

Strategy Tester Report
Moving Average
FXDD-MT4 Live Server (Build 220)

SimboloEURUSD (Euro vs. United States Dollar)
Periodo1 Ora (H1) 2007.07.02 01:00 - 2009.01.05 23:00 (2007.07.01 - 2009.01.06)
ModelloOgni tick (il metodo precissimo sulla base di tutti gli intervalli di tempo minimi)
ParametriLots=0.1; MaximumRisk=0.02; DecreaseFactor=3; MovingPeriod=12; MovingShift=6;

Barre sotto esame10284Ticks adoperati per il modello3949236Qualita' del modello90.00%
Errori di grafici16




Deposito iniziale5000.00



Profitto totale netto1306.60Profitto lordo6988.01Perdita lorda-5681.41
Fattore di profitto (profit factor)1.23Ricompensa attesa3.19

Drawdown assoluto259.11Drawdown massimo637.92 (9.26%)Drawdown relativo9.26% (637.92)

Operazioni totali409Posizioni al ribasso (vincite %)229 (25.33%)Posizioni al rialzo (vincite %)180 (27.78%)

Operazioni con profitto (% del totale)108 (26.41%)Operazioni in perdita (% del totale)301 (73.59%)
Il piu' grandeoperazione con profito462.31operazione in perdita-109.70
Mediaoperazione con profito64.70operazione in perdita-18.88
Massimovincite consecutive (profitto in denaro)3 (11.96)perdite consecutive (perdita in denaro)20 (-140.16)
Massimaleprofitto consecutivo (numero delle vincite)462.31 (1)perdita consecutiva (numero delle perdite)-463.86 (11)
Mediavincite consecutive1perdite consecutive3
 

Simple but useful money management.

One comment: HistoryTotal() is the old name of that function and has been replaced by OrdersHistoryTotal.

So, in the Moving average.mq4 code you need to replace this sentence:

int ClosedOrders=HistoryTotal();

with this one

int ClosedOrders=OrdersHistoryTotal();

 

hi there,

is it possible to remove the auto-close features?

 

see this scalping EA

 

SymbolEURUSDFXF (Euro vs US Dollar)
Period1 Hour (H1) 2007.03.30 17:01 - 2011.09.30 00:59 (2007.03.01 - 2011.06.20)
ModelEvery tick (the most precise method based on all available least timeframes)
ParametersLots=0.1; MaximumRisk=0.02; DecreaseFactor=3; MovingPeriod=12; MovingShift=6;
Bars in test28117Ticks modelled34632921Modelling quality99.00%
Mismatched charts errors0
Initial deposit10000.00
Total net profit2786.20Gross profit71494.00Gross loss-68707.80
Profit factor1.04Expected payoff1.26
Absolute drawdown600.60Maximal drawdown3375.60 (24.72%)Relative drawdown24.72% (3375.60)
Total trades2205Short positions (won %)1102 (25.50%)Long positions (won %)1103 (28.92%)
Profit trades (% of total)600 (27.21%)Loss trades (% of total)1605 (72.79%)
Largestprofit trade1155.60loss trade-1006.80
Averageprofit trade119.16loss trade-42.81
Maximumconsecutive wins (profit in money)6 (353.40)consecutive losses (loss in money)18 (-650.40)
Maximalconsecutive profit (count of wins)1170.00 (4)consecutive loss (count of losses)-1280.80 (9)
Averageconsecutive wins1consecutive losses4
Reason: