Systeem zsADXDMI - Uitnodiging voor de Cracks II

Vragen en suggesties over handelssystemen en indicatoren

Moderator: Perry

Systeem zsADXDMI - Uitnodiging voor de Cracks II

Berichtdoor poekmeister » zo 24 aug 2003, 22:00

Wederom een voorstel voor collega-systeem ontwikkelaars. Ik heb op de thread http://elitetrader.com/vb/showthread.ph ... adid=21376 een interessant onderwerp gevonden over het gebruik van de ADX indicator en zijn componenten DMI-/DMI+ . Dit zou zeer leuke resultaten opleveren voor de meeste intraday timeframes. Ik heb onderstaande code ontwikkelt n.a.v. de thread en getest op de AEX in 15 en 30 minuten timeframe. Beiden leveren profitable resultaten op.... maar met relatief hoge drawdowns (~30%, RRR=3.1).

Nu ben ik alleen niet tevreden met de huidige setup. Ik denk dat er met name nog e.e.a. kan worden verbetert aan de exits en aan voorkomen van verkeerd in te stappen (bijv extra indicator toevoegen?) Aan u allen dus de vraag om hier verbeteringen aan te brengen:

Systeem
value function zsADXDMI(value xADXperiod=15,
value xFactorL=1.2, value xFactorS=1.2, value xFactorT=1.1,
value xTrailProfitFloor=5, value xStopLossS=10, value xStopLossL=10) begin

value xADX[], xDMIp[],xDMIm[], xROC[];
value xTrailExit, xTrailStop,xShortTrailStop,xLongTrailStop,xStopLoss;

{Indicators}
xADX:=ADXCustom(High,Low,Close,xADXperiod);
xDMIp:=DMIplus(xADXperiod);
xDMIm:=DMIminus(xADXperiod);
xROC:=ROC((xDMIp-xDMIm),1);
if xROC>100 then xROC=100;
if xROC<-100 then xROC=-100;

{Entry Conditions}
Condition1= {xADX>xDMIp AND} xADX>xDMIm AND (xDMIp/xDMIm)>(xFactorL);
Condition2= xADX>xDMIp AND {xADX>xDMIm AND} (xDMIm/xDMIp)>(xFactorS);
Condition3= (xADX/(xDMIp<<xDMIm))>xFactorT;
Condition4= xADX>25;
Condition5= xADX>xADX[1];{Is er een toename in sterkte vd trend}


if xDMIp>xDMIm then xShortTrailStop=0;
if xDMIp<xDMIm then xLongTrailStop=0;


{Entries}
If MarketPosition=0 then begin
if Condition1 AND Condition3 AND xLongTrailStop=0 then begin
vEnterLong;
xTrailExit=0; xTrailStop=Lowest(low,6);
xStopLoss=EntryPrice-xStopLossL;
end;
if Condition2 AND Condition3 AND xShortTrailStop=0 then begin
vEnterShort;
xTrailExit=0; xTrailStop=Highest(high,6);
xStopLoss=EntryPrice+xStopLossS;
end;
End;


{Exit Conditions}
If MarketPosition<>0 then begin
if xTrailExit=0 then begin
if MarketPosition=1 AND Close-EntryPrice>xTrailProfitFloor then xTrailExit=1;
if MarketPosition=-1 AND EntryPrice-Close>xTrailProfitFloor then xTrailExit=1;
end;
If xTrailExit=1 then begin
if MarketPosition=1 then begin
If Lowest(low,4)>xTrailStop then xTrailStop=Lowest(low,4);
end;
if MarketPosition=-1 then begin
if Highest(high,4)<xTrailStop then xTrailStop=Highest(high,4);
end;
end;
end;


{Exits}
if MarketPosition=1 then begin
If xTrailExit=1 AND Close < xTrailStop then begin
vExitLong;
xLongTrailStop=1;
end;
{if vCrossesAbove(xDMIm,xDMIp) then vExitLong;}
if Close < xStopLoss then vExitLong;
end;

if MarketPosition=-1 then begin
if xTrailExit=1 AND Close > xTrailStop then begin
vExitShort;
xShortTrailStop=1;
end;
{if vCrossesAbove(xDMIp,xDMIm) then vExitShort;}
if Close > xStopLoss then vExitShort;
end;


plot1(Condition1,"cond1" ) ;
plot2(Condition2,"cond2" ) ;
plot3(xTrailStop,"TrailStop" ) ;
Plot4(xStopLoss,"Stoploss" ) ;

end;


Met vr groet,
Michel
poekmeister
 
Berichten: 88
Geregistreerd op: za 17 aug 2002, 19:50

Systeem zsADXDMI

Berichtdoor cees » ma 25 aug 2003, 11:46

Michel

