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

Re: [EquisMetaStock Group] Metastock Fixed Trailing Stop Loss to go along with Trade Sim?



PureBytes Links

Trading Reference Links

Gordon

This PREV-based latch formula will give accurate exit signals for a simple
trailing stop. The beauty of this latch is that it only uses two PREV's,
even though that may be two too many for some. The reason for using PREV is
to ACCURATELY identify the timing of the FIRST buy signal. Any other
approach leaves you vulnerable to secondary signals that change the
perceived entry price and therefore invalidate the entry based exit
calculation.

Murphy puts is succinctly - if it CAN go wrong then it WILL go wrong. If you
don't use this type of latch mechanism to "lock in" the point of entry then
the use of HighestSince() or ValueWhen() is quite useless because your
reference point becomes more uncertain as the trade progresses. You may
think it is of no consequence if a second signal is generated when the price
has risen, and you may be right. Unfortunately there's no law that says the
price won't move against you before the next signal. If only real life were
as simple as HighestSince(1,"entry signal",CLOSE)

  {ATR Latch Trailing Stop}
A:=3; {ATR multiplier}
BC:=Cross(Mov(C,15,E),Mov(C,25,E)); {buy example}
SC:=Cross(Mov(C,25,E), Mov(C,15,E)); {sell example}
Trade:=If(PREV<=0,BC,If( {SC OR} {optional sell}
C<HighestSince(1,PREV=0,C)-A*ATR(7),-1,1));
Trade<0;

You can of course use a trailing stop that's independent of the entry such
as this one from Steve. You won't have quite the same flexibility as with a
latch but it's simpler to understand and just as effective.

  {ATR Trailing Stop}
M:=Input("Multiples of ATR",1,10,3);
D:=Input("Periods for ATR",2,200,10);
SL:=C-M*ATR(D);
ST:=If(C<PREV,SL,Max(SL,PREV));
ST;
{ST< Ref(ST,-1)} {exit binary}
{The idea is that the stop cannot go down, only up, until the close is less
than the ATR stop}

Roy


----- Original Message ----- 
From: "Gordon Sutherland" <gosuth@xxxxxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Monday, August 04, 2003 7:30 PM
Subject: RE: [EquisMetaStock Group] Metastock Fixed Trailing Stop Loss to go
along with Trade Sim?


> I wanted to to set a Chandelier Exit in the Enhanced System Tester EOD
> and received the following assistance from Equis Inter'l. Metastock
> seems to make it very hard to establish easily the Position Entry Date.
> Hope the undermentioned doesn't add to the confusion.
> Regards,
> Gordon Sutherland
>
> From: formulas@xxxxxxxxx
> Sent: Thursday, 26 June 2003 3:54 a.m.
> To: gosuth@xxxxxxxxxxxx
> Subject: RE: Coding of a Volatility Exit [T200306230076]
>
>
> Sir,
>
> you will have to use the valuewhen function.
> It would look like :
>
> BC:={buy condition};
> Valuewhen(1,BC,H)
>
> Hope this helps
>
> Best regards,
> Patrick S Nouvion
> Equis Technical support
>
> -----Original Message----- 
> From: IMCOutgoing
> Sent: Monday, June 23, 2003 3:09 AM
> Subject: Re:Coding of a Volatility Exit [T200306230076Z305061]
>
>
> Sender  : gosuth@xxxxxxxxxxxx
> Tracking Number         : T200306230076Z305061
> Pool    : Formulas
> Sent to         : Equis support <support@xxxxxxxxx>
> Date    : 6/23/2003 3:09 AM
>   _____
>
> Forwarded by: Doug
>
> (no comments entered)
>   _____
>
> Hi,
>
> My Customer Number is: 70395.
>
> I am running MetaStock 8.01 EOD. I would like to write a rule that will
> trigger an exit in the Enhanced System Tester if the Close falls below
> say 3 *  ATR(7) from the High since entry of the trade. I can't see a
> Simulation function that will give me the Position High Price. Is it
> possible for you to help me with this, I am hoping to use it in a TA
> Society presentation later this week and to provide the hard code rather
> than just the concept of a "Chandelier Exit" would add credibility.
>
>
> TIA.
>
> Regards,
>
> Gordon Sutherland
> New Zealand
>
>
>
>
> Regards,
>
> Gordon Sutherland
>
> -----Original Message-----
> From: metastockuser [mailto:metastockuser@xxxxxxxxx]
> Sent: Monday, 4 August 2003 5:29 p.m.
> To: equismetastock@xxxxxxxxxxxxxxx
> Subject: [EquisMetaStock Group] Metastock Fixed Trailing Stop Loss to go
> along with Trade Sim?
>
>
> Does anyone here know how to set up a fixed trailing stop loss in a
> metastock exploration (8.0 End of Day) that will work with trade Sim?
>
> I've found a formula on the net but not being a programmer don't
> really understand it or how to work it into a set up so that it works
> with Trade Sim
>
> If(cum(1)=1,
> {then} Close,
> {else} If((C*1.1) <= PREV,
> {then}(C*1.1),
> {else} PREV));
>
> I'm using two triggers.  But I've got no idea of how a fixed trailing
> stop loss would be set up.  Perhaps as a trailing band (similar to the
> volatility and standard diviation stops) so the "volatility" for the
> band could be the fixed trailing stop loss forumula?
>
> I would imagine the set up might work as below but if anyone knows for
> sure, has done a fixed trailing stop, I'd love to know how you did it.
>
> Trigger1:= (trade system exit conditions);
> Volatility:= (trailing stop loss formula?);
> BandLong:=ExtFml("TradeSim.TrailingStop",
> Trigger,
> Long,
> Volatility,
> CLOSE,
> ExitTrigger:= Trigger1 or Trigger2
>
>
>
>
>
>
> Yahoo! Groups Sponsor
>
> ADVERTISEMENT
>
> <http://rd.yahoo.com/M=259538.3625325.4914071.1261774/D=egroupweb/S=1705
> 375617:HM/A=1695348/R=0/SIG=11u38u3s2/*http://hits.411web.com/cgi-bin/hi
> t?page=1374-105951838331032> click here
>
> <http://us.adserver.yahoo.com/l?M=259538.3625325.4914071.1261774/D=egrou
> pmail/S=:HM/A=1695348/rand=732021420>
>
> To unsubscribe from this group, send an email to:
> equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/> .
>
>
>



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/sO0ANB/LIdGAA/ySSFAA/BefplB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/