[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Metastockusers] Simple System, BUT... How Do I Avoid Gaps When Testing?



PureBytes Links

Trading Reference Links

I'm rather new to system testing, so I created a simple (Long Only)
system test in MetaStock 8.0 (EOD) to examine how the Enhanced System
Tester recreates and tests systems. 

This system is very simple and is very similar to price crossing up
through a moving average line. I'm using end of day data and it only
goes long. 

The system buys if today's close is below the "Typical Price" and then
trades up through it on the next bar (day). (The "Typical Price" in
MetaStock is simply the (H+L+C)/3). 

The "Typical Price" also called the "Pivot Point" was discussed in the
February, 2000 issue of "Technical Analysis of Stocks & Commodities".

So, the idea with this system is: If today's close was indeed below
the typical price, (which of course isn't known until after the close)
the system then places a stop-limit order to buy if the stock can
trade up through this level "The Typical Price" + .05 on the next bar
(day).

If the stock never trades up to this level then of course the order is
cancelled. New parameters (Typical Price) will then be calculated for
the next days orders. 

If the buy order is filled the system holds the long position as long
as the close of the day is above the Typical Price value. If the close
falls below the Typical Price, the system enters a sell order on the
next bars open.

So, the parameters for a buy order and a sell order are identical.
Which means it's entirely possible to have both a buy order and a sell
order in place at the open. 

The sell order sells an existing position on the open,(because
yesterdays close was below the "Typical Price"). 

The buy order buys a new position, (because yesterdays close was below
the "Typical Price")if the stock can trade up during the day through
the "Typical Price".

SIMPLE. Right?

Buy if the stock shows strength. Sell when it shows weakness. Buy
again when it shows strength

Only problem I'm having is if the stock gaps up the next day on the
open. Some days it gaps up and keeps going higher. This results in my
limit price never being attained and the order is cancelled. Which is
exactly what should happen. BUT... Some days the stock gaps up and
then trades lower the rest of the day which triggers my limit order. I
don't want the system to buy as the stock is falling. Which is exactly
what happens.

Here's the system:

GENERAL
Order Bias: Long Orders
Portfolio Bias: Single
Position Limit: Limit number of simultaneous positions to 2 

BUY ORDER
Formula: C < Typical() 
Order Type: Stop Limit
Limit or Stop Price: Typical()+.05
Entry Size: Use Default Size (100 shares)
Expiration: Good for Day
Strategic Delay (Bars): Tick: 0  Minutes: 0  Day: 1

SELL ORDER
Formula: C < Typical()
Order Type: Market
Limit or Stop Price: n/a
Entry Size: Use Default Size (100 shares)
Expiration: Good for Day
Strategic Delay (Bars): Tick: 0  Minutes: 0  Day: 1

When you click on New Simulation and select the system, the first box
that appears is to add securities. So far I am just testing one stock,
symbol URBN. Daily price data, 500 periods.

Click "Next" for System Testing Options. 
Trading: 
Points Only Test: NOT checked
Initial Equity: 10,000
Default Size: Number of Units 100

Portfolio:
Long

Results:
Not a "quick Test"

Click "MORE" and select the Trade Execution tab
Trade Price:
Realistic Market Prices: NOT checked
Buy Price: Open
Sell Price: Open
Delay Order Opening: 0 bars

That's all there is to it. Because I'm using a Stop-Limit order in the
Buy order formula it doesn't use the Open price but uses my limit
price instead. The Sell order uses the Open on the next bar.

Only thing I can't make it do is not buy on a Gap up.

Anyone have any suggestions ?


To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/Metastockusers/

To unsubscribe from this group, send an email to:
 Metastockusers-unsubscribe@xxxxxxxxxxxxxxx

Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/