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

[Metastockusers] Re: Plotting a trailing stop in the chart window



PureBytes Links

Trading Reference Links

Pegasus has a very good code for trailing stops. Go here: 
http://users.bigpond.com/prominex/MetaStock/TrailStop.txt

--- In Metastockusers@xxxxxxxxxxxxxxx, "metarockx" <k_rock@xxxx> 
wrote:
> hi everybody
> 
> I have designed a close trailing stop for short term systems.
> The logic is to start with an ATR multiple subtracted from the low 
> on the first day of the trade and on the following days to rise 
the 
> stop by the difference of the respective lows, yet in such a way 
> that the stop for the long position can never be lower than the 
> previous stop value.
> 
> (entry is only a simple example) 
> 
> atrs := 4;
> atrmult:= 0.25;
> 
> longentry:= Cross(C,MOV(C,30,S));
> 
> stopl:=If(BarsSince(longentry)=0,L-ATR(atrs)*atrmult,If(L>Ref(L,-
> 1),PREV+(L-Ref(L,-1)),PREV));
> 
> stopl;
> 
> I'd like to plot this as an indicator in the chart window. My 
> problem is that during the "flat" periods the stop grows higher 
and 
> higher and so it distorts the chart view.
> 
> Anybody got an idea how to avoid that?
> 
> Thanks so much
> 
> metarockx


------------------------ 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/mOAaAA/3exGAA/qnsNAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

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