Zou je mij de source kunnen mailen, want ik krijg de zaak niet werkend, want volgens mij gaat er bij het kopieren en plakken wat mis.
cees-vanhall@mijnmail.nl

groetjes

cees
cees
 
Berichten: 51
Geregistreerd op: wo 27 feb 2002, 19:48

Systeem zsADXDMI

Berichtdoor poekmeister » ma 25 aug 2003, 14:22

Cees,
Heb je al geprobeerd om bij mijn post de edit functie te gebruiken en vandaar uit te copy/pasten?
Probeer dit even. Ik zit momenteel niet thuis en emailen zou pas vanavond/morgen lukken....
Michel
poekmeister
 
Berichten: 88
Geregistreerd op: za 17 aug 2002, 19:50

Systeem zsADXDMI

Berichtdoor Joop Henzen » ma 25 aug 2003, 17:15

Hallo Michel

ook ik krijg na copy / paste en na controleren via de Editor foutboodschappen

groet


Joop Henzen
Joop Henzen
 
Berichten: 215
Geregistreerd op: ma 30 dec 2002, 14:21
Woonplaats: Bussum

Systeem zsADXDMI

Berichtdoor poekmeister » ma 25 aug 2003, 17:58

Joop, Cees, en anderen,

Hieronder de code zoals ie bij een groene balk geeft. De standaard instellingen leveren het rapport wat ik eronder heb gekopieerd. Zie de 59% profitability !

SYSTEEM
value function zsADXDMI(value xADXperiod=15,
value xFactorL=1.1, value xFactorS=1.1, value xFactorT=1.7,
value xTrailProfitFloor=9, value xStopLossS=10, value xStopLossL=10) begin

value xADX[], xDMIp[],xDMIm[], xROC[];
value xTrailExit, xTrailStop,xShortTrailStop,xLongTrailStop,xStopLoss;

{Indicators}
xADX:=ADXCustom(High,Low,Close,xADXperiod);
xDMIp:=DMIplus(xADXperiod);
xDMIm:=DMIminus(xADXperiod);
xROC:=ROC((xDMIp-xDMIm),1);
if xROC>100 then xROC=100;
if xROC<-100 then xROC=-100;

{Entry Conditions}
Condition1= xADX>xDMIm AND (xDMIp/xDMIm)>(xFactorL);
Condition2= xADX>xDMIp AND (xDMIm/xDMIp)>(xFactorS);
Condition3= (xADX/(xDMIp<<xDMIm))>xFactorT;
Condition4= xADX>25;
Condition5= xADX>xADX[1];{Is er een toename in sterkte vd trend}


if xDMIp>xDMIm then xShortTrailStop=0;
if xDMIp<xDMIm then xLongTrailStop=0;


{Entries}
If MarketPosition=0 then begin
if Condition1 AND Condition3 AND xLongTrailStop=0 then begin
vEnterLong;
xTrailExit=0; xTrailStop=Lowest(low,6);
xStopLoss=EntryPrice-xStopLossL;
end;
if Condition2 AND Condition3 AND xShortTrailStop=0 then begin
vEnterShort;
xTrailExit=0; xTrailStop=Highest(high,6);
xStopLoss=EntryPrice+xStopLossS;
end;
End;


{Exit Conditions}
If MarketPosition<>0 then begin
if xTrailExit=0 then begin
if MarketPosition=1 AND Close-EntryPrice>xTrailProfitFloor then xTrailExit=1;
if MarketPosition=-1 AND EntryPrice-Close>xTrailProfitFloor then xTrailExit=1;
end;
If xTrailExit=1 then begin
if MarketPosition=1 then begin
If Lowest(low,4)>xTrailStop then xTrailStop=Lowest(low,4);
end;
if MarketPosition=-1 then begin
if Highest(high,4)<xTrailStop then xTrailStop=Highest(high,4);
end;
end;
end;


{Exits}
if MarketPosition=1 then begin
If xTrailExit=1 AND Close < xTrailStop then begin
vExitLong;
xLongTrailStop=1;
end;
if Close < xStopLoss then vExitLong;
end;

if MarketPosition=-1 then begin
if xTrailExit=1 AND Close > xTrailStop then begin
vExitShort;
xShortTrailStop=1;
end;
if Close > xStopLoss then vExitShort;
end;


plot1(Condition1,"cond1");
plot2(Condition2,"cond2");
plot3(xTrailStop,"TrailStop");
plot5(xDMIp[1]-xDMIm[1]);
Plot4(xStopLoss,"Stoploss");
Plot5(xTrailExit);

end;


PERFORMANCE RAPPORT



Performance Summary: All trades

Total net profit ? ? ?48894.97 ? Open position P/L ? ? ? ?-0.00
Gross profit ? ? ? ? 183958.59 ? Gross loss ? ? ? ? ? -135063.62

