MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 A B C D E F G H I J K L M N O P R S T U V W Y Z #

Random Entry Generator for Systems Testing
To: "MetaStock Listserver" <metastock@xxxxxxxxxxxxx>
Subject: Random Entry Generator for Systems Testing
Date: Sun, 18 Mar 2001 21:00:07 -0700
Importance: Normal
Sender: owner-metastock@xxxxxxxxxxxxx

Here's just a suggestion for writing systems. Many successful systems writers suggest that you build a system in parts. Find a high probability entry and work on exits independently before you combine the two and study the results.

Here's one way to generate a random entry system that you can use to test your exits in a market or to compare with your entries to see if they are truly better than random.

I'm using an uncorrelated value to base my entries on: the volume. Not the relative change in volume or it's value in an absolute sense, but rather as a test to see if it's divisible by a number, actually a prime number. Based on the data available in Metastock (OHLCV) this seems to be the most independent that I could find (without the use of a random number generator which would have to be built in a .dll).

For example,

Random Entry Generator for Systems Testing

ENTER LONG

Mod(Volume,23)=0
{will open a long position if the volume is an even number Please note, if you have large volumes (x100) then you'll need to substitute Volume/10000 or some other appropriate denominator to get rid of the zeros}

EXIT LONG

{na wykresie jest c < ref(c,-1)}

ENTER SHORT

Mod(Volume,31)=1
{Same note as above}

EXIT SHORT

{na wykresie jest c > ref(c,-1)}

For those with MetaStock Pro, you can put Optimization parameters in the stops dialogue to see the systems behaviour across a range of parameters. For EOD, you can change the stops manually to see the results.

Please note: choose the prime number depending on the "normal" length of trade that you are interested in studying. Because the system tester will close your LONG and enter SHORT when the short condition is hit, your random entries might be experiencing more random exits than you think. To test this out on your data, just create a function like CUM(Mod(Volume,31))/Cum(1) where a lower number like 0.2 or 0.3 gives you lots of room between entries on average.

Fort Collins, CO

[1183]
Source / From: TOP
http://purebytes.com/archives/metastock/

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.