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

Re: How to set STOP N Bars



PureBytes Links

Trading Reference Links

There is no easy way with Metastock.
For your entry, either create an indicator for your entry, such as MACross =
Cross(mov(c,18,e), mov(c,33,e)) or enter your entry in the Barssince
function in the exit long tab.

Such as:
For your exit, use the Barssince function = N:

IF(Barssince(Fml("MACross")=N,1,0)
OR
IF(Barssince(Cross(mov(c,18,e), mov(c,33,e))) =N,1,0)

Either should work; I use the indicator approach to minimize clutter.

Good Luck,

Pete
----- Original Message -----
From: Sivaraj.K <siva@xxxxxxxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: Monday, March 26, 2001 4:13 AM
Subject: How to set STOP N Bars


> Hi
>
> Is it possible to set (close long positions) N Bars from the time the BUY
> position is entered? How is this done?
> In TradeStation  the following puseduo code would accomplish this:
>
> "If current bar if greater than or equal to the number of bars from the
> Position Bar than Exit."
>
> What I want to do in MetaStock for example:
>
> Long:
> Cross(mov(c,18,e), mov(c,33,e))
>
> Close Long:
> N Bars from going Long.
>
> Buy on next day Open.
> Exit on next day Open.
>
> Any suggestion would be most welcome.
>
> Regards
> Siva
>
>
>