MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 A B C D E F G H I J K L M N O P R S T U V W Y Z #

Volume Histogram by Jose Silva

To: equismetastock[at]yahoogroups.com <equismetastock[at]yahoogroups.com>
Date: Sunday, December 3, 2006, 7:24:09 PM
Subject: [EquisMetaStock Group] Volume Histogram

Is there anyone in our group who is able to translate the following AFL code to Metastock?

Its supposed to show a histogram of the difference between the EMA of UpVolume and the EMA of DownVolume.

UpVol = Valuewhen(C > O, V);
DownVol = Valuewhen(C < O, V);
Period = Param("Period",3,2,10,1);
UpVolAvg = EMA( UpVol, Period ) ;
DownVolAvg = EMA( DownVol, Period ) ;
Plot(UpVolAvg,"UpVolume", colorGreen);
Plot(DownVolAvg, "DownVolume", colorRed);

Any assistance would be appreciated.

Thanks.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From: Jose Silva <josesilva22[at]yahoo.com>
To: equismetastock[at]yahoogroups.com <equismetastock[at]yahoogroups.com>
Date: Monday, December 4, 2006, 4:58:04 PM
Subject: [EquisMetaStock Group] Re: Volume Histogram

Volume Histogram

{ http://www.metastocktools.com }

{ Indicator user inputs }
Period:=Input("EMA averaging periods",1,252,3);
invert:=Input("Invert DownVolAvg plot? [1]Yes, [0]No",0,1,0);

{ Up/Down volume avg }
UpVol:=ValueWhen(1,C>O,V);
DownVol:=ValueWhen(1,C<O,V);
UpVolAvg:=Mov(UpVol,Period,E);
DownVolAvg:=Mov(DownVol,Period,E);
DownVolAvg:=If(invert,-DownVolAvg,DownVolAvg);

{ Plot in own window }
UpVolAvg; {Green}
DownVolAvg {Red}

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

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
To: equismetastock[at]yahoogroups.com <equismetastock[at]yahoogroups.com>
Date: Thursday, December 7, 2006, 1:04:29 PM
Subject: [EquisMetaStock Group] Re: Volume Histogram

Dear Jose,

Thank you once again.

Mark

Source / From: TOP
Metastockusers[at]yahoogroups[dot]com

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.