PureBytes Links
Trading Reference Links
|
Siva,
Two ways of doing this:
1.) In the System Tester, under Stops..., and Inactivity..., just set the minimum amount of
movement to some unreasonably high number like 50,000 and right below,select the number of days in
trade that you desire.
2.) To program this in Formula Language, the general form is as follows:
EntryConditionVariable:=Cross(mov(c,18,e), mov(c,33,e));
ExitLongTest:=If(BarsSince(EntryConditionVariable)> 4{or some N bars},1,0);
Use both of these as any other True/False variable.
Dave Nadeau
Fort Collins, CO
--- "Sivaraj.K" <siva@xxxxxxxxxxxxxx> wrote:
> 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
>
>
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
|