PureBytes Links
Trading Reference Links
|
Try:
---8<--------------
pds:=20;
upday:=If(C>Ref(C,-1),V,0);
dnday:=If(C<Ref(C,-1),V,0);
upvol:=Sum(upday,pds);
dnvol:=Sum(dnday,pds);
{ Plot in own window below price chart }
upvol;
dnvol;
---8<--------------
jose '-)
--- In equismetastock@xxxxxxxxxxxxxxx, jc904040 <no_reply@xxxx> wrote:
>
> Hi Tom,
>
> I'm trying to plot the formula you suggested for Sum of Volume and
get
> zero for either plot. The formula (after I corrected a missing
> parenthesis) doesn't elicit an error message, so I assume it's
> ok...but I am new to Metastock formulas and I don't know where to
> start to troubleshoot it. Can you suggest anything I could have
done
> wrong?
>
> This is the formula pasted from my Indicator Builder:
>
> pds:=20;
> upday:=If(C>Ref(C,-1),V,0);
> dnday:=If(C<Ref(C,-1),V,0);
>
> upvol:=Sum(upday,pds);
> dnvol:=Sum(dnday,pds);
>
> ==========================
>
> Checking in the Data Window, the entry Sum of V shows "N/A". Should
> there be two plots (upvol and dnvol) or am I missing a plot
statement
> in the formula(I'm used to Easy Language, Tradestation, where you
have
> to put in a plot statement to get a plot.
>
> Regards,
>
> jc
>
>
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "Tom Sprunger"
> tlsprunger@xxxx> wrote:
> > Try something like this.
> >
> >
> > pds: =20;
> > upday:=if(c>Ref(c,-1),V,0);
> > dnday:=if(c<Ref(c,-1,V,0);
> >
> > upvol:=sum(upday,pds);
> > dnvol:=sum(dnday,pds);
> >
> >
> > The above defines an upday as today's close above yesterday's. If
> you
> > define it as today's close above today's open, then change to
> > upday:=if(c>o,V,0); etc.
> >
> > This should do it for you.
> >
> >
> > Tom
> >
> > ----- Original Message -----
> > From: "c_cruizer" <no_reply@xxxxxxxxxxxxxxx>
> > To: <equismetastock@xxxxxxxxxxxxxxx>
> > Sent: Sunday, January 30, 2005 8:19 PM
> > Subject: [EquisMetaStock Group] Re: Sum of Volume
> >
> >
> > >
> > >
> > > Thanks Preston, but that also is not what I'm trying to do. The
> > > challenge is to sum up the values during a period of time for
> those
> > > values that only occur on a closing up tick (or down tick).
> > >
> > > I don't know if this will show correctly, but this is what I'm
> trying
> > > to do.
> > >
> > > day 1 - 7 total
> > > upvol 79 88 41 50 258 up
> > > downvol 94 55 42 191 down
> > > 449
> > >
> > >
> > > day 2 - 8
> > >
> > > upvol 88 41 50 179 up
> > > downvol 94 55 42 86 277 down
> > > 456
> > >
> > > upvol plot day 7 = 258
> > > upvol plot day 8 = 179
> > >
> > > I would then either plot the upvol or use it in other formulas.
> > >
> > > In the Perl programming language, it's not too difficult to
write.
> > > But the MetaStock language isn't as flexable. (At least not for
> me.)
> > >
> > > --- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@xxxx>
> wrote:
> > >>
> > >> Would this help?
> > >>
> > >> {RSI Volume}
> > >> pds:=Input("periods",1,500,5);
> > >> RSI(VOLUME,pds)
> > >>
> > >> Preston
------------------------ Yahoo! Groups Sponsor --------------------~-->
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> 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/
|