PureBytes Links
Trading Reference Links
|
------------------------------------------------------------------------
You cannot reply to this message via email because you have chosen not
to disclose your email address to the group.
To reply: http://groups.yahoo.com/group/equismetastock/post?act=reply&messageNum=5584
------------------------------------------------------------------------
Roy:
I have one more question. I want to enter the start date
and stop date for these lines when I first initiate this
new indicator. How can I parse an input string of:
mmddyyyy
into three variables?
Thanks.
Bob
Original Message:
-----------------
From: Roy Larsen rlarsen@xxxxxxxxxxxxxx
Date: Sat, 30 Nov 2002 14:18:48 +1300
To: equismetastock@xxxxxxxxxxxxxxx
Subject: Re: [EquisMetaStock Group] Indicator Lines
Bob
Here are some line plots that might help. One of these was writteen by Jose
Silva, one by myself, and the other possibly a combined effort - in short I
forget. If these don't suit your needs then you may be able to use some of
the ideas to create your own indicator.
I believe there are also dll versions around that are probably more
sophisticated. Someone may be kind enough to pass a dll on.
Roy
{RL Draw Line}
D1:= DayOfMonth()=3 AND Month()=10 AND Year()=2001; {example}
D2:= DayOfMonth()=22 AND Month()=10 AND Year()=2001;
P1:=C; {beginning price formula}
P2:=C; {ending price formula}
V1:=ValueWhen(1,D1,P1);
V2:=LastValue(ValueWhen(1,D2,P2));
B1:=LastValue(BarsSince(D1));
B2:=LastValue(BarsSince(D2));
Bp:=LastValue(B2);
Line:=V1-Cum(If(D1=0,(V1-V2)/(B1-B2),0));
Line:=Ref(Ref(Line,-Bp),Bp); {blank end of line}
Line;
{Draw Line Version 1.1}
Date1:= DayOfMonth()=3 AND Month()=10 AND Year()=2001;
Date2:= DayOfMonth()=22 AND Month()=10 AND Year()=2001;
Date3:= DayOfMonth()=22 AND Month()=10 AND Year()=2001;
P1:=C; {beginning price formula}
P2:=C; {ending price formula}
P3:=H; {ending price formula second line}
V1:=ValueWhen(1,Date1,P1);
V2:=LastValue(ValueWhen(1,Date2,P2));
V3:=LastValue(ValueWhen(1,Date3,P3));
B1:=LastValue(BarsSince(Date1));
B2:=LastValue(BarsSince(Date2));
B3:=LastValue(BarsSince(Date3));
Bp:=LastValue(B2);
Bp1:=LastValue(B3);
Line1:=V1-Cum(If(Date1=0,(V1-V2)/(B1-B2),0));
Line1:=Ref(Ref(Line1,-Bp),Bp);
Line2:=V1-Cum(If(Date1=0,(V1-V3)/(B1-B3),0));
Line2:=Ref(Ref(Line2,-Bp),Bp);
Line1; Line2;
{JS Draw Line}
{define events}
time1:= DayOfMonth()=1 AND Month()=3 AND Year()=2001;
time2:= DayOfMonth()=26 AND Month()=2 AND Year()=2002;
price1:=C;
price2:=C;
{restrict to last events}
time1:=time1 AND Cum(time1)=LastValue(Cum(time1));
time2:=time2 AND Cum(time2)=LastValue(Cum(time2));
{sort events}
e1pds:=LastValue(BarsSince(time1));
e2pds:=LastValue(BarsSince(time2));
x1:=If(e1pds>e2pds,time1,time2);
x2:=If(e1pds>e2pds,time2,time1);
y1:=If(e1pds>e2pds,price1,price2);
y2:=If(e1pds>e2pds,price2,price1);
{fix coordinates}
y1:=ValueWhen(1,x1,y1);
y2:=LastValue(ValueWhen(1,x2,y2));
b1:=LastValue(BarsSince(x1));
b2:=LastValue(BarsSince(x2));
plot:=y1+BarsSince(x1)*(y2-y1)/(b1-b2);
plot:=Ref(Ref(plot,-b2),b2);
plot;
----- Original Message -----
From: <robert@xxxxxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Saturday, November 30, 2002 1:06 PM
Subject: [EquisMetaStock Group] Indicator Lines
> All:
>
> I would like to create an indicator for Metastock
> T\that draws a line from point A to point B where
> each point is a date,price pair. Is there any
> way to do this?
>
> Is there any way to print characters or labels
> at specified dates, such as 'A' on 11/25/2002
> above or below the bar for that day?
>
> Thanks for the help.
>
> Bob
>
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
>
>
>
> 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/
>
>
>
>
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/
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
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/
|