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

RE: [EquisMetaStock Group] Re: Finding and Using the Maximum Value of a Variable



PureBytes Links

Trading Reference Links









Ron,

Many thanks for this idea. <span
> Brute force it may be, but it worked for
me!  

 

<span
 >Preston<font
size=2 color=navy face=Arial> and <font size=2 color=navy
  face=Arial>Roy<font
size=2 color=navy face=Arial>,

Thanks for your ideas,
I only wish I was sufficiently familiar with the MetaStock programming language
to be able to apply them.

 

Cheers,

Barry

 

<font size=2
face="Courier New">Barry,<font
size=2 face="Courier New">

I think you can do it by brute force something
like:

C1:=max((max(mov(c,10,s),mov(c,11,s)),(max(mov(c,12,s),mov(c,13,s));
C2:=max((max(mov(c,14,s),mov(c,15,s)),(max(mov(c,16,s),mov(c,17,s));
C3:=max((max(mov(c,18,s),mov(c,19,s)),(max(mov(c,20,s),mov(c,21,s));
C4:=max((max(mov(c,22,s),mov(c,23,s)),(max(mov(c,24,s),mov(c,25,s));
C5:=max((max(mov(c,26,s),mov(c,27,s)),(max(mov(c,28,s),mov(c,29,s));
C6:=max(c1,c2);
C7:=max(C3,c4);
C8:=max(C5,mov(c,30,s));
c9:=max(c6,c7);
c10:=max(c8,c9);
cmax<font
face="Courier New">:=max(c9,c10);

I didn't test it, but I think you can get the
idea.

Ron








pumrysh wrote:

> Barry,
>
> Try using the HHV [highest high value]. Since
you are planning on
> using a variable moving average you may
experience some difficulty.
> It can be done though. Post your code and I'm
sure some of the great
> coders on this site will be able to help you.
>
> <font
 size=2 face="Courier New">Preston<font
size=2 face="Courier New">
>
> --- In equismetastock@xxxxxxxxxxxxxxx,
"Barry Seeger"
> <barry.seeger@xxxx> wrote:
> > MetaStock Users,
> > 
> > Can anyone tell me how to go about
finding the maximum value of a
> > variable when one parameter is allowed
to vary, and use the
> resulting
> > value of the variable in an indicator
formula?  Let's say I want to
> > discover today's maximum value of the
simple moving average of
> closing
> > price, where the averaging period can be
anything from the last 10
> to 30
> > periods. That is, I want to find the
maximum value of mov(c,10,s),
> > mov(c,11,s) etc right through to mov(c,30,s).
Then I'll use the
> > resulting highest moving average value
in a formula, and plot the
> > result.
> > 
> > Many thanks for your help,
> > Barry
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
> <<a
href="">http://rd.yahoo.com/M=243066.2784921.4151384.1769302/D=egroupweb/S=1705375617:HM/A=1377500/R=0/*http://www.verisign.com/cgi-bin/go.cgi?a=b31540113206004000>

>
>
>
> 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 
> <<a
href="">http://docs.yahoo.com/info/terms/>.






<font size=2
face="Courier New">To unsubscribe from this
group, send an email to:<span
>
equismetastock-unsubscribe@xxxxxxxxxxxxxxx



Your use of
Yahoo! Groups is subject to the Yahoo!
Terms of Service. 










Yahoo! Groups Sponsor


  ADVERTISEMENT









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.