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

[EquisMetaStock Group] Re: Short side Trailing Stop



PureBytes Links

Trading Reference Links

It may seem trivial and not apply, but I noted in my "date thing" a
few messages ago that writing dates works when it is DayOfMonth()=Day,
etc instead of how you have it.


--- In equismetastock@xxxxxxxxxxxxxxx, "Edmund Woltynski" <edwol@xxx>
wrote:
>
> Hello Preston and other gurus
> 
> I am having some issues with the PREV function (I think) in developing a
> trailing stop ratchet (short side). The "BearStop" function gives me
a zero
> for all cases everything else above checkout as I expect it to. I
cannot see
> the flaw in my logic. Any help would be appreciated.
> 
> Code:
> Day:=Input("Day Entered Trade",1,31,19);
> Mnth:=Input("Month Entered Trade",1,12,4);
> Yr:=Input("Year Entered Trade",1985,2100,2004);
> HoldingDays:=BarsSince(Day=DayOfMonth() AND Mnth=Month() AND Yr=Year());
> 
> InitStop:=Input("Initial Stop",0,100000,1.52);
> 
> Index := 100-(100/(1+( PDI(21)/ MDI(21)+0.0001)));
> OS:=30-Index;
> 
> Bearish:= CLOSE-(CLOSE*(OS/100));
> Stop:= If(Bearish>=CLOSE,HIGH +(Bearish-CLOSE),HIGH);
> 
> BearStop :=
>           If(Stop<PREV AND Stop< InitStop,Stop,
>           If(Stop<PREV AND Stop> InitStop, InitStop,
>           If(Stop>=PREV,PREV,Stop*Holdingdays)));
> 
> {Plot} Bearstop;
> 
> Kind Regards,
> Ed
>   .
>



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/