|
Posted BabyPips Strategy
#410313
11/01/12 07:37
11/01/12 07:37
|
Joined: Sep 2012
Posts: 99
TankWolf
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2012
Posts: 99
|
I found this strategy posted on BabyPips that had pretty simple rules and I thought would be a great practice. Here are the rules: So the rules are simple. ATR (11) with MA (21) ADX (14) Trade rules: BUY: Entry: 1. ADX Is Over 25 2. ATR is above MA 3. +DI crosses -DI 4. SL = Last candles low + 2 pips if SL would be below 10 pips use 15 pips as SL Exit: 1. Close When TP hits 20 pips SELL: Entry: 1. ADX Is Over 25 2. ATR is below MA 3. -DI crosses +DI 4. SL = Last candles high - 2 pips if SL would be below 10 pips use 15 pips as SL Exit: 1. Close When TP hits 20 pips Work time: Start at : 8:00 GMT +0 (London opens) End: 21:00 GMT +0 (NY closes) I had back tested it by hand , last month on M5 chart was: 30 Trades 12 bad trades 18 good trades 60% wining Read more: http://forums.babypips.com/free-forex-trading-systems/48196-simple-60-profitable.html#ixzz2AxCW78k3The author claims on his backtest for last month that 30 trades would of occurred. In my next post is my code to replicate his strategy.
|
|
|
Re: Posted BabyPips Strategy
[Re: TankWolf]
#410314
11/01/12 07:39
11/01/12 07:39
|
Joined: Sep 2012
Posts: 99
TankWolf
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2012
Posts: 99
|
function run() { set(PARAMETERS+FACTORS+TESTNOW); BarPeriod = 5; StartDate = 2006; NumYears = 7; NumWFOCycles = 6; LookBack = 100;
var* Close = series(priceClose()); var* High = series(priceHigh()); var* Low = series(priceLow()); var* PLUSDI14 = series(PlusDI(14)); var* MINUSDI14 = series(MinusDI(14)); var* ADX14 = series(ADX(14)); var* ATR11 = series(ATR(11)); var* SMAATR11 = series(SMA(ATR11,21)); plot("ADX14",ADX14[0],NEW,0x0000CC); plot("ATR11",ATR11[0],NEW,BLUE); plot("SMAATR11",SMAATR11[0],NEW,BLUE);
if(hour(0) >= lhour(UTC,7) && hour(0) <= lhour(UTC,21))
if(ADX14[0] > 25 && ATR11[0] > SMAATR11[0] && crossOver(PLUSDI14,MINUSDI14) && NumOpenLong == 0) { enterLong(); if(Low[1] + (2*PIP) < (10*PIP)) Stop = 15*PIP; else Stop = Low[1] + (2*PIP); } else if(ADX14[0] > 25 && ATR11[0] < SMAATR11[0] && crossOver(MINUSDI14,PLUSDI14) && NumOpenShort == 0) { enterShort(); if(High[1] - (2*PIP) < (10*PIP)) Stop = 15*PIP; else Stop = Low[1] - (2*PIP); } }
This is my attempt at coding the strategy as per the rules, I think Ive got the logic all right but any assistance/advice would be great.
|
|
|
Re: Posted BabyPips Strategy
[Re: TankWolf]
#410315
11/01/12 07:40
11/01/12 07:40
|
Joined: Sep 2012
Posts: 99
TankWolf
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2012
Posts: 99
|
The results: Walk-Forward Test Vulture EUR/USD - performance report
Simulation period 03.01.2006-03.10.2012 Test period 10.08.2009-03.10.2012 WFO test cycles 5 x 46905 bars (33 weeks) Training cycles 6 x 265795 bars (191 weeks) Lookback time 100 bars (8 hours) Assumed spread 2.6 PIP (roll -0.06/0.03) Assumed slippage 10.0 sec Contracts per lot 800
Gross win/loss 331$ / -107$ (+2797p) Average profit 71$/year, 6$/month, 0$/day Max drawdown -48$ (MAE -69$) Max down time 77 weeks from Apr 2011 Largest margin 5$ Trade volume 72639$ (23070$/year) Transaction costs -14$ spr, -1$ slp, -2$ rol Capital required $100
Number of trades 67 (21/year) Percent winning 39% Max win/loss 105$ / -21$ Avg trade profit 3$ 41.7p (+13$ / -3$) Avg trade bars 1135 (+2399 / -333) Max trade bars 21147 (15 weeks) Time in market 32% Max open trades 1 Max win/loss streak 3 / 11 (71.76% / 9.05% per year)
Annual return 71% Profit factor 3.09 (PRR 2.15) Sharpe ratio 1.14 Kelly criterion 1.81 OptimalF .557 Ulcer index 12% Prediction error 60%
Trade details OptF ProF Win/Loss Cycles
EUR/USD:L .096 2.87 20/34 ///\/ EUR/USD:S .999 13.75 6/7 /\\//
|
|
|
Re: Posted BabyPips Strategy
[Re: jcl]
#410333
11/01/12 10:28
11/01/12 10:28
|
Joined: Feb 2012
Posts: 37
stevegee58
Newbie
|
Newbie
Joined: Feb 2012
Posts: 37
|
- Stop is set after the trade was already entered - must be set before.
That's an interesting point. With American ECN rules you're required to enter the SL and TP after the trade is entered. They're not allowed to be attached to a pending order. ZT doesn't seem to handle this distinction natively.
Last edited by stevegee58; 11/01/12 10:30.
|
|
|
|