log in     sign up for free
 
Your worst-case exit, which is designed to preserve your capital, should be determined ahead of time.
Van K. Tharp
 
 
Home
systems (284)
 
 
Special offer: buy MetaStock (try for free)   |   Reuters QuoteCenter Real-Time Data (get a free month)   |   EOD Data
 

Buy

MetaStock

     (special offer)
 
 
 

Buy

EOD data for MetaStock

     (special offer)
 
 
 

Buy

Realtime data for MetaStock

     (special offer)
 
 
 
 
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

Random Entry Generator for Systems Testing

System for: MetaStock


 

 

Views:  1903

Added: March 07, 2007
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5

3.71

1 ratings
 
 

email this link

 
 
Tags: MetaStock, system
 
Your Ad Here
To: "MetaStock Listserver" <metastock@xxxxxxxxxxxxx>
Subject: Random Entry Generator for Systems Testing
From: "Dave Nadeau" <dave_nadeau@xxxxxxxxx>
Date: Sun, 18 Mar 2001 21:00:07 -0700
Importance: Normal
Reply-To: metastock@xxxxxxxxxxxxx
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 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.

Dave Nadeau
Fort Collins, CO

 

 



Code:

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

{Enter your exit for testing}
{na wykresie jest c < ref(c,-1)}

ENTER SHORT

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


EXIT SHORT

{Enter your exit for testing}
{na wykresie jest c > ref(c,-1)}


 





Source: http://purebytes.com/archives/metastock/

 

View similar:

StoRSI Trading System
Linear Regression System
RSI / Bollinger Band
Pivot Points All
Breakout & Breakin Signals
CCI Moving Average Crossover System Test
Candle - 3 Crows & Soldiers & %D
RS System No.1
J2L Trading System
Key Reversals System
...
 
 
all systems for MetaStock
all systems

 

 

Email to friend

Top

 

     
However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators
and systems are submitted by anonymous users.
Therefore S4T™ does not take any responsibility for it's quality.
If you use any of this information, use it at your own risk. You are responsible for your own trading decisions.
Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade.
In no case will S4T™ be responsible for your trading gains or losses.
 
Privacy note | (c) copyrights systems4trading.com 2006-2012