PureBytes Links
Trading Reference Links
|
For evaluation purposes I took the basket of my selection of favorite Robeco
funds and evaluated them against the system I currently use.
Backtesting over 1 year. Optimized till I found the best set of parameters.
By lack of another name I named your formulas platform 1, 2 and 3.
2 and 3 clearly give better results ocmpared to 1 although the difference
between 2 and 3 is not that great.
Generally I found for my basket Y=3 or 2 giving the best result.
To study the outcome I have attached the respective reports.
Willem jan
Message: 14
Date: Thu, 10 Jul 2003 19:07:30 -0000
From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxxxxxxx>
Subject: Re: C vs (H+L)/2 [part two]
Willem,
sorry for the delay, the day was not easy.
We may apply DEMA smoothing many times with two main results : The
amplitude increment and the phase transition to the right.
The cascade phase transition can immitate the impulse of ^NDX changes
to other markets.
Y=5 is fine for the long term NDX study, Y=8 for DAX, Y=10 for FCHI
etc.
For indicator builder or AA window use the example
N="^NDX";
O=Foreign(N,"O");H=Foreign(N,"H");L=Foreign(N,"L");C=Foreign(N,"C");
T1=5;R0=RSIA(C,T1)-RSIA((H+L),T1);
t0=50;R0=DEMA(R0,T0);
// Apply cascade smoothing
R1=DEMA(R0,T0);
R2=DEMA(R1,T0);Plot(R2,"",1,8);
R3=DEMA(R2,T0);
R4=DEMA(R3,T0);Plot(R4,"",4,8);
R5=DEMA(R4,T0);
R6=DEMA(R5,T0);Plot(R6,"",7,8);
R7=DEMA(R6,T0);
R8=DEMA(R7,T0);Plot(R8,"",5,8);
R9=DEMA(R8,T0);
R10=DEMA(R9,T0);Plot(R10,"",2,8);
// Select smoothing level
Y=Optimize("Y",10,0,10,1);
R=IIf(Y==0,R0,
IIf(Y==1,R1,
IIf(Y==2,R2,
IIf(Y==3,R3,
IIf(Y==4,R4,
IIf(Y==5,R5,
IIf(Y==6,R6,
IIf(Y==7,R7,
IIf(Y==8,R8,
IIf(Y==9,R9,R10))))))))));
// Select trading bars
X=Optimize("X",28,5,30,1);
Buy=Cross(0,R);Buy=ExRemSpan(Buy,X);Sell=Ref(Buy,-X);
Plot(R,"",9,8);
to investigate the rhytm of ^NDX affection to other markets.
Dimitris Tsokakis
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Coral Calcium for Greater Health. 1 month supply - $23.95
(1 bottle, 90 tablets, 400mg each with Magnesium & Vitamin D)
http://www.challengerone.com/t/l.asp?cid=2805&lp=calcium2.asp
http://us.click.yahoo.com/mcIe3D/v9VGAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Title: AmiBroker System Test Report
Settings
Initial Equity:
3500
Periodicity/Positions:
Daily/Long
Commissions:
4.00 per trade
Annual interest rate:
0.00%
Range:
12/05/2001 00:00:00 - 12/07/2003
Apply to:
Filter
Include Filter
Exclude Filter
Market
-
Market
-
Group
-
Group
-
Sector
-
Sector
-
Industry
-
Industry
-
Watch list
Robeco Select
Watch list
-
Index
-
Index
-
Favourite
-
Favourite
-
Margin requirement:
100
Futures mode:
No
Def. round lot size:
0
Def. Tick Size
1
Drawdowns based on:
High/Low prices
Long trades
Buy price:
Open
Sell price:
Open
Buy delay:
1
Sell delay:
1
Short trades
Short price:
Open
Cover price:
Open
Short delay:
1
Cover delay:
1
Stops
Maximum loss:
disabled
Profit target:
disabled
Value:
0.00
Value:
0.00
Exit at stop?
no
Exit at stop?
no
Trailing stop:
disabled
Value:
0.00
Exit at stop?
no
Formula/*Message: 5
Date: Mon, 7 Jul 2003 10:45:19 +0300
From: "Dimitris Tsokakis" <TSOKAKIS@xxxxxxxxx>
Subject: C vs (H+L)/2*/
Vers=1;
Swtch=2;
t0=27;
T1=36;
x=40;
TBCheck=252; //range for optimization; one year is approx. 255 trading days
LstB=0; //number of bars from last bar to start optimization and backtesting
t0=Optimize("t0",t0,25,30,1);
T1=Optimize("T1",T1,30,45,2);
R0=RSIa(C,T1)-RSIa((H+L),T1);Plot(R0,"",1,2);
R0=DEMA(R0,T0);
R1=DEMA(R0,T0);
R2=DEMA(R1,T0);
R3=DEMA(R2,T0);
R4=DEMA(R3,T0);
R5=DEMA(R4,T0);
R=R5;
Plot(R,"",2,8);
X=Optimize("X",x,35,45,1);
Buy=Cross(0,R);
Buy=ExRemSpan(Buy,X);
Sell=Ref(Buy,-X);
Short=Sell;
Cover=Buy;
Buy = ExRem( Buy, Sell ); Sell = ExRem( Sell, Buy ); Short = ExRem( Short, Cover ); Cover = ExRem( Cover, Short );
buybars = BarsSince( Buy );sellbars = BarsSince( Sell );coverbars = BarsSince( Cover );shortbars = BarsSince( Short );
MarginDeposit=3500;
PositionSize=MarginDeposit;
Equity(1);
//e=Equity(0,1,1300)-Equity(0,1,0);
e=Equity(0,-1,50)-PositionSize;
e1=Equity(0,-1,25)-PositionSize;
e2=Equity(0,-1,75)-PositionSize;
e3=Equity(0,-1,100)-PositionSize;
et=Equity(1,-1,PositionSize);
GraphXSpace=5;
TB=LstB+TBCheck;
CurBar = Cum(1);TotalBars = LastValue( CurBar );
inrange = CurBar >= TotalBars -TB AND CurBar <= TotalBars- LstB;
Buy = Buy AND inrange;Sell = Sell AND inrange;Short = Short AND inrange;Cover = Cover AND inrange;
Filter=CurBar >= TotalBars -TB AND CurBar <= TotalBars- LstB AND Buy OR Sell;
AlertIf( Short AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 3,2,4 );
AlertIf( Buy AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 1,2,4 );
AlertIf( Sell AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 2,2,4 );
AlertIf( Cover AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 4,2,4 );
PlotShapes(IIf(Sell==1,shapeDownArrow,shapeNone),colorRed,Layer=0,yposition=0,Offset=5); //Short
PlotShapes(IIf(Buy==1,shapeUpArrow,shapeNone),colorGreen,Layer=0,yposition=0,Offset=-10); //BUY
PlotShapes(IIf(Short==1,shapeSmallDownTriangle,shapeNone),colorRed,Layer=0,yposition=0,Offset=5); //Sell
PlotShapes(IIf(Cover==1,shapeSmallUpTriangle,shapeNone),colorDarkGreen,Layer=0,yposition=0,Offset=-10); // Cover
Plot(3, /* defines the height of the ribbon in percent of pane width */"Ribbon",IIf( buybars<sellbars,colorGreen ,colorBlack),/*choose color */styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
Title =Name() + " C vs (H+L)/2; "+"; Version: " +WriteVal(Vers,format=1.0)+" "+"Bars: "+WriteVal(TBCheck,format=1.0)+EncodeColor(colorBlack)+";\nEquity:"+"\nTotal ("+WriteVal(TBCheck,format=1.0)+" bars): "+EncodeColor(colorDarkBlue)+WriteVal(Et,format=1)+EncodeColor(colorBlack)+";\nToday "+EncodeColor(colorBlue)+WriteVal(e1,format=1.0)+EncodeColor(colorBlack)+";\nLast 2 days : "+EncodeColor(colorBlue)+WriteVal(e,format=1.0)+EncodeColor(colorBlack)+";\nLast 3 days : "+EncodeColor(colorBlue)+WriteVal(e2,format=1.0)+EncodeColor(colorBlack)+";\nLast 4 days : "+EncodeColor(colorBlue)+WriteVal(e3,format=1.0)+";\nAlerts are "+WriteIf(Swtch==1,"ON","OUT");
Overall performance summary
Total net profit:
2702.50
Total commissions paid:
32.00
Return on account:
15.44 %
Open position gain/loss
2158.66
Buy&Hold profit:
-7957.32
Bars (avg. days) in test:
2755 (789)
Buy&Hold % return:
-45.47%
System to Buy&Hold index:
133.96%
Annual system % return:
6.87%
Annual B&H % return:
-24.46%
System drawdown:
-645.55
B&H drawdown:
-2940.84
Max. system drawdown:
-944.19
B&H max. drawdown:
-3450.99
Max. system % drawdown:
-22.05%
B&H max. % drawdown:
-86.04%
Max. trade drawdown:
-944.19
Max. trade % drawdown:
-22.05%
Trade drawdown:
-645.55
Total number of trades:
4
Percent profitable:
25.0%
Number winning trades:
1
Number losing trades:
3
Profit of winners:
1226.72
Loss of losers:
-698.88
Total # of bars in winners:
41
Total # of bars in losers:
123
Commissions paid in winners:
8.00
Commissions paid in losers:
24.00
Largest winning trade:
1226.72
Largest losing trade:
-562.80
# of bars in largest winner:
41
# bars in largest loser:
41
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
1226.72
Average losing trade:
-232.96
Avg. # of bars in winners:
41.0
Avg. # bars in losers:
41.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
1
Max consec. losers:
1
Bars out of the market:
2484
Interest earned:
0.00
Exposure:
9.8%
Risk adjusted ann. return:
69.83%
Ratio avg win/avg loss:
5.27
Avg. trade (win & loss):
131.96
Profit factor:
1.76
Performance for RGZSCHI
Total net profit:
94.09
Total commissions paid:
8.00
Return on account:
2.69 %
Open position gain/loss
218.18
Buy&Hold profit:
-1233.06
Bars (days) in test:
550 (789)
Buy&Hold % return:
-35.23%
System to Buy&Hold index:
107.63%
Annual system % return:
1.23%
Annual B&H % return:
-18.20%
System drawdown:
-272.69
B&H drawdown:
-1854.34
Max. system drawdown:
-425.30
B&H max. drawdown:
-2211.22
Max. system % drawdown:
-11.64%
B&H max. % drawdown:
-57.33%
Max. trade drawdown:
-425.30
Max. trade % drawdown:
-11.64%
Trade drawdown:
-272.69
Total number of trades:
1
Percent profitable:
0.0%
Number winning trades:
0
Number losing trades:
1
Profit of winners:
0.00
Loss of losers:
-128.09
Total # of bars in winners:
0
Total # of bars in losers:
41
Commissions paid in winners:
0.00
Commissions paid in losers:
8.00
Largest winning trade:
0.00
Largest losing trade:
-128.09
# of bars in largest winner:
0
# bars in largest loser:
41
Commission paid in largest winner:
0.00
Commission paid in largest loser:
8.00
Average winning trade:
N/A
Average losing trade:
-128.09
Avg. # of bars in winners:
N/A
Avg. # bars in losers:
41.0
Avg. commission paid in winner:
N/A
Avg. commission paid in loser:
8.00
Max consec. winners:
0
Max consec. losers:
1
Bars out of the market:
503
Interest earned:
0.00
Exposure:
8.5%
Risk adjusted ann. return:
14.45%
Ratio avg win/avg loss:
N/A
Avg. trade (win & loss):
-128.09
Profit factor:
0.00
Trade list for RGZSCHI
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
24.0000
06/01/2003
13.9900
0.0000
3500.0000
Long
06/01/2003
13.9900
03/03/2003
13.5100
-128.0857
3371.9143
Out
03/03/2003
13.5100
04/07/2003
14.6100
0.0000
3371.9143
Open Long
04/07/2003
14.6100
11/07/2003
15.5900
222.1792
3594.0935
Performance for RGZSCT
Total net profit:
439.44
Total commissions paid:
8.00
Return on account:
12.56 %
Open position gain/loss
443.44
Buy&Hold profit:
-2612.75
Bars (days) in test:
552 (789)
Buy&Hold % return:
-74.65%
System to Buy&Hold index:
116.82%
Annual system % return:
5.62%
Annual B&H % return:
-47.00%
System drawdown:
-162.79
B&H drawdown:
-2940.84
Max. system drawdown:
-944.19
B&H max. drawdown:
-3450.99
Max. system % drawdown:
-22.05%
B&H max. % drawdown:
-86.04%
Max. trade drawdown:
-944.19
Max. trade % drawdown:
-22.05%
Trade drawdown:
-162.79
Total number of trades:
1
Percent profitable:
0.0%
Number winning trades:
0
Number losing trades:
1
Profit of winners:
0.00
Loss of losers:
-8.00
Total # of bars in winners:
0
Total # of bars in losers:
41
Commissions paid in winners:
0.00
Commissions paid in losers:
8.00
Largest winning trade:
0.00
Largest losing trade:
-8.00
# of bars in largest winner:
0
# bars in largest loser:
41
Commission paid in largest winner:
0.00
Commission paid in largest loser:
8.00
Average winning trade:
N/A
Average losing trade:
-8.00
Avg. # of bars in winners:
N/A
Avg. # bars in losers:
41.0
Avg. commission paid in winner:
N/A
Avg. commission paid in loser:
8.00
Max consec. winners:
0
Max consec. losers:
1
Bars out of the market:
481
Interest earned:
0.00
Exposure:
12.9%
Risk adjusted ann. return:
43.72%
Ratio avg win/avg loss:
N/A
Avg. trade (win & loss):
-8.00
Profit factor:
0.00
Trade list for RGZSCT
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
11.6500
31/12/2002
2.1500
0.0000
3500.0000
Long
31/12/2002
2.1500
26/02/2003
2.1500
-8.0000
3492.0000
Out
26/02/2003
2.1500
02/06/2003
2.6300
0.0000
3492.0000
Open Long
02/06/2003
2.6300
11/07/2003
2.9700
447.4371
3939.4371
Performance for RGZSEB
Total net profit:
2171.32
Total commissions paid:
8.00
Return on account:
62.04 %
Open position gain/loss
940.60
Buy&Hold profit:
-1767.17
Bars (days) in test:
551 (789)
Buy&Hold % return:
-50.49%
System to Buy&Hold index:
222.87%
Annual system % return:
25.02%
Annual B&H % return:
-27.76%
System drawdown:
-291.67
B&H drawdown:
-2442.41
Max. system drawdown:
-408.33
B&H max. drawdown:
-3128.84
Max. system % drawdown:
-10.08%
B&H max. % drawdown:
-74.72%
Max. trade drawdown:
-408.33
Max. trade % drawdown:
-10.08%
Trade drawdown:
-291.67
Total number of trades:
1
Percent profitable:
100.0%
Number winning trades:
1
Number losing trades:
0
Profit of winners:
1226.72
Loss of losers:
0.00
Total # of bars in winners:
41
Total # of bars in losers:
0
Commissions paid in winners:
8.00
Commissions paid in losers:
0.00
Largest winning trade:
1226.72
Largest losing trade:
0.00
# of bars in largest winner:
41
# bars in largest loser:
0
Commission paid in largest winner:
8.00
Commission paid in largest loser:
0.00
Average winning trade:
1226.72
Average losing trade:
N/A
Avg. # of bars in winners:
41.0
Avg. # bars in losers:
N/A
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
N/A
Max consec. winners:
1
Max consec. losers:
0
Bars out of the market:
472
Interest earned:
0.00
Exposure:
14.3%
Risk adjusted ann. return:
174.49%
Ratio avg win/avg loss:
N/A
Avg. trade (win & loss):
1226.72
Profit factor:
N/A
Trade list for RGZSEB
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
10.9500
01/10/2002
3.6000
0.0000
3500.0000
Long
01/10/2002
3.6000
26/11/2002
4.8700
1226.7222
4726.7222
Out
26/11/2002
4.8700
21/05/2003
4.2800
0.0000
4726.7222
Open Long
21/05/2003
4.2800
11/07/2003
5.4400
944.5980
5671.3202
Performance for RGZSJAP
Total net profit:
0.00
Total commissions paid:
0.00
Return on account:
0.00 %
Open position gain/loss
0.00
Buy&Hold profit:
-1581.36
Bars (days) in test:
551 (789)
Buy&Hold % return:
-45.18%
System to Buy&Hold index:
100.00%
Annual system % return:
0.00%
Annual B&H % return:
-24.28%
System drawdown:
0.00
B&H drawdown:
-1921.36
Max. system drawdown:
0.00
B&H max. drawdown:
-2071.96
Max. system % drawdown:
0.00%
B&H max. % drawdown:
-56.75%
Max. trade drawdown:
0.00
Max. trade % drawdown:
0.00%
Trade drawdown:
0.00
Total number of trades:
0
Percent profitable:
N/A
Number winning trades:
0
Number losing trades:
0
Profit of winners:
0.00
Loss of losers:
0.00
Total # of bars in winners:
0
Total # of bars in losers:
0
Commissions paid in winners:
0.00
Commissions paid in losers:
0.00
Largest winning trade:
0.00
Largest losing trade:
0.00
# of bars in largest winner:
0
# bars in largest loser:
0
Commission paid in largest winner:
0.00
Commission paid in largest loser:
0.00
Average winning trade:
N/A
Average losing trade:
N/A
Avg. # of bars in winners:
N/A
Avg. # bars in losers:
N/A
Avg. commission paid in winner:
N/A
Avg. commission paid in loser:
N/A
Max consec. winners:
0
Max consec. losers:
0
Bars out of the market:
550
Interest earned:
0.00
Exposure:
0.2%
Risk adjusted ann. return:
0.00%
Ratio avg win/avg loss:
N/A
Avg. trade (win & loss):
N/A
Profit factor:
N/A
Trade list for RGZSJAP
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
54.5500
11/07/2003
30.0000
0.0000
3500.0000
Performance for RGZSPOL
Total net profit:
-2.35
Total commissions paid:
8.00
Return on account:
-0.07 %
Open position gain/loss
556.44
Buy&Hold profit:
-762.99
Bars (days) in test:
551 (789)
Buy&Hold % return:
-21.80%
System to Buy&Hold index:
99.69%
Annual system % return:
-0.03%
Annual B&H % return:
-10.75%
System drawdown:
-645.55
B&H drawdown:
-1440.80
Max. system drawdown:
-645.55
B&H max. drawdown:
-1686.26
Max. system % drawdown:
-18.44%
B&H max. % drawdown:
-45.02%
Max. trade drawdown:
-645.55
Max. trade % drawdown:
-18.44%
Trade drawdown:
-645.55
Total number of trades:
1
Percent profitable:
0.0%
Number winning trades:
0
Number losing trades:
1
Profit of winners:
0.00
Loss of losers:
-562.80
Total # of bars in winners:
0
Total # of bars in losers:
41
Commissions paid in winners:
0.00
Commissions paid in losers:
8.00
Largest winning trade:
0.00
Largest losing trade:
-562.80
# of bars in largest winner:
0
# bars in largest loser:
41
Commission paid in largest winner:
0.00
Commission paid in largest loser:
8.00
Average winning trade:
N/A
Average losing trade:
-562.80
Avg. # of bars in winners:
N/A
Avg. # bars in losers:
41.0
Avg. commission paid in winner:
N/A
Avg. commission paid in loser:
8.00
Max consec. winners:
0
Max consec. losers:
1
Bars out of the market:
478
Interest earned:
0.00
Exposure:
13.2%
Risk adjusted ann. return:
-0.23%
Ratio avg win/avg loss:
N/A
Avg. trade (win & loss):
-562.80
Profit factor:
0.00
Trade list for RGZSPOL
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
47.0000
04/12/2002
37.4100
0.0000
3500.0000
Long
04/12/2002
37.4100
04/02/2003
31.4800
-562.7982
2937.2018
Out
04/02/2003
31.4800
29/05/2003
30.9100
0.0000
2937.2018
Open Long
29/05/2003
30.9100
11/07/2003
36.8500
560.4443
3497.6461
Title: AmiBroker System Test Report
Settings
Initial Equity:
3500
Periodicity/Positions:
Daily/Long
Commissions:
4.00 per trade
Annual interest rate:
0.00%
Range:
12/05/2001 00:00:00 - 12/07/2003
Apply to:
Filter
Include Filter
Exclude Filter
Market
-
Market
-
Group
-
Group
-
Sector
-
Sector
-
Industry
-
Industry
-
Watch list
Robeco Select
Watch list
-
Index
-
Index
-
Favourite
-
Favourite
-
Margin requirement:
100
Futures mode:
No
Def. round lot size:
0
Def. Tick Size
1
Drawdowns based on:
High/Low prices
Long trades
Buy price:
Open
Sell price:
Open
Buy delay:
1
Sell delay:
1
Short trades
Short price:
Open
Cover price:
Open
Short delay:
1
Cover delay:
1
Stops
Maximum loss:
disabled
Profit target:
disabled
Value:
0.00
Value:
0.00
Exit at stop?
no
Exit at stop?
no
Trailing stop:
disabled
Value:
0.00
Exit at stop?
no
Formula/*Message: 5
Date: Mon, 7 Jul 2003 10:45:19 +0300
From: "Dimitris Tsokakis" <TSOKAKIS@xxxxxxxxx>
Subject: C vs (H+L)/2 II */
Vers=1;
Swtch=2;
t0=16;
T1=21;
x=21;
TBCheck=252; //range for optimization; one year is approx. 255 trading days
LstB=0; //number of bars from last bar to start optimization and backtesting
t0=Optimize("t0",t0,10,20,1);
T1=Optimize("T1",T1,15,25,2);
R0=RSIa(C,T1)-RSIa((H+L),T1);Plot(R0,"",1,1);
R0=DEMA(R0,T0);
R1=DEMA(R0,T0);
R2=DEMA(R1,T0);
R3=DEMA(R2,T0);
R4=DEMA(R3,T0);
R5=DEMA(R4,T0);
R=R5;Plot(R,"",2,8);
X=Optimize("X",x,10,35,1);
Buy=Cross(0,R) OR Ref(R,-1)==HHV(R,3);
Buy=ExRemSpan(Buy,X);
Sell=Ref(Buy,-X);
Short=Sell;Cover=Buy;
Buy = ExRem( Buy, Sell ); Sell = ExRem( Sell, Buy ); Short = ExRem( Short, Cover ); Cover = ExRem( Cover, Short );
buybars = BarsSince( Buy );sellbars = BarsSince( Sell );coverbars = BarsSince( Cover );shortbars = BarsSince( Short );
MarginDeposit=3500;
PositionSize=MarginDeposit;
Equity(1);
//e=Equity(0,1,1300)-Equity(0,1,0);
e=Equity(0,-1,50)-PositionSize;
e1=Equity(0,-1,25)-PositionSize;
e2=Equity(0,-1,75)-PositionSize;
e3=Equity(0,-1,100)-PositionSize;
et=Equity(1,-1,PositionSize);
GraphXSpace=5;
TB=LstB+TBCheck;
CurBar = Cum(1);TotalBars = LastValue( CurBar );
inrange = CurBar >= TotalBars -TB AND CurBar <= TotalBars- LstB;
Buy = Buy AND inrange;Sell = Sell AND inrange;Short = Short AND inrange;Cover = Cover AND inrange;
Filter=CurBar >= TotalBars -TB AND CurBar <= TotalBars- LstB AND Buy OR Sell;
AlertIf( Short AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 3,2,4 );
AlertIf( Buy AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 1,2,4 );
AlertIf( Sell AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 2,2,4 );
AlertIf( Cover AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 4,2,4 );
PlotShapes(IIf(Sell==1,shapeDownArrow,shapeNone),colorRed,Layer=0,yposition=0,Offset=5); //Short
PlotShapes(IIf(Buy==1,shapeUpArrow,shapeNone),colorGreen,Layer=0,yposition=0,Offset=-10); //BUY
PlotShapes(IIf(Short==1,shapeSmallDownTriangle,shapeNone),colorRed,Layer=0,yposition=0,Offset=5); //Sell
PlotShapes(IIf(Cover==1,shapeSmallUpTriangle,shapeNone),colorDarkGreen,Layer=0,yposition=0,Offset=-10); // Cover
Plot(3, /* defines the height of the ribbon in percent of pane width */"Ribbon",IIf( buybars<sellbars,colorGreen ,colorBlack),/*choose color */styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
Title =Name() + " C vs (H+L)/2 II"+"; Version: " +WriteVal(Vers,format=1.0)+" "+"Bars: "+WriteVal(TBCheck,format=1.0)+EncodeColor(colorBlack)+";\nEquity:"+"\nTotal ("+WriteVal(TBCheck,format=1.0)+" bars): "+EncodeColor(colorDarkBlue)+WriteVal(Et,format=1)+EncodeColor(colorBlack)+";\nToday "+EncodeColor(colorBlue)+WriteVal(e1,format=1.0)+EncodeColor(colorBlack)+";\nLast 2 days : "+EncodeColor(colorBlue)+WriteVal(e,format=1.0)+EncodeColor(colorBlack)+";\nLast 3 days : "+EncodeColor(colorBlue)+WriteVal(e2,format=1.0)+EncodeColor(colorBlack)+";\nLast 4 days : "+EncodeColor(colorBlue)+WriteVal(e3,format=1.0)+";\nAlerts are "+WriteIf(Swtch==1,"ON","OUT");
Overall performance summary
Total net profit:
4473.50
Total commissions paid:
200.00
Return on account:
25.56 %
Open position gain/loss
1202.36
Buy&Hold profit:
-7957.32
Bars (avg. days) in test:
2755 (789)
Buy&Hold % return:
-45.47%
System to Buy&Hold index:
156.22%
Annual system % return:
11.11%
Annual B&H % return:
-24.46%
System drawdown:
-556.94
B&H drawdown:
-2940.84
Max. system drawdown:
-1140.27
B&H max. drawdown:
-3450.99
Max. system % drawdown:
-27.92%
B&H max. % drawdown:
-86.04%
Max. trade drawdown:
-1019.68
Max. trade % drawdown:
-25.68%
Trade drawdown:
-950.79
Total number of trades:
25
Percent profitable:
60.0%
Number winning trades:
15
Number losing trades:
10
Profit of winners:
4771.68
Loss of losers:
-1512.54
Total # of bars in winners:
330
Total # of bars in losers:
220
Commissions paid in winners:
120.00
Commissions paid in losers:
80.00
Largest winning trade:
882.35
Largest losing trade:
-283.59
# of bars in largest winner:
22
# bars in largest loser:
22
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
318.11
Average losing trade:
-151.25
Avg. # of bars in winners:
22.0
Avg. # bars in losers:
22.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
3
Max consec. losers:
3
Bars out of the market:
2163
Interest earned:
0.00
Exposure:
21.5%
Risk adjusted ann. return:
51.68%
Ratio avg win/avg loss:
2.10
Avg. trade (win & loss):
130.37
Profit factor:
3.15
Performance for RGZSCHI
Total net profit:
-84.51
Total commissions paid:
40.00
Return on account:
-2.41 %
Open position gain/loss
0.00
Buy&Hold profit:
-1233.06
Bars (days) in test:
550 (789)
Buy&Hold % return:
-35.23%
System to Buy&Hold index:
93.15%
Annual system % return:
-1.12%
Annual B&H % return:
-18.20%
System drawdown:
-514.91
B&H drawdown:
-1854.34
Max. system drawdown:
-815.05
B&H max. drawdown:
-2211.22
Max. system % drawdown:
-21.45%
B&H max. % drawdown:
-57.33%
Max. trade drawdown:
-516.50
Max. trade % drawdown:
-14.75%
Trade drawdown:
-418.50
Total number of trades:
5
Percent profitable:
40.0%
Number winning trades:
2
Number losing trades:
3
Profit of winners:
453.52
Loss of losers:
-538.03
Total # of bars in winners:
44
Total # of bars in losers:
66
Commissions paid in winners:
16.00
Commissions paid in losers:
24.00
Largest winning trade:
274.70
Largest losing trade:
-213.43
# of bars in largest winner:
22
# bars in largest loser:
22
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
226.76
Average losing trade:
-179.34
Avg. # of bars in winners:
22.0
Avg. # bars in losers:
22.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
1
Max consec. losers:
2
Bars out of the market:
440
Interest earned:
0.00
Exposure:
20.0%
Risk adjusted ann. return:
-5.62%
Ratio avg win/avg loss:
1.26
Avg. trade (win & loss):
-16.90
Profit factor:
0.84
Trade list for RGZSCHI
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
24.0000
16/09/2002
14.0300
0.0000
3500.0000
Long
16/09/2002
14.0300
15/10/2002
13.4300
-157.6791
3342.3209
Out
15/10/2002
13.4300
31/10/2002
13.3600
0.0000
3342.3209
Long
31/10/2002
13.3600
29/11/2002
14.4900
274.6963
3617.0172
Out
29/11/2002
14.4900
04/02/2003
13.6300
0.0000
3617.0172
Long
04/02/2003
13.6300
05/03/2003
12.8300
-213.4292
3403.5880
Out
05/03/2003
12.8300
02/04/2003
12.8500
0.0000
3403.5880
Long
02/04/2003
12.8500
07/05/2003
12.2500
-166.9225
3236.6655
Out
07/05/2003
12.2500
26/05/2003
13.3400
0.0000
3236.6655
Long
26/05/2003
13.3400
24/06/2003
14.1100
178.8239
3415.4894
Out
24/06/2003
14.1100
11/07/2003
15.5900
0.0000
3415.4894
Performance for RGZSCT
Total net profit:
1892.28
Total commissions paid:
40.00
Return on account:
54.07 %
Open position gain/loss
414.64
Buy&Hold profit:
-2612.75
Bars (days) in test:
552 (789)
Buy&Hold % return:
-74.65%
System to Buy&Hold index:
172.42%
Annual system % return:
22.13%
Annual B&H % return:
-47.00%
System drawdown:
-556.94
B&H drawdown:
-2940.84
Max. system drawdown:
-1140.27
B&H max. drawdown:
-3450.99
Max. system % drawdown:
-27.92%
B&H max. % drawdown:
-86.04%
Max. trade drawdown:
-1019.68
Max. trade % drawdown:
-25.68%
Trade drawdown:
-950.79
Total number of trades:
5
Percent profitable:
80.0%
Number winning trades:
4
Number losing trades:
1
Profit of winners:
1757.23
Loss of losers:
-283.59
Total # of bars in winners:
88
Total # of bars in losers:
22
Commissions paid in winners:
32.00
Commissions paid in losers:
8.00
Largest winning trade:
882.35
Largest losing trade:
-283.59
# of bars in largest winner:
22
# bars in largest loser:
22
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
439.31
Average losing trade:
-283.59
Avg. # of bars in winners:
22.0
Avg. # bars in losers:
22.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
3
Max consec. losers:
1
Bars out of the market:
433
Interest earned:
0.00
Exposure:
21.6%
Risk adjusted ann. return:
102.67%
Ratio avg win/avg loss:
1.55
Avg. trade (win & loss):
294.73
Profit factor:
6.20
Trade list for RGZSCT
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
11.6500
26/07/2002
2.7000
0.0000
3500.0000
Long
26/07/2002
2.7000
26/08/2002
3.0100
393.8518
3893.8518
Out
26/08/2002
3.0100
17/09/2002
2.5400
0.0000
3893.8518
Long
17/09/2002
2.5400
16/10/2002
2.3400
-283.5906
3610.2611
Out
16/10/2002
2.3400
30/10/2002
2.2800
0.0000
3610.2611
Long
30/10/2002
2.2800
28/11/2002
2.8600
882.3508
4492.6119
Out
28/11/2002
2.8600
31/01/2003
2.1900
0.0000
4492.6119
Long
31/01/2003
2.1900
03/03/2003
2.2000
7.9817
4500.5936
Out
03/03/2003
2.2000
01/04/2003
2.1100
0.0000
4500.5936
Long
01/04/2003
2.1100
05/05/2003
2.4000
473.0430
4973.6367
Out
05/05/2003
2.4000
01/07/2003
2.6500
0.0000
4973.6367
Open Long
01/07/2003
2.6500
11/07/2003
2.9700
418.6414
5392.2781
Performance for RGZSEB
Total net profit:
1762.91
Total commissions paid:
32.00
Return on account:
50.37 %
Open position gain/loss
466.95
Buy&Hold profit:
-1767.17
Bars (days) in test:
551 (789)
Buy&Hold % return:
-50.49%
System to Buy&Hold index:
199.76%
Annual system % return:
20.77%
Annual B&H % return:
-27.76%
System drawdown:
-395.89
B&H drawdown:
-2442.41
Max. system drawdown:
-462.74
B&H max. drawdown:
-3128.84
Max. system % drawdown:
-12.27%
B&H max. % drawdown:
-74.72%
Max. trade drawdown:
-422.88
Max. trade % drawdown:
-11.99%
Trade drawdown:
-395.89
Total number of trades:
4
Percent profitable:
75.0%
Number winning trades:
3
Number losing trades:
1
Profit of winners:
1335.95
Loss of losers:
-43.99
Total # of bars in winners:
66
Total # of bars in losers:
22
Commissions paid in winners:
24.00
Commissions paid in losers:
8.00
Largest winning trade:
529.42
Largest losing trade:
-43.99
# of bars in largest winner:
22
# bars in largest loser:
22
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
445.32
Average losing trade:
-43.99
Avg. # of bars in winners:
22.0
Avg. # bars in losers:
22.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
3
Max consec. losers:
1
Bars out of the market:
443
Interest earned:
0.00
Exposure:
19.6%
Risk adjusted ann. return:
105.96%
Ratio avg win/avg loss:
10.12
Avg. trade (win & loss):
322.99
Profit factor:
30.37
Trade list for RGZSEB
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
10.9500
30/07/2002
3.8900
0.0000
3500.0000
Long
30/07/2002
3.8900
28/08/2002
3.8500
-43.9899
3456.0101
Out
28/08/2002
3.8500
01/11/2002
4.1800
0.0000
3456.0101
Long
01/11/2002
4.1800
02/12/2002
4.8300
529.4179
3985.4280
Out
02/12/2002
4.8300
11/03/2003
3.6300
0.0000
3985.4280
Long
11/03/2003
3.6300
09/04/2003
4.0100
358.3913
4343.8193
Out
09/04/2003
4.0100
11/04/2003
3.9900
0.0000
4343.8193
Long
11/04/2003
3.9900
15/05/2003
4.5100
448.1405
4791.9599
Out
15/05/2003
4.5100
16/06/2003
4.7900
0.0000
4791.9599
Open Long
16/06/2003
4.7900
11/07/2003
5.4400
470.9479
5262.9078
Performance for RGZSJAP
Total net profit:
232.00
Total commissions paid:
48.00
Return on account:
6.63 %
Open position gain/loss
320.77
Buy&Hold profit:
-1581.36
Bars (days) in test:
551 (789)
Buy&Hold % return:
-45.18%
System to Buy&Hold index:
114.67%
Annual system % return:
3.01%
Annual B&H % return:
-24.28%
System drawdown:
-482.16
B&H drawdown:
-1921.36
Max. system drawdown:
-482.16
B&H max. drawdown:
-2071.96
Max. system % drawdown:
-13.78%
B&H max. % drawdown:
-56.75%
Max. trade drawdown:
-268.15
Max. trade % drawdown:
-7.66%
Trade drawdown:
-268.15
Total number of trades:
6
Percent profitable:
33.3%
Number winning trades:
2
Number losing trades:
4
Profit of winners:
288.55
Loss of losers:
-381.32
Total # of bars in winners:
44
Total # of bars in losers:
88
Commissions paid in winners:
16.00
Commissions paid in losers:
32.00
Largest winning trade:
269.93
Largest losing trade:
-130.98
# of bars in largest winner:
22
# bars in largest loser:
22
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
144.27
Average losing trade:
-95.33
Avg. # of bars in winners:
22.0
Avg. # bars in losers:
22.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
1
Max consec. losers:
3
Bars out of the market:
406
Interest earned:
0.00
Exposure:
26.3%
Risk adjusted ann. return:
11.45%
Ratio avg win/avg loss:
1.51
Avg. trade (win & loss):
-15.46
Profit factor:
0.76
Trade list for RGZSJAP
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
54.5500
30/08/2002
34.7200
0.0000
3500.0000
Long
30/08/2002
34.7200
30/09/2002
33.5000
-130.9840
3369.0160
Out
30/09/2002
33.5000
04/10/2002
31.7500
0.0000
3369.0160
Long
04/10/2002
31.7500
04/11/2002
30.7600
-113.0496
3255.9664
Out
04/11/2002
30.7600
08/11/2002
30.6100
0.0000
3255.9664
Long
08/11/2002
30.6100
09/12/2002
30.0800
-64.3758
3191.5906
Out
09/12/2002
30.0800
20/12/2002
28.7700
0.0000
3191.5906
Long
20/12/2002
28.7700
24/01/2003
29.0100
18.6243
3210.2149
Out
24/01/2003
29.0100
05/03/2003
27.2000
0.0000
3210.2149
Long
05/03/2003
27.2000
03/04/2003
26.6500
-72.9126
3137.3023
Out
03/04/2003
26.6500
26/05/2003
25.0600
0.0000
3137.3023
Long
26/05/2003
25.0600
24/06/2003
27.2800
269.9256
3407.2279
Out
24/06/2003
27.2800
25/06/2003
27.3600
0.0000
3407.2279
Open Long
25/06/2003
27.3600
11/07/2003
30.0000
324.7675
3731.9954
Performance for RGZSPOL
Total net profit:
670.83
Total commissions paid:
40.00
Return on account:
19.17 %
Open position gain/loss
0.00
Buy&Hold profit:
-762.99
Bars (days) in test:
551 (789)
Buy&Hold % return:
-21.80%
System to Buy&Hold index:
187.92%
Annual system % return:
8.45%
Annual B&H % return:
-10.75%
System drawdown:
-100.44
B&H drawdown:
-1440.80
Max. system drawdown:
-474.98
B&H max. drawdown:
-1686.26
Max. system % drawdown:
-12.24%
B&H max. % drawdown:
-45.02%
Max. trade drawdown:
-413.57
Max. trade % drawdown:
-10.85%
Trade drawdown:
-305.69
Total number of trades:
5
Percent profitable:
80.0%
Number winning trades:
4
Number losing trades:
1
Profit of winners:
936.43
Loss of losers:
-265.61
Total # of bars in winners:
88
Total # of bars in losers:
22
Commissions paid in winners:
32.00
Commissions paid in losers:
8.00
Largest winning trade:
395.77
Largest losing trade:
-265.61
# of bars in largest winner:
22
# bars in largest loser:
22
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
234.11
Average losing trade:
-265.61
Avg. # of bars in winners:
22.0
Avg. # bars in losers:
22.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
2
Max consec. losers:
1
Bars out of the market:
441
Interest earned:
0.00
Exposure:
20.0%
Risk adjusted ann. return:
42.33%
Ratio avg win/avg loss:
0.88
Avg. trade (win & loss):
134.17
Profit factor:
3.53
Trade list for RGZSPOL
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
47.0000
06/09/2002
29.6200
0.0000
3500.0000
Long
06/09/2002
29.6200
07/10/2002
29.9500
30.9939
3530.9939
Out
07/10/2002
29.9500
01/11/2002
34.7200
0.0000
3530.9939
Long
01/11/2002
34.7200
02/12/2002
36.6000
181.5158
3712.5098
Out
02/12/2002
36.6000
05/02/2003
30.5700
0.0000
3712.5098
Long
05/02/2003
30.5700
06/03/2003
28.3200
-265.6055
3446.9043
Out
06/03/2003
28.3200
02/04/2003
27.8300
0.0000
3446.9043
Long
02/04/2003
27.8300
06/05/2003
31.0900
395.7696
3842.6739
Out
06/05/2003
31.0900
05/06/2003
31.3400
0.0000
3842.6739
Long
05/06/2003
31.3400
04/07/2003
34.3500
328.1517
4170.8256
Out
04/07/2003
34.3500
11/07/2003
36.8500
0.0000
4170.8256
Title: AmiBroker System Test Report
Settings
Initial Equity:
3500
Periodicity/Positions:
Daily/Long
Commissions:
4.00 per trade
Annual interest rate:
0.00%
Range:
12/05/2001 00:00:00 - 12/07/2003
Apply to:
Filter
Include Filter
Exclude Filter
Market
-
Market
-
Group
-
Group
-
Sector
-
Sector
-
Industry
-
Industry
-
Watch list
Robeco Select
Watch list
-
Index
-
Index
-
Favourite
-
Favourite
-
Margin requirement:
100
Futures mode:
No
Def. round lot size:
0
Def. Tick Size
1
Drawdowns based on:
High/Low prices
Long trades
Buy price:
Open
Sell price:
Open
Buy delay:
1
Sell delay:
1
Short trades
Short price:
Open
Cover price:
Open
Short delay:
1
Cover delay:
1
Stops
Maximum loss:
disabled
Profit target:
disabled
Value:
0.00
Value:
0.00
Exit at stop?
no
Exit at stop?
no
Trailing stop:
disabled
Value:
0.00
Exit at stop?
no
Formula/*Message: 5
Date: Mon, 7 Jul 2003 10:45:19 +0300
From: "Dimitris Tsokakis" <TSOKAKIS@xxxxxxxxx>
Subject: C vs (H+L)/2 III */
Vers=1;
Swtch=2;
Y=3;
t0=21;
T1=10;
x=16;
TBCheck=772; //range for optimization; one year is approx. 255 trading days
LstB=0; //number of bars from last bar to start optimization and backtesting
t0=Optimize("t0",t0,10,25,1);
T1=Optimize("T1",T1,10,25,2);
R0=RSIa(C,T1)-RSIa((H+L),T1);
R0=DEMA(R0,T0);
// Apply cascade smoothing
R1=DEMA(R0,T0);
R2=DEMA(R1,T0);Plot(R2,"",1,8);
R3=DEMA(R2,T0);
R4=DEMA(R3,T0);Plot(R4,"",4,8);
R5=DEMA(R4,T0);
R6=DEMA(R5,T0);Plot(R6,"",7,8);
R7=DEMA(R6,T0);
R8=DEMA(R7,T0);Plot(R8,"",5,8);
R9=DEMA(R8,T0);
R10=DEMA(R9,T0);Plot(R10,"",2,8);
// Select smoothing level
Y=Optimize("Y",y,0,3,1);
R=IIf(Y==0,R0,
IIf(Y==1,R1,
IIf(Y==2,R2,
IIf(Y==3,R3,
IIf(Y==4,R4,
IIf(Y==5,R5,
IIf(Y==6,R6,
IIf(Y==7,R7,
IIf(Y==8,R8,
IIf(Y==9,R9,R10))))))))));
// Select trading bars
X=Optimize("X",X,10,30,2);
Buy=Cross(0,R);
Buy=ExRemSpan(Buy,X);
Sell=Ref(Buy,-X);
Short=Sell;Cover=Buy;
Plot(R,"",9,8);
Buy = ExRem( Buy, Sell ); Sell = ExRem( Sell, Buy ); Short = ExRem( Short, Cover ); Cover = ExRem( Cover, Short );
buybars = BarsSince( Buy );sellbars = BarsSince( Sell );coverbars = BarsSince( Cover );shortbars = BarsSince( Short );
MarginDeposit=3500;
PositionSize=MarginDeposit;
Equity(1);
//e=Equity(0,1,1300)-Equity(0,1,0);
e=Equity(0,-1,50)-PositionSize;
e1=Equity(0,-1,25)-PositionSize;
e2=Equity(0,-1,75)-PositionSize;
e3=Equity(0,-1,100)-PositionSize;
et=Equity(1,-1,PositionSize);
GraphXSpace=5;
TB=LstB+TBCheck;
CurBar = Cum(1);TotalBars = LastValue( CurBar );
inrange = CurBar >= TotalBars -TB AND CurBar <= TotalBars- LstB;
Buy = Buy AND inrange;Sell = Sell AND inrange;Short = Short AND inrange;Cover = Cover AND inrange;
Filter=CurBar >= TotalBars -TB AND CurBar <= TotalBars- LstB AND Buy OR Sell;
AlertIf( Short AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 3,2,4 );
AlertIf( Buy AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 1,2,4 );
AlertIf( Sell AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 2,2,4 );
AlertIf( Cover AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 4,2,4 );
PlotShapes(IIf(Sell==1,shapeDownArrow,shapeNone),colorRed,Layer=0,yposition=0,Offset=5); //Short
PlotShapes(IIf(Buy==1,shapeUpArrow,shapeNone),colorGreen,Layer=0,yposition=0,Offset=-10); //BUY
PlotShapes(IIf(Short==1,shapeSmallDownTriangle,shapeNone),colorRed,Layer=0,yposition=0,Offset=5); //Sell
PlotShapes(IIf(Cover==1,shapeSmallUpTriangle,shapeNone),colorDarkGreen,Layer=0,yposition=0,Offset=-10); // Cover
Plot(3, /* defines the height of the ribbon in percent of pane width */"Ribbon",IIf( buybars<sellbars,colorGreen ,colorBlack),/*choose color */styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
Title =Name() + " C vs (H+L)/2 III"+"; Version: " +WriteVal(Vers,format=1.0)+" "+"Bars: "+WriteVal(TBCheck,format=1.0)+EncodeColor(colorBlack)+";\nEquity:"+"\nTotal ("+WriteVal(TBCheck,format=1.0)+" bars): "+EncodeColor(colorDarkBlue)+WriteVal(Et,format=1)+EncodeColor(colorBlack)+";\nToday "+EncodeColor(colorBlue)+WriteVal(e1,format=1.0)+EncodeColor(colorBlack)+";\nLast 2 days : "+EncodeColor(colorBlue)+WriteVal(e,format=1.0)+EncodeColor(colorBlack)+";\nLast 3 days : "+EncodeColor(colorBlue)+WriteVal(e2,format=1.0)+EncodeColor(colorBlack)+";\nLast 4 days : "+EncodeColor(colorBlue)+WriteVal(e3,format=1.0)+";\nAlerts are "+WriteIf(Swtch==1,"ON","OUT");
/*Close is NOT always in the middle of H, L distance. Some periods C is >(H+L)/2 AND some other C is < (H+L)/2.
The difference
R0=RSIa(C,T1)-RSIa((H+L),T1);Plot(R0,"",1,1);
for a fast period T1=5 is a measure of this property.
The line is too noisy AND needs cascade smoothing [without significant delays] to reveal
the interesting Signal. DEMA is the proper smoothing function, since it reduces the delay.
A five-step smoothing would be like this
R1=DEMA(R0,T0);
R2=DEMA(R1,T0);
R3=DEMA(R2,T0);
R4=DEMA(R3,T0);
R5=DEMA(R4,T0);
for a period T0 around 50, the noise is totally removed AND the resulting curve is quite
expressive. It crosses zero AND becomes negative during the important uptrends AND it
is positive during bearish intervals.
Buy=Cross(0,R);
is a simplified Buy condition.
Significant uptrends usually last more than 20 bars. After the first Peak AND the first
retracement, the market gives some more potential, visualised from double peaks,
divergences etc. These observations advise to avoid long positions for more than 40 bars
[the bears will NOT disguise their feelings for long...]
X=Optimize("X",28,20,40,1);Buy=ExRemSpan(Buy,X);Sell=Ref(Buy,-X);
expresses the requirement to Sell 20 to 40 bars later.
The extended smoothing can express the influence of a leader market, like ^NDX, to
dependent markets like ^N225 OR ^GDAXI.
^N225 is one of the most difficult markets, directionality is very poor AND many trading systems
fail.
Let us use ^NDX data, follow the above description AND apply it to ^N225.
The project sounds a bit absurd but it is NOT.*/
Overall performance summary
Total net profit:
5064.37
Total commissions paid:
216.00
Return on account:
28.94 %
Open position gain/loss
0.00
Buy&Hold profit:
-7957.32
Bars (avg. days) in test:
2755 (789)
Buy&Hold % return:
-45.47%
System to Buy&Hold index:
163.64%
Annual system % return:
12.48%
Annual B&H % return:
-24.46%
System drawdown:
-235.36
B&H drawdown:
-2940.84
Max. system drawdown:
-938.32
B&H max. drawdown:
-3450.99
Max. system % drawdown:
-21.38%
B&H max. % drawdown:
-86.04%
Max. trade drawdown:
-904.06
Max. trade % drawdown:
-21.35%
Trade drawdown:
-813.65
Total number of trades:
27
Percent profitable:
70.4%
Number winning trades:
19
Number losing trades:
8
Profit of winners:
6670.72
Loss of losers:
-1606.35
Total # of bars in winners:
323
Total # of bars in losers:
136
Commissions paid in winners:
152.00
Commissions paid in losers:
64.00
Largest winning trade:
734.25
Largest losing trade:
-666.67
# of bars in largest winner:
17
# bars in largest loser:
17
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
351.09
Average losing trade:
-200.79
Avg. # of bars in winners:
17.0
Avg. # bars in losers:
17.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
7
Max consec. losers:
2
Bars out of the market:
2296
Interest earned:
0.00
Exposure:
16.7%
Risk adjusted ann. return:
74.89%
Ratio avg win/avg loss:
1.75
Avg. trade (win & loss):
187.57
Profit factor:
4.15
Performance for RGZSCHI
Total net profit:
504.82
Total commissions paid:
40.00
Return on account:
14.42 %
Open position gain/loss
0.00
Buy&Hold profit:
-1233.06
Bars (days) in test:
550 (789)
Buy&Hold % return:
-35.23%
System to Buy&Hold index:
140.94%
Annual system % return:
6.43%
Annual B&H % return:
-18.20%
System drawdown:
-222.29
B&H drawdown:
-1854.34
Max. system drawdown:
-540.65
B&H max. drawdown:
-2211.22
Max. system % drawdown:
-14.16%
B&H max. % drawdown:
-57.33%
Max. trade drawdown:
-525.83
Max. trade % drawdown:
-13.80%
Trade drawdown:
-386.58
Total number of trades:
5
Percent profitable:
60.0%
Number winning trades:
3
Number losing trades:
2
Profit of winners:
754.99
Loss of losers:
-250.17
Total # of bars in winners:
51
Total # of bars in losers:
34
Commissions paid in winners:
24.00
Commissions paid in losers:
16.00
Largest winning trade:
327.18
Largest losing trade:
-182.58
# of bars in largest winner:
17
# bars in largest loser:
17
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
251.66
Average losing trade:
-125.08
Avg. # of bars in winners:
17.0
Avg. # bars in losers:
17.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
2
Max consec. losers:
2
Bars out of the market:
465
Interest earned:
0.00
Exposure:
15.5%
Risk adjusted ann. return:
41.61%
Ratio avg win/avg loss:
2.01
Avg. trade (win & loss):
100.96
Profit factor:
3.02
Trade list for RGZSCHI
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
24.0000
17/10/2001
16.0500
0.0000
3500.0000
Long
17/10/2001
16.0500
08/11/2001
17.1500
231.8755
3731.8755
Out
08/11/2001
17.1500
08/03/2002
18.2100
0.0000
3731.8755
Long
08/03/2002
18.2100
02/04/2002
17.9000
-67.5825
3664.2929
Out
02/04/2002
17.9000
13/06/2002
16.8400
0.0000
3664.2929
Long
13/06/2002
16.8400
05/07/2002
16.0000
-182.5844
3481.7086
Out
05/07/2002
16.0000
13/11/2002
13.4000
0.0000
3481.7086
Long
13/11/2002
13.4000
05/12/2002
14.6900
327.1794
3808.8880
Out
05/12/2002
14.6900
05/06/2003
13.7300
0.0000
3808.8880
Long
05/06/2003
13.7300
27/06/2003
14.5300
195.9330
4004.8210
Out
27/06/2003
14.5300
11/07/2003
15.5900
0.0000
4004.8210
Performance for RGZSCT
Total net profit:
1257.78
Total commissions paid:
40.00
Return on account:
35.94 %
Open position gain/loss
0.00
Buy&Hold profit:
-2612.75
Bars (days) in test:
552 (789)
Buy&Hold % return:
-74.65%
System to Buy&Hold index:
148.14%
Annual system % return:
15.26%
Annual B&H % return:
-47.00%
System drawdown:
-174.21
B&H drawdown:
-2940.84
Max. system drawdown:
-938.32
B&H max. drawdown:
-3450.99
Max. system % drawdown:
-21.35%
B&H max. % drawdown:
-86.04%
Max. trade drawdown:
-904.06
Max. trade % drawdown:
-21.35%
Trade drawdown:
-813.65
Total number of trades:
5
Percent profitable:
80.0%
Number winning trades:
4
Number losing trades:
1
Profit of winners:
1924.46
Loss of losers:
-666.67
Total # of bars in winners:
68
Total # of bars in losers:
17
Commissions paid in winners:
32.00
Commissions paid in losers:
8.00
Largest winning trade:
604.50
Largest losing trade:
-666.67
# of bars in largest winner:
17
# bars in largest loser:
17
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
481.11
Average losing trade:
-666.67
Avg. # of bars in winners:
17.0
Avg. # bars in losers:
17.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
2
Max consec. losers:
1
Bars out of the market:
467
Interest earned:
0.00
Exposure:
15.4%
Risk adjusted ann. return:
99.11%
Ratio avg win/avg loss:
0.72
Avg. trade (win & loss):
251.56
Profit factor:
2.89
Trade list for RGZSCT
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
11.6500
16/05/2001
11.0500
0.0000
3500.0000
Long
16/05/2001
11.0500
08/06/2001
12.0000
292.9049
3792.9049
Out
08/06/2001
12.0000
05/11/2001
6.0000
0.0000
3792.9049
Long
05/11/2001
6.0000
27/11/2001
7.0500
604.5001
4397.4050
Out
27/11/2001
7.0500
10/09/2002
2.7100
0.0000
4397.4050
Long
10/09/2002
2.7100
02/10/2002
2.2000
-666.6716
3730.7335
Out
02/10/2002
2.2000
13/11/2002
2.2900
0.0000
3730.7335
Long
13/11/2002
2.2900
05/12/2002
2.6700
572.7862
4303.5197
Out
05/12/2002
2.6700
11/04/2003
2.1200
0.0000
4303.5197
Long
11/04/2003
2.1200
08/05/2003
2.4000
454.2645
4757.7842
Out
08/05/2003
2.4000
11/07/2003
2.9700
0.0000
4757.7842
Performance for RGZSEB
Total net profit:
1208.78
Total commissions paid:
40.00
Return on account:
34.54 %
Open position gain/loss
0.00
Buy&Hold profit:
-1767.17
Bars (days) in test:
551 (789)
Buy&Hold % return:
-50.49%
System to Buy&Hold index:
168.40%
Annual system % return:
14.71%
Annual B&H % return:
-27.76%
System drawdown:
-124.05
B&H drawdown:
-2442.41
Max. system drawdown:
-918.17
B&H max. drawdown:
-3128.84
Max. system % drawdown:
-21.38%
B&H max. % drawdown:
-74.72%
Max. trade drawdown:
-616.63
Max. trade % drawdown:
-15.39%
Trade drawdown:
-477.67
Total number of trades:
5
Percent profitable:
60.0%
Number winning trades:
3
Number losing trades:
2
Profit of winners:
1542.29
Loss of losers:
-333.51
Total # of bars in winners:
51
Total # of bars in losers:
34
Commissions paid in winners:
24.00
Commissions paid in losers:
16.00
Largest winning trade:
609.65
Largest losing trade:
-256.03
# of bars in largest winner:
17
# bars in largest loser:
17
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
514.10
Average losing trade:
-166.76
Avg. # of bars in winners:
17.0
Avg. # bars in losers:
17.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
2
Max consec. losers:
2
Bars out of the market:
466
Interest earned:
0.00
Exposure:
15.4%
Risk adjusted ann. return:
95.36%
Ratio avg win/avg loss:
3.08
Avg. trade (win & loss):
241.76
Profit factor:
4.62
Trade list for RGZSEB
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
10.9500
01/11/2001
5.9500
0.0000
3500.0000
Long
01/11/2001
5.9500
23/11/2001
7.0000
609.6472
4109.6472
Out
23/11/2001
7.0000
05/04/2002
6.3500
0.0000
4109.6472
Long
05/04/2002
6.3500
29/04/2002
5.9000
-256.0314
3853.6158
Out
29/04/2002
5.9000
21/08/2002
4.0300
0.0000
3853.6158
Long
21/08/2002
4.0300
12/09/2002
3.9500
-77.4790
3776.1368
Out
12/09/2002
3.9500
12/11/2002
4.0300
0.0000
3776.1368
Long
12/11/2002
4.0300
04/12/2002
4.6600
539.1461
4315.2828
Out
04/12/2002
4.6600
09/04/2003
4.0100
0.0000
4315.2828
Long
09/04/2003
4.0100
06/05/2003
4.4700
393.4959
4708.7787
Out
06/05/2003
4.4700
11/07/2003
5.4400
0.0000
4708.7787
Performance for RGZSJAP
Total net profit:
377.68
Total commissions paid:
40.00
Return on account:
10.79 %
Open position gain/loss
0.00
Buy&Hold profit:
-1581.36
Bars (days) in test:
551 (789)
Buy&Hold % return:
-45.18%
System to Buy&Hold index:
123.88%
Annual system % return:
4.85%
Annual B&H % return:
-24.28%
System drawdown:
-235.36
B&H drawdown:
-1921.36
Max. system drawdown:
-463.82
B&H max. drawdown:
-2071.96
Max. system % drawdown:
-12.40%
B&H max. % drawdown:
-56.75%
Max. trade drawdown:
-372.93
Max. trade % drawdown:
-9.97%
Trade drawdown:
-218.99
Total number of trades:
5
Percent profitable:
40.0%
Number winning trades:
2
Number losing trades:
3
Profit of winners:
733.68
Loss of losers:
-356.00
Total # of bars in winners:
34
Total # of bars in losers:
51
Commissions paid in winners:
16.00
Commissions paid in losers:
24.00
Largest winning trade:
544.96
Largest losing trade:
-226.99
# of bars in largest winner:
17
# bars in largest loser:
17
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
366.84
Average losing trade:
-118.67
Avg. # of bars in winners:
17.0
Avg. # bars in losers:
17.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
1
Max consec. losers:
2
Bars out of the market:
466
Interest earned:
0.00
Exposure:
15.4%
Risk adjusted ann. return:
31.47%
Ratio avg win/avg loss:
3.09
Avg. trade (win & loss):
75.54
Profit factor:
2.06
Trade list for RGZSJAP
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
54.5500
16/08/2001
46.3500
0.0000
3500.0000
Long
16/08/2001
46.3500
07/09/2001
43.4500
-226.9858
3273.0142
Out
07/09/2001
43.4500
26/09/2001
39.1000
0.0000
3273.0142
Long
26/09/2001
39.1000
18/10/2001
41.4500
188.7159
3461.7301
Out
18/10/2001
41.4500
04/03/2002
40.7500
0.0000
3461.7301
Long
04/03/2002
40.7500
26/03/2002
39.6500
-101.4453
3360.2847
Out
26/03/2002
39.6500
17/12/2002
29.1900
0.0000
3360.2847
Long
17/12/2002
29.1900
14/01/2003
29.0200
-27.5700
3332.7147
Out
14/01/2003
29.0200
17/06/2003
26.7600
0.0000
3332.7147
Long
17/06/2003
26.7600
09/07/2003
31.2000
544.9617
3877.6764
Out
09/07/2003
31.2000
11/07/2003
30.0000
0.0000
3877.6764
Performance for RGZSPOL
Total net profit:
1715.31
Total commissions paid:
56.00
Return on account:
49.01 %
Open position gain/loss
0.00
Buy&Hold profit:
-762.99
Bars (days) in test:
551 (789)
Buy&Hold % return:
-21.80%
System to Buy&Hold index:
324.81%
Annual system % return:
20.26%
Annual B&H % return:
-10.75%
System drawdown:
-91.35
B&H drawdown:
-1440.80
Max. system drawdown:
-382.43
B&H max. drawdown:
-1686.26
Max. system % drawdown:
-8.18%
B&H max. % drawdown:
-45.02%
Max. trade drawdown:
-291.67
Max. trade % drawdown:
-6.12%
Trade drawdown:
-150.25
Total number of trades:
7
Percent profitable:
100.0%
Number winning trades:
7
Number losing trades:
0
Profit of winners:
1715.31
Loss of losers:
0.00
Total # of bars in winners:
119
Total # of bars in losers:
0
Commissions paid in winners:
56.00
Commissions paid in losers:
0.00
Largest winning trade:
734.25
Largest losing trade:
0.00
# of bars in largest winner:
17
# bars in largest loser:
0
Commission paid in largest winner:
8.00
Commission paid in largest loser:
0.00
Average winning trade:
245.04
Average losing trade:
N/A
Avg. # of bars in winners:
17.0
Avg. # bars in losers:
N/A
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
N/A
Max consec. winners:
7
Max consec. losers:
0
Bars out of the market:
432
Interest earned:
0.00
Exposure:
21.6%
Risk adjusted ann. return:
93.82%
Ratio avg win/avg loss:
N/A
Avg. trade (win & loss):
245.04
Profit factor:
N/A
Trade list for RGZSPOL
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
47.0000
25/09/2001
30.6500
0.0000
3500.0000
Long
25/09/2001
30.6500
17/10/2001
37.1500
734.2515
4234.2515
Out
17/10/2001
37.1500
05/11/2001
39.6000
0.0000
4234.2515
Long
05/11/2001
39.6000
27/11/2001
41.5000
159.9294
4394.1809
Out
27/11/2001
41.5000
11/02/2002
45.3000
0.0000
4394.1809
Long
11/02/2002
45.3000
05/03/2002
46.2000
61.5365
4455.7174
Out
05/03/2002
46.2000
08/05/2002
40.7000
0.0000
4455.7174
Long
08/05/2002
40.7000
30/05/2002
41.7500
82.2948
4538.0122
Out
30/05/2002
41.7500
01/10/2002
29.3500
0.0000
4538.0122
Long
01/10/2002
29.3500
23/10/2002
33.3700
471.3865
5009.3987
Out
23/10/2002
33.3700
05/03/2003
27.9000
0.0000
5009.3987
Long
05/03/2003
27.9000
27/03/2003
29.2800
165.1184
5174.5171
Out
27/03/2003
29.2800
10/04/2003
30.1300
0.0000
5174.5171
Long
10/04/2003
30.1300
07/05/2003
30.5500
40.7886
5215.3057
Out
07/05/2003
30.5500
11/07/2003
36.8500
0.0000
5215.3057
Title: AmiBroker System Test Report
Settings
Initial Equity:
3500
Periodicity/Positions:
Daily/Long
Commissions:
4.00 per trade
Annual interest rate:
0.00%
Range:
12/05/2001 00:00:00 - 12/07/2003
Apply to:
Filter
Include Filter
Exclude Filter
Market
-
Market
-
Group
-
Group
-
Sector
-
Sector
-
Industry
-
Industry
-
Watch list
Robeco Select
Watch list
-
Index
-
Index
-
Favourite
-
Favourite
-
Margin requirement:
100
Futures mode:
No
Def. round lot size:
0
Def. Tick Size
1
Drawdowns based on:
High/Low prices
Long trades
Buy price:
Open
Sell price:
Open
Buy delay:
1
Sell delay:
1
Short trades
Short price:
Open
Cover price:
Open
Short delay:
1
Cover delay:
1
Stops
Maximum loss:
disabled
Profit target:
disabled
Value:
0.00
Value:
0.00
Exit at stop?
no
Exit at stop?
no
Trailing stop:
disabled
Value:
0.00
Exit at stop?
no
Formula/* CCT StochRSI Var Symetric Cross Overs**
** Originally developed by Steve Karnish
** http://www.cedarcreektrading.com
** AFL translation by Tomasz Janeczko
** Set scaling: Custom 0..100
** Grid: 30/70 */
Vers=1;
Swtch=2;
Period=8;
period1=23;
delta=15;
TBCheck=252; //range for optimization
LstB=0; //number of bars from last bar to start optimization and backtesting
Period = Optimize("Period", period,2,15,1);
Period1 = Optimize("Period1", period1,10,40,1);
delta=Optimize("Delta",delta,2,20,1);
Buy = Cross(delta, TEMA((RSI(period)-LLV(RSI(period),period1))/ (HHV(RSI(period),period1)- (LLV(RSI(period),period1))),3)*100);
Sell = Cross(TEMA((RSI(period)-LLV(RSI(period),period1))/ (HHV(RSI(period),period1)- (LLV(RSI(period),period1))),3)*100, 100-delta);
Short = Sell; Cover = Buy;
Buy = ExRem( Buy, Sell ); Sell = ExRem( Sell, Buy ); Short = ExRem( Short, Cover ); Cover = ExRem( Cover, Short );
buybars = BarsSince( Buy );sellbars = BarsSince( Sell );coverbars = BarsSince( Cover );shortbars = BarsSince( Short );
MASTRSI=EMA((RSI(period)-LLV(RSI(period),period))/ (HHV(RSI(period),period)- (LLV(RSI(period),period))),3)*100;
Equity(1);
MarginDeposit=3500;
PositionSize=MarginDeposit;
//e=Equity(0,1,1300)-Equity(0,1,0);
e=Equity(0,-1,50)-PositionSize;
e1=Equity(0,-1,25)-PositionSize;
e2=Equity(0,-1,75)-PositionSize;
e3=Equity(0,-1,100)-PositionSize;
et=Equity(1,-1,PositionSize);
GraphXSpace=15;
TB=LstB+TBCheck;
CurBar = Cum(1);TotalBars = LastValue( CurBar );
inrange = CurBar >= TotalBars -TB AND CurBar <= TotalBars- LstB;
Buy = Buy AND inrange;Sell = Sell AND inrange;Short = Short AND inrange;Cover = Cover AND inrange;
Filter=CurBar >= TotalBars -TB AND CurBar <= TotalBars- LstB AND Buy OR Sell;
AlertIf( Short AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 3,2,4 );
AlertIf( Buy AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 1,2,4 );
AlertIf( Sell AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 2,2,4 );
AlertIf( Cover AND Swtch==1,"SOUND C:\\Documents and Settings\\Administrator\\My Documents\\My Music\\Sounds\\rooster2.wav","Audio alert", 4,2,4 );
PlotShapes(IIf(Sell==1,shapeDownArrow,shapeNone),colorRed,Layer=0,yposition=MASTRSI,Offset=5); //Short
PlotShapes(IIf(Buy==1,shapeUpArrow,shapeNone),colorGreen,Layer=0,yposition=MASTRSI,Offset=-10); //BUY
PlotShapes(IIf(Short==1,shapeSmallDownTriangle,shapeNone),colorRed,Layer=0,yposition=MASTRSI,Offset=5); //Sell
PlotShapes(IIf(Cover==1,shapeSmallUpTriangle,shapeNone),colorDarkGreen,Layer=0,yposition=MASTRSI,Offset=-10); // Cover
Plot(3, /* defines the height of the ribbon in percent of pane width */"Ribbon",IIf( buybars<sellbars,colorGreen ,colorBlack),/*choose color */styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
Title =Name() + " CCT StochRSI; Version: " +WriteVal(Vers,format=1.0)+" "+"Bars: "+WriteVal(TBCheck,format=1.0)+EncodeColor(colorBlack)+";\nEquity:"+"\nTotal ("+WriteVal(TBCheck,format=1.0)+" bars): "+EncodeColor(colorDarkBlue)+WriteVal(Et,format=1)+EncodeColor(colorBlack)+";\nToday "+EncodeColor(colorBlue)+WriteVal(e1,format=1.0)+EncodeColor(colorBlack)+";\nLast 2 days : "+EncodeColor(colorBlue)+WriteVal(e,format=1.0)+EncodeColor(colorBlack)+";\nLast 3 days : "+EncodeColor(colorBlue)+WriteVal(e2,format=1.0)+EncodeColor(colorBlack)+";\nLast 4 days : "+EncodeColor(colorBlue)+WriteVal(e3,format=1.0)+";\nAlerts are "+WriteIf(Swtch==1,"ON","OUT");
Plot(MASTRSI,"RSIS",6,1);
Plot(100-delta,"LimH",5,1);
Plot(delta,"Liml",4,1);
Overall performance summary
Total net profit:
7060.77
Total commissions paid:
360.00
Return on account:
40.35 %
Open position gain/loss
0.00
Buy&Hold profit:
-7957.32
Bars (avg. days) in test:
2755 (789)
Buy&Hold % return:
-45.47%
System to Buy&Hold index:
188.73%
Annual system % return:
16.98%
Annual B&H % return:
-24.46%
System drawdown:
-378.18
B&H drawdown:
-2940.84
Max. system drawdown:
-1232.95
B&H max. drawdown:
-3450.99
Max. system % drawdown:
-27.29%
B&H max. % drawdown:
-86.04%
Max. trade drawdown:
-1232.95
Max. trade % drawdown:
-27.29%
Trade drawdown:
-1047.35
Total number of trades:
45
Percent profitable:
77.8%
Number winning trades:
35
Number losing trades:
10
Profit of winners:
8500.78
Loss of losers:
-1440.01
Total # of bars in winners:
363
Total # of bars in losers:
217
Commissions paid in winners:
280.00
Commissions paid in losers:
80.00
Largest winning trade:
790.00
Largest losing trade:
-405.73
# of bars in largest winner:
11
# bars in largest loser:
30
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
242.88
Average losing trade:
-144.00
Avg. # of bars in winners:
10.4
Avg. # bars in losers:
21.7
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
5
Max consec. losers:
2
Bars out of the market:
2175
Interest earned:
0.00
Exposure:
21.1%
Risk adjusted ann. return:
80.64%
Ratio avg win/avg loss:
1.69
Avg. trade (win & loss):
156.91
Profit factor:
5.90
Performance for RGZSCHI
Total net profit:
815.96
Total commissions paid:
64.00
Return on account:
23.31 %
Open position gain/loss
0.00
Buy&Hold profit:
-1233.06
Bars (days) in test:
550 (789)
Buy&Hold % return:
-35.23%
System to Buy&Hold index:
166.17%
Annual system % return:
10.18%
Annual B&H % return:
-18.20%
System drawdown:
-378.18
B&H drawdown:
-1854.34
Max. system drawdown:
-524.32
B&H max. drawdown:
-2211.22
Max. system % drawdown:
-14.38%
B&H max. % drawdown:
-57.33%
Max. trade drawdown:
-440.81
Max. trade % drawdown:
-12.37%
Trade drawdown:
-440.81
Total number of trades:
8
Percent profitable:
75.0%
Number winning trades:
6
Number losing trades:
2
Profit of winners:
1022.37
Loss of losers:
-206.42
Total # of bars in winners:
62
Total # of bars in losers:
48
Commissions paid in winners:
48.00
Commissions paid in losers:
16.00
Largest winning trade:
326.38
Largest losing trade:
-191.07
# of bars in largest winner:
12
# bars in largest loser:
34
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
170.40
Average losing trade:
-103.21
Avg. # of bars in winners:
10.3
Avg. # bars in losers:
24.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
4
Max consec. losers:
1
Bars out of the market:
440
Interest earned:
0.00
Exposure:
20.0%
Risk adjusted ann. return:
50.90%
Ratio avg win/avg loss:
1.65
Avg. trade (win & loss):
101.99
Profit factor:
4.95
Trade list for RGZSCHI
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
24.0000
23/07/2002
14.3700
0.0000
3500.0000
Long
23/07/2002
14.3700
31/07/2002
14.6600
62.6333
3562.6333
Out
31/07/2002
14.6600
30/08/2002
14.5300
0.0000
3562.6333
Long
30/08/2002
14.5300
16/10/2002
13.7700
-191.0693
3371.5639
Out
16/10/2002
13.7700
14/11/2002
13.4800
0.0000
3371.5639
Long
14/11/2002
13.4800
26/11/2002
14.4500
234.6126
3606.1765
Out
26/11/2002
14.4500
16/12/2002
14.2900
0.0000
3606.1765
Long
16/12/2002
14.2900
08/01/2003
14.2600
-15.3477
3590.8288
Out
08/01/2003
14.2600
27/01/2003
13.4200
0.0000
3590.8288
Long
27/01/2003
13.4200
19/02/2003
13.8300
98.9299
3689.7587
Out
19/02/2003
13.8300
06/03/2003
12.4500
0.0000
3689.7587
Long
06/03/2003
12.4500
19/03/2003
13.3500
245.0122
3934.7709
Out
19/03/2003
13.3500
23/04/2003
12.2600
0.0000
3934.7709
Long
23/04/2003
12.2600
30/04/2003
12.4800
54.8057
3989.5766
Out
30/04/2003
12.4800
25/06/2003
14.3400
0.0000
3989.5766
Long
25/06/2003
14.3400
10/07/2003
15.7100
326.3793
4315.9559
Out
10/07/2003
15.7100
11/07/2003
15.5900
0.0000
4315.9559
Performance for RGZSCT
Total net profit:
2668.33
Total commissions paid:
72.00
Return on account:
76.24 %
Open position gain/loss
0.00
Buy&Hold profit:
-2612.75
Bars (days) in test:
552 (789)
Buy&Hold % return:
-74.65%
System to Buy&Hold index:
202.13%
Annual system % return:
29.97%
Annual B&H % return:
-47.00%
System drawdown:
-257.35
B&H drawdown:
-2940.84
Max. system drawdown:
-1232.95
B&H max. drawdown:
-3450.99
Max. system % drawdown:
-27.29%
B&H max. % drawdown:
-86.04%
Max. trade drawdown:
-1232.95
Max. trade % drawdown:
-27.29%
Trade drawdown:
-1047.35
Total number of trades:
9
Percent profitable:
77.8%
Number winning trades:
7
Number losing trades:
2
Profit of winners:
3149.88
Loss of losers:
-481.56
Total # of bars in winners:
72
Total # of bars in losers:
52
Commissions paid in winners:
56.00
Commissions paid in losers:
16.00
Largest winning trade:
790.00
Largest losing trade:
-405.73
# of bars in largest winner:
11
# bars in largest loser:
30
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
449.98
Average losing trade:
-240.78
Avg. # of bars in winners:
10.3
Avg. # bars in losers:
26.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
5
Max consec. losers:
1
Bars out of the market:
428
Interest earned:
0.00
Exposure:
22.5%
Risk adjusted ann. return:
133.42%
Ratio avg win/avg loss:
1.87
Avg. trade (win & loss):
296.48
Profit factor:
6.54
Trade list for RGZSCT
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
11.6500
06/08/2002
2.5000
0.0000
3500.0000
Long
06/08/2002
2.5000
20/08/2002
3.0700
789.9999
4289.9999
Out
20/08/2002
3.0700
05/09/2002
2.6400
0.0000
4289.9999
Long
05/09/2002
2.6400
16/10/2002
2.3400
-405.7275
3884.2724
Out
16/10/2002
2.3400
13/11/2002
2.2900
0.0000
3884.2724
Long
13/11/2002
2.2900
22/11/2002
2.7500
695.0568
4579.3292
Out
22/11/2002
2.7500
09/12/2002
2.5800
0.0000
4579.3292
Long
09/12/2002
2.5800
13/01/2003
2.5300
-75.8294
4503.4998
Out
13/01/2003
2.5300
07/02/2003
2.1400
0.0000
4503.4998
Long
07/02/2003
2.1400
19/02/2003
2.2400
155.5512
4659.0511
Out
19/02/2003
2.2400
12/03/2003
2.0100
0.0000
4659.0511
Long
12/03/2003
2.0100
17/03/2003
2.1900
305.4330
4964.4840
Out
17/03/2003
2.1900
02/04/2003
2.1000
0.0000
4964.4840
Long
02/04/2003
2.1000
24/04/2003
2.3900
475.3337
5439.8177
Out
24/04/2003
2.3900
12/05/2003
2.3700
0.0000
5439.8177
Long
12/05/2003
2.3700
29/05/2003
2.5200
213.5191
5653.3369
Out
29/05/2003
2.5200
25/06/2003
2.6100
0.0000
5653.3369
Long
25/06/2003
2.6100
09/07/2003
3.0000
514.9887
6168.3255
Out
09/07/2003
3.0000
11/07/2003
2.9700
0.0000
6168.3255
Performance for RGZSEB
Total net profit:
1981.31
Total commissions paid:
80.00
Return on account:
56.61 %
Open position gain/loss
0.00
Buy&Hold profit:
-1767.17
Bars (days) in test:
551 (789)
Buy&Hold % return:
-50.49%
System to Buy&Hold index:
212.12%
Annual system % return:
23.06%
Annual B&H % return:
-27.76%
System drawdown:
-198.11
B&H drawdown:
-2442.41
Max. system drawdown:
-642.82
B&H max. drawdown:
-3128.84
Max. system % drawdown:
-12.92%
B&H max. % drawdown:
-74.72%
Max. trade drawdown:
-424.72
Max. trade % drawdown:
-9.90%
Trade drawdown:
-424.72
Total number of trades:
10
Percent profitable:
80.0%
Number winning trades:
8
Number losing trades:
2
Profit of winners:
2323.25
Loss of losers:
-341.94
Total # of bars in winners:
59
Total # of bars in losers:
42
Commissions paid in winners:
64.00
Commissions paid in losers:
16.00
Largest winning trade:
649.32
Largest losing trade:
-204.63
# of bars in largest winner:
10
# bars in largest loser:
21
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
290.41
Average losing trade:
-170.97
Avg. # of bars in winners:
7.4
Avg. # bars in losers:
21.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
4
Max consec. losers:
2
Bars out of the market:
450
Interest earned:
0.00
Exposure:
18.3%
Risk adjusted ann. return:
125.81%
Ratio avg win/avg loss:
1.70
Avg. trade (win & loss):
198.13
Profit factor:
6.79
Trade list for RGZSEB
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
10.9500
25/07/2002
3.7100
0.0000
3500.0000
Long
25/07/2002
3.7100
31/07/2002
3.9200
190.1132
3690.1132
Out
31/07/2002
3.9200
06/09/2002
3.5500
0.0000
3690.1132
Long
06/09/2002
3.5500
12/09/2002
3.9500
386.3663
4076.4795
Out
12/09/2002
3.9500
24/09/2002
3.6400
0.0000
4076.4795
Long
24/09/2002
3.6400
15/10/2002
3.8100
155.4614
4231.9409
Out
15/10/2002
3.8100
13/11/2002
4.1000
0.0000
4231.9409
Long
13/11/2002
4.1000
26/11/2002
4.8700
649.3171
4881.2580
Out
26/11/2002
4.8700
06/12/2002
4.4500
0.0000
4881.2580
Long
06/12/2002
4.4500
09/01/2003
4.2000
-204.6292
4676.6288
Out
09/01/2003
4.2000
23/01/2003
4.0600
0.0000
4676.6288
Long
23/01/2003
4.0600
20/02/2003
3.9100
-137.3102
4539.3185
Out
20/02/2003
3.9100
12/03/2003
3.6000
0.0000
4539.3185
Long
12/03/2003
3.6000
17/03/2003
3.8800
264.2224
4803.5410
Out
17/03/2003
3.8800
12/05/2003
4.2900
0.0000
4803.5410
Long
12/05/2003
4.2900
15/05/2003
4.5100
171.4874
4975.0284
Out
15/05/2003
4.5100
21/05/2003
4.2800
0.0000
4975.0284
Long
21/05/2003
4.2800
04/06/2003
4.8100
425.4110
5400.4394
Out
04/06/2003
4.8100
02/07/2003
5.1200
0.0000
5400.4394
Long
02/07/2003
5.1200
07/07/2003
5.2500
80.8673
5481.3066
Out
07/07/2003
5.2500
11/07/2003
5.4400
0.0000
5481.3066
Performance for RGZSJAP
Total net profit:
774.77
Total commissions paid:
72.00
Return on account:
22.14 %
Open position gain/loss
0.00
Buy&Hold profit:
-1581.36
Bars (days) in test:
551 (789)
Buy&Hold % return:
-45.18%
System to Buy&Hold index:
148.99%
Annual system % return:
9.69%
Annual B&H % return:
-24.28%
System drawdown:
-157.80
B&H drawdown:
-1921.36
Max. system drawdown:
-227.99
B&H max. drawdown:
-2071.96
Max. system % drawdown:
-6.26%
B&H max. % drawdown:
-56.75%
Max. trade drawdown:
-227.99
Max. trade % drawdown:
-6.26%
Trade drawdown:
-187.33
Total number of trades:
9
Percent profitable:
77.8%
Number winning trades:
7
Number losing trades:
2
Profit of winners:
941.55
Loss of losers:
-166.78
Total # of bars in winners:
90
Total # of bars in losers:
32
Commissions paid in winners:
56.00
Commissions paid in losers:
16.00
Largest winning trade:
184.83
Largest losing trade:
-131.34
# of bars in largest winner:
18
# bars in largest loser:
19
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
134.51
Average losing trade:
-83.39
Avg. # of bars in winners:
12.9
Avg. # bars in losers:
16.0
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
4
Max consec. losers:
1
Bars out of the market:
429
Interest earned:
0.00
Exposure:
22.1%
Risk adjusted ann. return:
43.77%
Ratio avg win/avg loss:
1.61
Avg. trade (win & loss):
86.09
Profit factor:
5.65
Trade list for RGZSJAP
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
54.5500
25/07/2002
35.7100
0.0000
3500.0000
Long
25/07/2002
35.7100
12/08/2002
35.4300
-35.4432
3464.5568
Out
12/08/2002
35.4300
04/09/2002
32.5200
0.0000
3464.5568
Long
04/09/2002
32.5200
27/09/2002
34.3300
184.8306
3649.3875
Out
27/09/2002
34.3300
09/10/2002
30.1500
0.0000
3649.3875
Long
09/10/2002
30.1500
21/10/2002
31.6500
166.1294
3815.5168
Out
21/10/2002
31.6500
14/11/2002
29.6100
0.0000
3815.5168
Long
14/11/2002
29.6100
25/11/2002
31.0800
165.7588
3981.2756
Out
25/11/2002
31.0800
09/12/2002
30.0800
0.0000
3981.2756
Long
09/12/2002
30.0800
08/01/2003
29.0200
-131.3377
3849.9379
Out
08/01/2003
29.0200
29/01/2003
27.6000
0.0000
3849.9379
Long
29/01/2003
27.6000
21/02/2003
27.9600
37.6520
3887.5899
Out
21/02/2003
27.9600
10/03/2003
26.0100
0.0000
3887.5899
Long
10/03/2003
26.0100
21/03/2003
27.1400
144.0568
4031.6467
Out
21/03/2003
27.1400
14/04/2003
25.1700
0.0000
4031.6467
Long
14/04/2003
25.1700
07/05/2003
25.6600
60.1366
4091.7833
Out
07/05/2003
25.6600
22/05/2003
24.7400
0.0000
4091.7833
Long
22/05/2003
24.7400
06/06/2003
26.0900
182.9863
4274.7696
Out
06/06/2003
26.0900
11/07/2003
30.0000
0.0000
4274.7696
Performance for RGZSPOL
Total net profit:
820.42
Total commissions paid:
72.00
Return on account:
23.44 %
Open position gain/loss
0.00
Buy&Hold profit:
-762.99
Bars (days) in test:
551 (789)
Buy&Hold % return:
-21.80%
System to Buy&Hold index:
207.53%
Annual system % return:
10.23%
Annual B&H % return:
-10.75%
System drawdown:
-208.24
B&H drawdown:
-1440.80
Max. system drawdown:
-400.46
B&H max. drawdown:
-1686.26
Max. system % drawdown:
-10.85%
B&H max. % drawdown:
-45.02%
Max. trade drawdown:
-400.46
Max. trade % drawdown:
-10.85%
Trade drawdown:
-294.07
Total number of trades:
9
Percent profitable:
77.8%
Number winning trades:
7
Number losing trades:
2
Profit of winners:
1063.73
Loss of losers:
-243.32
Total # of bars in winners:
80
Total # of bars in losers:
43
Commissions paid in winners:
56.00
Commissions paid in losers:
16.00
Largest winning trade:
249.17
Largest losing trade:
-142.54
# of bars in largest winner:
16
# bars in largest loser:
23
Commission paid in largest winner:
8.00
Commission paid in largest loser:
8.00
Average winning trade:
151.96
Average losing trade:
-121.66
Avg. # of bars in winners:
11.4
Avg. # bars in losers:
21.5
Avg. commission paid in winner:
8.00
Avg. commission paid in loser:
8.00
Max consec. winners:
5
Max consec. losers:
2
Bars out of the market:
428
Interest earned:
0.00
Exposure:
22.3%
Risk adjusted ann. return:
45.84%
Ratio avg win/avg loss:
1.25
Avg. trade (win & loss):
91.16
Profit factor:
4.37
Trade list for RGZSPOL
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Out
14/05/2001
47.0000
09/09/2002
30.5900
0.0000
3500.0000
Long
09/09/2002
30.5900
15/10/2002
31.0800
48.0640
3548.0640
Out
15/10/2002
31.0800
11/11/2002
33.9200
0.0000
3548.0640
Long
11/11/2002
33.9200
25/11/2002
36.3000
237.5780
3785.6420
Out
25/11/2002
36.3000
10/12/2002
36.4200
0.0000
3785.6420
Long
10/12/2002
36.4200
15/01/2003
35.0200
-142.5412
3643.1008
Out
15/01/2003
35.0200
23/01/2003
31.6900
0.0000
3643.1008
Long
23/01/2003
31.6900
19/02/2003
30.8500
-100.7738
3542.3270
Out
19/02/2003
30.8500
04/03/2003
28.8100
0.0000
3542.3270
Long
04/03/2003
28.8100
17/03/2003
28.9000
2.9337
3545.2607
Out
17/03/2003
28.9000
12/05/2003
30.2500
0.0000
3545.2607
Long
12/05/2003
30.2500
16/05/2003
31.5000
136.6281
3681.8888
Out
16/05/2003
31.5000
21/05/2003
30.3500
0.0000
3681.8888
Long
21/05/2003
30.3500
11/06/2003
32.5800
249.1666
3931.0554
Out
11/06/2003
32.5800
16/06/2003
31.8000
0.0000
3931.0554
Long
16/06/2003
31.8000
23/06/2003
33.6800
198.9184
4129.9737
Out
23/06/2003
33.6800
03/07/2003
34.0400
0.0000
4129.9737
Long
03/07/2003
34.0400
09/07/2003
35.9700
190.4430
4320.4168
Out
09/07/2003
35.9700
11/07/2003
36.8500
0.0000
4320.4168
|