logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Damien  
#1 Posted : Thursday, June 18, 2009 7:23:16 AM(UTC)
Damien

Rank: Member

Groups: Registered, Registered Users
Joined: 6/18/2009(UTC)
Posts: 15

Hello,

I am new to MetaStock and I don't know how to create a backtesting script....It consists of 2 moving averages cross over, one stop loss and one profit stop. Can someone please help me develop a back testing script as per below?

Entry:

Long-MA(fast) crosses above MA(medium) & close price above MA(slow).Open on the next bar at market open..

Short-MA(fast) crosses below MA(medium) & close price below MA(slow). Open on the next bar at market open.

Exit:

Long - MA(fast) crosses below EMA(medium). Exit on the next bar at market open.

Short- MA(fast) crosses above EMA(medium).Exit on the next bar at market open.

I need to be able to set up the values for all 3 moving averages (ie 10 bars, 30 bars, 200 bars)

Stop loss:

Long- N x ATR(X) below entry price

Short-N x ATR(X) above entry price

ATR is calculated on entry signal day (1 bar before entry).

Profit stop:

Long- M x ATR(X) above entry price.

Short- M x ATR (X) below entry price

ATR is calculated on entry signal day (1 bar before entry).

I need to be able to set up values M, N and X. M & N multipliers containing 2 decimal points. X is a whole number determining the period over which the ATR is calculated (ie if N =2 & X = 20, that means I need the value for 2xATR(20), or 2x ATR over 20 bars.

Time stop: close position K bars after open – using the open price on the Kth bar after entry.

I need to be able to set up the number K – a whole number.

Regards

Damien
Users browsing this topic
Guest (Hidden)
Similar Topics
Backtesting help needed (MetaStock)
by Damien 6/18/2009 7:23:43 AM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.