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

Re: Code for stops



PureBytes Links

Trading Reference Links

Ed:

Yes, you can write code to set a stop, but it's not pretty if you need to
refer to the entry price or entry date.  You also have the problem that the
System Tester can only exit your trade on the open, close, high or low of the
particular bar.  The System Tester's built-in stops allow you to exit at the
stop price, but I don't think these are flexible enough for what you have in
mind.

If you explain your exit parameters in more detail, someone here can probably
make some suggestions.  For what you have described, you could exit a long
position with:

ExitPrice:= If(Close >= High-0.25*(High-Low), Low-AFewTicks, PREV);
Low <= ExitPrice

Regards


----- Original Message -----
From: Ed Montero
To: metastock@xxxxxxxxxxxxx
Sent: Thursday, April 20, 2000 7:37 AM
Subject: Code for stops

Is there any way to set a moving trailing stop in a MS System based on my own
criteria.

Specifically, on my S&P system, I  move a trailing stop if a bar in my trade
direction finishes in the upper 25% of the bar (if long) or lower 25% of the
bar (if short),  I move the trailing stop to a few ticks under/over the bar.
I may also move it based on other criteria, such as weakening trend, etc.  Can
you write code to set a stop, or does it have to be set up using the available
MS options only.

Thanks for your help,

Ed Montero
emontero@xxxxxxxxxxxxxx