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

RE: Trailing stop formula



PureBytes Links

Trading Reference Links

Here's a John Momsen Cotton system that includes most of the things you'll
need for simple entries and trailing stops

Name: Momsen Cotton #1
Notes:
Sell Oct Cotton 15 June to 31 July
Entry on one tick below 16 day lows
Initial stop one tick above 5 day high
When profitable trailing stop one tick above 8 day highs
Exit trade on close of first trading day after 22nd August

Enter Short:
InSeason:=((Month()=6 AND DayOfMonth()>=15) OR Month()=7) AND Year()=LastValue(Year());
EntryStop:=Min(OPEN,Ref(LLV(L,16),-1) - 0.05);
ShortEntry:=InSeason AND L <= EntryStop;
ShortEntry

Close Short:
InSeason:=((Month()=6 AND DayOfMonth()>=15) OR Month()=7) AND Year()=LastValue(Year());
EntryStop:=Min(OPEN,Ref(LLV(L,16),-1) - 0.05);
ShortEntry:=InSeason AND L <= EntryStop;
{DEFINE ENTRY PRICE, WITH EXIT BEING -ENTRY PRICE AND NO TRADE BEING 0}
InitialStop:=Ref(HHV(H,5),-1)+0.05;
TrailingStop:=Ref(HHV(H,8),-1)+0.05;
EntryPrice:= If(PREV <= 0,
   {Trade entered today?}
   If(ShortEntry, EntryStop, 0),
   {Trade entered before today. Stopped today?}
    If(DayOfMonth()>22 AND Month()>=8,-PREV,
    If(PREV >= TrailingStop,
      If(HIGH >= TrailingStop,-PREV,PREV),
      If(HIGH >= ValueWhen(1,PREV=0,InitialStop),-PREV,PREV))));

{EXIT IF ENTRY PRICE < 0 (MEANING EXIT)}
EntryPrice < 0


> -----Original Message-----
> From: owner-metastock@xxxxxxxxxxxxx
> [mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Philip
> Sent: Wednesday, 27 June 2001 13:38
> To: metastock@xxxxxxxxxxxxx
> Subject: Trailing stop formula
> 
> 
> Greetings,
> 
> I would like to ask your help in writing a formula for trailing stops. The
> concepts themselves are very basic:
> 
> For short trades: H + ATR(10)
> For long trades: L- ATR(10) . . . or some such, doesn't really matter at this
> point.
> 
> But I'd like to write the formula in such a way that once a trade has been
> entered, the stop ONLY moves in the direction of the trade, or stays at the
> same level. Thus, in a short trade, the stop would only follow the market
> down or stay unchanged, it would never retrace any progress it's made, never
> give up any ground, even if the market moved up against the position. The
> same would hold true for a long trade, in reverse naturally. The trailing
> stop moves up with price, but goes sideways if the market drops, thereby
> letting the stop take me out.
> 
> Has anyone been over this terrain? I am running MS 6.52.
> 
> Best regards,
> Philip
> 
>