Results in atachment
________________________________
From: mateusz.krysiak <[email protected]>
To: [email protected]
Sent: Wed, April 7, 2010 9:36:20 PM
Subject: [amibroker] Re: Bernstein's CTOD as daytrading system- help with afl
code
Hello
Ed , I've removed "one hour min/max" trailing stop and system became quite
profitable, especially using one H instead of 2H as signal lines. I 'll try to
post some results later form FW20.
Regard
Mateusz
--- In amibro...@yahoogrou ps.com, "Edward Pottasch" <empottasch@ ...> wrote:
>
> hi,
>
> "break" has been added in later versions of Amibroker. Amibroker 5.2 will
> work,
>
> this code is just a translation of the system proposed. It is not profitable
> as far as I can see in the current form.
>
> regards, Ed
>
>
>
>
> From: themktmari
> Sent: Wednesday, April 07, 2010 6:50 PM
> To: amibro...@yahoogrou ps.com
> Subject: Re: [amibroker] Bernstein's CTOD as daytrading system- help with afl
> code
>
>
>
>
> Hi Ed,
>
> When I inserted the code in the AA, I get the error as follows:
>
> Ln64, Col: 10: Error 29, Variable 'break' used without having been
> intialised. I use AB 4.8
>
> any way out ?
>
> thx.
>
>
>
> On Tue, Apr 6, 2010 at 3:59 PM, Edward Pottasch <empottasch@ ...> wrote:
>
>
> [Attachment( s) from Edward Pottasch included below]
>
> hi,
>
> you are on the right track but there are multiple ways to solve such a
> problem in Amibroker. I have some standard codes for these type of problems.
> The problem seems simple but with all the exit contraints I find it easiest
> to use an exit loop. I add my code but again there are other ways to solve it
> that might look easier. I tested this setup on futures but it does not seem
> to be profitable.
>
> regards, Ed
>
> chart how it looks like
>
>
>
>
>
> From: mateusz.krysiak
> Sent: Sunday, April 04, 2010 1:20 PM
> To: amibro...@yahoogrou ps.com
> Subject: [amibroker] Bernstein's CTOD as daytrading system- help with afl
> code
>
>
>
> hello
> I' am a amibroker beginner. I 've spend a lot of time looking through the
> internet , but I didn't find nothing similar to this. So i gave up and
> decided to ask for help. Of the point:
> I want to create a afl code which would reflect CTOD intraday system (
> Critical time of day)- p. 186[http://www.scribd. com/doc/7408934/
> the-compleat- day-trader- vol-i] . The assumtions of system :
>
> - buy if 5 minute bar close above max from 2 hours after session start ( 5
> minute close)
>
> - short if 5 minute bar close below max from 2 hours after session start (5
> minute close)
>
> - buy works as both cover and opens new postiion
> - short works as sell and opens new postions
>
> Two different ways in two different systems closing positions
>
> 1) Close postion = time 16.06. ( few minutes before session close) or if
> RSI (15) cross "20" (sell) and "80" (cover)
>
> 2) Close if 5min bar close below/ above max/min from last one Hour.
>
> I have only something like this :
>
> //
>
> ForceCloseTradesAft er = 160600;
>
> Buy=Cross(C, Ref(HHV(C, 24),-1)); // It should be better to replace HHV by
> Bar since or Value when ?
>
> Sell=Cross(Ref( LLV(C,24) ,-1),C) OR (TimeNum() > ForceCloseTradesAft er);
> //
>
> greetings
>
> Mateusz
>
>
>
>
>
>
>
>
> --
> -
>
--- Begin Message ---
Title: CTOD (8.30) 1h - Backtest Report
| |
All trades |
Long trades |
Short trades |
| Initial capital |
10000.00 |
10000.00 |
10000.00 |
| Ending capital |
27635.20 |
14509.60 |
23125.60 |
| Net Profit |
17635.20 |
4509.60 |
13125.60 |
| Net Profit % |
176.35 % |
45.10 % |
131.26 % |
| Exposure
% |
4.66 % |
2.19 % |
2.47 % |
| Net Risk Adjusted Return
% |
3782.56 % |
2056.20 % |
5316.01 % |
| Annual Return % |
88.97 % |
26.24 % |
69.02 % |
| Risk Adjusted Return
% |
1908.26 % |
1196.59 % |
2795.55 % |
|
| All trades |
576 |
273 (47.40 %) |
303 (52.60 %) |
| Avg.
Profit/Loss |
30.62 |
16.52 |
43.32 |
| Avg.
Profit/Loss % |
2.36 % |
1.27 % |
3.33 % |
| Avg. Bars Held |
48.18 |
48.08 |
48.27 |
|
| Winners |
282 (48.96 %) |
126 (21.88 %) |
156 (27.08 %) |
| Total Profit |
70716.40 |
31915.20 |
38801.20 |
| Avg. Profit |
250.77 |
253.30 |
248.73 |
| Avg.
Profit % |
19.29 % |
19.48 % |
19.13 % |
| Avg. Bars Held |
56.29 |
56.61 |
56.03 |
| Max. Consecutive |
8 |
6 |
8 |
| Largest win |
1375.20 |
1285.20 |
1375.20 |
| # bars in largest win |
75 |
75 |
75 |
|
| Losers |
294 (51.04 %) |
147 (25.52 %) |
147 (25.52 %) |
| Total Loss |
-53081.20 |
-27405.60 |
-25675.60 |
| Avg. Loss |
-180.55 |
-186.43 |
-174.66 |
| Avg. Loss
% |
-13.89 % |
-14.34 % |
-13.44 % |
| Avg. Bars Held |
40.40 |
40.78 |
40.03 |
| Max. Consecutive |
6 |
7 |
6 |
| Largest loss |
-554.80 |
-554.80 |
-494.80 |
| # bars in largest loss |
60 |
60 |
53 |
|
| Max.
trade drawdown |
-1040.00 |
-1040.00 |
-900.00 |
| Max.
trade % drawdown |
-53.78 % |
-53.78 % |
-48.15 % |
| Max.
system drawdown |
-2422.40 |
-2896.40 |
-2213.20 |
| Max.
system % drawdown |
-11.79 % |
-18.10 % |
-12.55 % |
| Recovery Factor |
7.28 |
1.56 |
5.93 |
| CAR/MaxDD |
7.55 |
1.45 |
5.50 |
| RAR/MaxDD |
161.90 |
66.11 |
222.70 |
| Profit Factor |
1.33 |
1.16 |
1.51 |
| Payoff Ratio |
1.39 |
1.36 |
1.42 |
| Standard
Error |
1789.69 |
870.93 |
1231.16 |
| Risk-Reward
Ratio |
4.42 |
2.10 |
4.94 |
| Ulcer
Index |
3.75 |
9.23 |
4.25 |
| Ulcer
Performance Index |
22.30 |
2.26 |
14.96 |
| Sharpe
Ratio of trades |
2.39 |
1.29 |
3.38 |
| K-Ratio |
0.0105 |
0.0050 |
0.0117 |
--- End Message ---