ZoneStrategy based on the 3D Zone Statistics

trading strategies and money management discussion, code, results

Moderator: moderators

User avatar
michal.kreslik
rank: 1000+ posts
rank: 1000+ posts
Posts: 1032
Joined: Sat May 13, 2006 2:40 am
Reputation: 0
Location: Monte Carlo, Monaco
Real name: Michal Kreslik
Gender: Male
Contact:

ZoneStrategy based on the 3D Zone Statistics

Postby michal.kreslik » Fri Jun 09, 2006 12:14 am

As promised, I've written a sample testing trading system based on the Zone statistics concept. The original article which describes the basic idea you can find here in the statistics forum:

http://kreslik.com/forums/viewtopic.php?t=41

This is only one of the many possible approaches to capitalize on the ZoneStats concept. The presented trading system is in no way a final, ready-to-trade strategy. And yet, it shows a profit potential accross a 3.5+ years long sample period including the last 30% out-of-sample unseen data. That means the input parameters selected were not curve-fitted and the basic model is sound.

Given the fact that there is no money management attached to the system whatsoever, the results are quite nice. You should keep in mind that this trading system torso is just a preliminary raw test of how the Zone statistics works in the market. The only thing the system does is opening a position at the close of a bar and closing the position strictly at the close of the following bar. Nothing more.

To recap, the idea behind the Zone Strat trading system is quite simple: trade in the direction of the proabability. If the statistics shows a tendency to stay in the current Zone, open a position in this direction. If the statistics shows there is a tendency to abandon the Zone, then open the position the other way round.

I have only added a little twist to the code which ensures we are not going to open a position if there is too small a profit potential despite the fact that we would trade with the probabilities.

Example of such a case:

according to the number of consecutive bars in the Zone and the Zone percentage, there may be a high probability that the next bar will close in the same Zone as did the current bar. But if the current bar in fact only showed a 5 points range, then the minimum distance from the current close to the "stay in the Zone" price level may not be worth trading after the trading costs are subtracted or even the distance may be negative. The reverse applies to the minimum distance to abandon the current Zone (see the code).

So, incorporated into code there is a measure of what is the minimum palatable distance between the current close and the price level at which a Zone change/Zone abandonment occurs to open a trade.

The best way to come to grips with this test system is to apply it to your chart by yourself and fiddle with the settings.


Attached:
- equity curve
- trading system code

You are free to experiment with the code by yourself and post your results here!
Good luck!
Michal

If you can't see the attached image and ELD file, please log in. You must first register to be able to log in.
Attachments
ZoneStratTestSysetm_EqCurve.png
ZoneStratTestSysetm_EqCurve.png (11.05 KiB) Viewed 1559 times
ZONESTRAT.ELD
(5.81 KiB) Downloaded 246 times

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
michal.kreslik
rank: 1000+ posts
rank: 1000+ posts
Posts: 1032
Joined: Sat May 13, 2006 2:40 am
Reputation: 0
Location: Monte Carlo, Monaco
Real name: Michal Kreslik
Gender: Male
Contact:

3D Zone Strat code in plain text

Postby michal.kreslik » Fri Jun 09, 2006 9:56 am

heyen asked me to post the 3D Zone Strat code in plain text so that he may recode it for AmiBroker.

I am attaching the code in txt to this message.
Attachments
ZoneStrat code.zip
(1.19 KiB) Downloaded 196 times

Ali Son
rank: 150+ posts
rank: 150+ posts
Posts: 179
Joined: Sun May 28, 2006 1:30 am
Reputation: 0
Location: Boston, MA
Gender: None specified

Postby Ali Son » Fri Jun 09, 2006 3:13 pm

"This is only one of the many possible approaches to capitalize on the ZoneStats concept. The presented trading system is in no way a final, ready-to-trade strategy."

Michal, as you not above there may be a myriad of varitations; so, can you give a synopsis of your approach/thinking, if you have not done so already, which I believe is the case. Thanks.

User avatar
michal.kreslik
rank: 1000+ posts
rank: 1000+ posts
Posts: 1032
Joined: Sat May 13, 2006 2:40 am
Reputation: 0
Location: Monte Carlo, Monaco
Real name: Michal Kreslik
Gender: Male
Contact:

Postby michal.kreslik » Sat Jun 10, 2006 12:04 am

Ali,

it follows from the 3D statistics there are strong tendencies present in the price action. A trading system might be built with this knowledge simply by obeying the hidden law revealed by the statistics.

The 3D stats results language is commonplace: if the statistics tells us that after x bars in the same Zone there is a 73% probability that the next bar winds up outside the Zone, then let's bet on such an "edge" information, go grab some pips and buy a Bentley :)

There's really nothing mysterical to that.

Caveat: in any case, never forget there are three kinds of lies:
1. lies,
2. damned lies,
3. and statistics :^o

:D

The above holds true especially if you apply wishful thinking to the process of reading the statistics :)

Did I answer your question?

Ali Son
rank: 150+ posts
rank: 150+ posts
Posts: 179
Joined: Sun May 28, 2006 1:30 am
Reputation: 0
Location: Boston, MA
Gender: None specified

Postby Ali Son » Sun Jun 11, 2006 3:58 am

No, actually, I understand the obvious general principle of how to use statistics in trading luckily ever since B-school, but I was asking about the specifics. Since you said there were "many possible approaches," I naturally asked why you chose your specific variation and if there is any reason you chose it. In any case, I'll look at the code this weekend, divine it myself, and play around with it and maybe that will clarify it for me, unless it's a complex code.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

4x=0
rank: 150+ posts
rank: 150+ posts
Posts: 410
Joined: Tue Oct 17, 2006 10:53 pm
Reputation: 0
Gender: Male

Re: 3D Zone Strat code in plain text

Postby 4x=0 » Sun Oct 22, 2006 6:49 pm

Have there been any refinements to the code of which the common public may enjoy?

The posted equity curve looks awesome without any MM involved. I can only imagine that the results with MM code would be something appreciated by the traders lacking programming/compiling ability.

These statistics appear to be much more usefull than the decimal bias statistic, however much much less accessable. What do the green dots on the equity curve represent? Might someone capable author commonplace actionable trading strategy rules derived from the results?

:smt032

traderwep
rank: <50 posts
rank: <50 posts
Posts: 28
Joined: Sun Aug 27, 2006 3:49 pm
Reputation: 0
Gender: None specified

Postby traderwep » Tue Oct 24, 2006 5:30 pm

hi

i am importing the eld into multicharts which uses ts code. multicharts says the eld is compiled and shows it as loaded but there is nothing on the chart. do i need anything else other than the eld to show trades? i am using it on ym 3 or 5min. i tried on 30 min and still nothing showed.

thanks

wayne

andypeters
rank: <50 posts
rank: <50 posts
Posts: 31
Joined: Sat Sep 19, 2009 7:16 pm
Reputation: 0
Gender: None specified

Postby andypeters » Tue Sep 29, 2009 10:08 am

Has anyone coded this for MT4 ?

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “strategy trading & money management”