PureBytes Links
Trading Reference Links
|
Hi Roy,
Thank you so much, I really appreciate this.
Kindest regards
Guno
--- In Metastockusers@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxxx>
wrote:
> Guno
>
> This should come close. You'll need to set default values for your
particular usage. I haven't paid
> much attention to the accuracy of the start and end definitions
(the first Y and R variables) and if
> your half hour crosses an hour barrier there may be an issue. As
set up the period high, low and
> average are truncated to only show for the current trading day.
This may mean that you have no
> signal all for the first half hour of trading. You may also find
that corruption occurs once into
> the last half hour of the day. These are things that are quite
messy to test so I'll leave it as is
> for now. If any plot reverts to zero then the chart will be
distorted. This is easy to overcome by
> replacing the affected plot with ValueWhen(1,Plot>0,Plot), and
there are other possible solutions as
> well.
>
> If you report back any problems I'll see if I can tidy it up a
bit. It's not something that I can
> use with MS EOD so I'm reluctant to put too much time into it.
>
> Roy
>
> > Thank you so much for spending time on this.
> > The periods I am using are 5 Min bars.
> > As the number of bars in a trading day is dependent on the
number of
> > trades in that particular trading day, I would suggest to use the
> > following anchor points
> >
> > In the previous trading day: The first 5 min bar in the last half
> > hour of trading
> > In the current trading day : The Last 5 min bar in the first
half
> > hour of trading
>
> {Average Price Line}
> {scale to price}
> Lh:=Input("Last hour of day" ,0,23,14);
> Lm:=Input("Start at Minute" ,0,59,0);
> Fh:=Input("First hour of day",0,23,8);
> Fm:=Input("End at Minute" ,0,59,0);
> A:=Cum(DayOfWeek()<>ValueWhen(2,1,DayOfWeek()));
> B:=A=LastValue(A); {today}
> N:=A=LastValue(A)-1; {yesterday}
> Y:=N AND ((Hour()=Lh AND Minute()>=Lm) OR Hour()>Lh);
> R:=B AND ((Hour()=Fh AND Minute()<=Fm) OR Hour()<Fh);
> R:=Y OR R; {scan last and first half hour}
> Y:=Cum(R)=LastValue(Cum(R));
> R:=R AND Alert(R=0,2); {start of scan period}
> Y:=Y AND Alert(Y=0,2); {end of scan period}
> D:=ValueWhen(1,B,1); {used to truncate plots for previous days}
> F:=LastValue(ValueWhen(1,Y,HighestSince(1,R,H)));
> {high for scan period}
> G:=LastValue(ValueWhen(1,Y,LowestSince(1,R,L)));
> {low for scan period}
> D*F; {truncated high for scan period}
> D*G; {truncated low for scan period}
> D*(F+G)/2; {truncated average for scan period}
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Metastockusers/
<*> To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|