Total # of trades ? ? ? ? 143 ? Percentage profitable ? ? 59%
Number winning trades ? ? ?85 ? Number losing trades ? ? ? 58

Largest winning trade ?8126.08 ? Largest losing trade ?-4497.92
Average winning trade ?2164.22 ? Average losing trade ?-2328.68
Ration avg win/loss ? ? ? 0.93 ? Avg trade (win&loss) ? ?341.92

Max consec. winners ? ? ? ? 7 ? Max consec. losers ? ? ? ? ?9
Avg # bars in winners ? ? ?83 ? Avg # bars in losers ? ? ? 86

Max intraday drawdown ? ? 2.01
Profit factor ? ? ? ? ? ? 1.36 ? Max # contracts held ? ? ?200
Account size required ? ? 2.01 ? Return on account ? ?2429644%



Performance Summary: Long trades

Total net profit ? ? ?11919.29 ? Open position P/L ? ? ? ?-0.00
Gross profit ? ? ? ? ?85580.46 ? Gross loss ? ? ? ? ? -73661.17

Total # of trades ? ? ? ? ?73 ? Percentage profitable ? ? 56%
Number winning trades ? ? ?41 ? Number losing trades ? ? ? 32

Largest winning trade ?4771.07 ? Largest losing trade ?-3248.99
Average winning trade ?2087.33 ? Average losing trade ?-2301.91
Ration avg win/loss ? ? ? 0.91 ? Avg trade (win&loss) ? ?163.28

Max consec. winners ? ? ? ? 3 ? Max consec. losers ? ? ? ? ?1
Avg # bars in winners ? ? ?93 ? Avg # bars in losers ? ? ? 80

Max intraday drawdown ? ?-0.00
Profit factor ? ? ? ? ? ? 1.16 ? Max # contracts held ? ? ?200
Account size required ? ?-0.00 ? Return on account ? ? ? ? -0%



Performance Summary: Short trades

Total net profit ? ? ?36975.68 ? Open position P/L ? ? ? ?-0.00
Gross profit ? ? ? ? ?98378.14 ? Gross loss ? ? ? ? ? -61402.46

Total # of trades ? ? ? ? ?70 ? Percentage profitable ? ? 63%
Number winning trades ? ? ?44 ? Number losing trades ? ? ? 26

Largest winning trade ?8126.08 ? Largest losing trade ?-4497.92
Average winning trade ?2235.87 ? Average losing trade ?-2361.63
Ration avg win/loss ? ? ? 0.95 ? Avg trade (win&loss) ? ?528.22

Max consec. winners ? ? ? ? 2 ? Max consec. losers ? ? ? ? ?1
Avg # bars in winners ? ? ?74 ? Avg # bars in losers ? ? ? 92

Max intraday drawdown ? ?-0.00
Profit factor ? ? ? ? ? ? 1.60 ? Max # contracts held ? ? ? -0
Account size required ? ?-0.00 ? Return on account ? ? ? ? -0%
Period from 20011101 until 20030825
Start capital = 20000, End capital = 68895
Annual gain = ?97.77%, Max. Drawdown = 30.03%
RRR = ? 3.09




(Edited by poekmeister at 9:18 pm op 1,sept. 2003)
poekmeister
 
Berichten: 88
Geregistreerd op: za 17 aug 2002, 19:50

Systeem zsADXDMI

Berichtdoor cees » ma 25 aug 2003, 19:18

Michel,

Ik heb de zaak werkend en het getest met de AEX kwartierdata vanaf 01/01/2003, waarbij ik de standaardinstellingen heb gebruikt. Het resultaat is 3 keer negatief. ?Misschien kan jij de instellingen doorgeven die jij gebruikt hebt.

groetjes

cees
cees
 
Berichten: 51
Geregistreerd op: wo 27 feb 2002, 19:48

Systeem zsADXDMI

Berichtdoor poekmeister » ma 25 aug 2003, 19:30

Cees,
Ik heb over een langere periode gedraaid> zie ook RRR rapport: Period from 20011101 until 20030825

Als ik v/a 1-1-2003 t/m vorige week draai is hij bij mij ook verliesgevend met 48% winstgevende trades.

Als je naar het tradeverloop kijkt zie je dat m.n. april slecht was met 7 verliesgevende trades op een rij.

Goed, hij werkt dus nu. Wat zijn jouw ideeen t.a.v. verbeteringen?
Michel
poekmeister
 
Berichten: 88
Geregistreerd op: za 17 aug 2002, 19:50


Keer terug naar Handelssystemen + Indicatoren

Wie is er online

Gebruikers op dit forum: Geen geregistreerde gebruikers en 4 gasten

cron