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

[EquisMetaStock Group] Re: Highest Moving Average



PureBytes Links

Trading Reference Links

Try this code:

---8<-----------------
{ SMAs }
ma1:=Mov(C,4,S);
ma2:=Mov(C,5,S);
ma3:=Mov(C,6,S);
ma4:=Mov(C,7,S);
ma5:=Mov(C,8,S);
ma6:=Mov(C,9,S);
ma7:=Mov(C,10,S);

{ Highest SMA on last bar }
HiMa:=LastValue(Max(ma1,Max(ma2,Max(ma3,Max(ma4,Max(ma5,Max(ma6,ma7))
)))));
HiMa:=
 If(HiMa=LastValue(ma1),ma1,
 If(HiMa=LastValue(ma2),ma2,
 If(HiMa=LastValue(ma3),ma3,
 If(HiMa=LastValue(ma4),ma4,
 If(HiMa=LastValue(ma5),ma5,
 If(HiMa=LastValue(ma6),ma6,
 ma7))))));

{ Lowest SMA on last bar }
LoMa:=LastValue(Min(ma1,Min(ma2,Min(ma3,Min(ma4,Min(ma5,Min(ma6,ma7))
)))));
LoMa:=
 If(LoMa=LastValue(ma1),ma1,
 If(LoMa=LastValue(ma2),ma2,
 If(LoMa=LastValue(ma3),ma3,
 If(LoMa=LastValue(ma4),ma4,
 If(LoMa=LastValue(ma5),ma5,
 If(LoMa=LastValue(ma6),ma6,
 ma7))))));

{ Plot on price chart }
HiMa;LoMa
---8<-----------------


jose '-)
http://www.metastocktools.com



--- In equismetastock@xxxxxxxxxxxxxxx, "bullicastelo" <bullicastelo@x
...> wrote:
> Hi All,
> 
> I need help to wirte this formula:
> 
> I have 7 moving averages that are up and down on a chart
> (from mov(c,4,s) till mov(c,10,s)
> 
> how I can find the highest and lowest moving average in the last day 
> only?
> 
> Thanks,




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/