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

Re: [EquisMetaStock Group] trailing stop configuration



PureBytes Links

Trading Reference Links

Mike,

What do you typically use for your EntryPCT & DailyPCT.
Can you provide your logic?

Thanks for the great post.
CC
    


--- In equismetastock@xxxxxxxxxxxxxxx, "Mike Sloane" <mfsloane@xxxx> 
wrote:
> I do not use the system tester available in MetaStock; I prefer to 
build
> custom indicators to return entry and exit conditions and derived
> cumulative equity.
>  
> The following is a cut down sample of the type of code that will 
provide
> you with a trailing stop that latches ON at the start of a trade,
> follows the trade (adjusting daily) and reverts to zero on exit,
> awaiting the next entry signal.
>  
> Fml("LONGALERT") can be any vaild set up condition; entry price 
trigger
> in example assumes that you enter at or above the HIGH on the day
> following your set up condition. You will need to fill in your 
values
> for EntryPCT and DailyPCT.
>  
> The indicator returns:
> a) the adjusted value of the trailing stop for every day that the 
stop
> is not breached; 
> b) (-ve) the adjusted value of the trailing stop on the day of exit;
> c) zero when not in a trade.
>  
> If you want to plot this an indicator on a chart, suggest you 
create a
> separate formula that returns the TrailingStop value when >0 and LOW
> when <=0 to overcome scaling problems.
>  
>     {yesterday set-up?}
>     SetUpDay := Ref(Fml("LONGALERT"),-1);
>  
>     {determine entry price trigger and actual entry price}
>     Trigger := Ref(H,-1);
>     {did it open higher?} 
>     Trigger := If(O > Trigger, O, Trigger);
>  
>     {calculate set-up day stop value}
>     EntryPCT:= {insert x value};
>     DailyPCT:= {insert y value};
>     SUDStop:= (Ref(H,-1) + Ref(L,-1))/2 - EntryPCT*ATR(10);
>  
>     {calculate entry day result}
>     EntryDayResult:= 
>     If(SetUpDay AND H >= Trigger,
>     If(L <= SUDStop, -SUDStop, SUDStop), 0);
>  
>     {calculate trailing stop}
>     TrailingStop:= 
>     If(PREV <= 0, EntryDayResult,
>     If(L <= (PREV + DailyPCT*ATR(10)),- PREV, (PREV +
> DailyPCT*ATR(10))));
>  
>     TrailingStop
>  
> Good luck with your trading.
>  
> MS
>  
>  
>  
> 
> -----Original Message-----
> From: Bhavesh Rajyaguru [mailto:bha6973@x...] 
> Sent: Wednesday, 20 August 2003 4:49 PM
> To: equismetastock@xxxxxxxxxxxxxxx
> Subject: [EquisMetaStock Group] trailing stop configuration
> 
> 
> Hello,
> 
> I am user of Metastock ver 8.0 EOD,
> not good at programming and requires help.
> 
> I have recently made my system but have 
> one problem i.e I am not able to configure
> trailing stop as per my concept.
> 
> I want to configure my trailing stop for longs :
> the day my system generates buy signal :=
> median price minus x% of atr(10) and daily
> subsequently y% of atr(10) should be added.
> similarly reverse for shorts : the day my system
> generates sell signal:=i.e median price 
> plus x% of atr(10) and daily
> subsequently y% of atr(10) should be subtracted.
> 
> I want this concept to be optimized in system tester
> and also as custom formula which can tell me 
> next day's stop in advance.
> 
> any suggestion other than this concept
> also invited.
> 
> anybody there who can help me 
> out would be highly appreciated
> 
> Thanks for helping me in advance.
> 
> Bhavesh Rajyaguru
> 
> 
> 
> 
> Yahoo! Groups Sponsor	
> 
> ADVERTISEMENT
>  
> 
<http://rd.yahoo.com/M=251812.3170658.4537139.1261774/D=egroupweb/S=17
05
> 
375617:HM/A=1693352/R=0/SIG=11tralmvc/*http://www.netflix.com/Default?
mq
> so=60178293&partid=3170658> click here	
>  
> <http://us.adserver.yahoo.com/l?
M=251812.3170658.4537139.1261774/D=egrou
> pmail/S=:HM/A=1693352/rand=413189025> 	
> 
> 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/l.m7sD/LIdGAA/qnsNAA/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/