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

Re: [amibroker] Volume-Weighted MACD Histogram? Help please!



PureBytes Links

Trading Reference Links

At 05:19 PM 11/30/01 +0000, you wrote:
>Hi friends,
>
>I'm fairly new to AmiBroker and struggling with the syntax to 
>accomplish a MACD Histogram with a volume enhancement:
>
>I first want a standard MACD calc, but with a volume-weighted MA like

>so:
>
>Volume-weighted 26-period EMA
>Volume-weighted 12-period EMA
>A 9-bar EMA of the Long minus Short EMA
>
>Then subtract the Signal from the MACD to get the Histogram
data.  
>Result is a volume-weighted MACD Histogram.
>
>How do I do that?  It should be easy for an experienced user,
which 
>I'm not!
>Help, thanks!
>ghoup 

Try this:
You will find that high volume periods will cause spikes, but it is
useable.
Frank
/*  Volume
Weighted MACD */
sshort =
12;
Llong =
26;
smooth =
9;

VLong =
Sum(V,Llong);
VShort =
Sum(V,Sshort);
PVLong =
V*Sum(C,Llong);
PVShort =
V*Sum(C,sshort);

base = (PVShort/VShort) - (PVLong/VLong);
baseMA =
EMA(base,smooth);
final = base - baseMA;

MaxGraph =
1;Graph0Style
=
2+4;
Graph0 =
final;Graph0Color =
6;

Frank
>
>
>------------------------ Yahoo! Groups Sponsor
---------------------~-->
>Need new boots for winter? Looking for a perfect gift for your shoe
loving friends?
>Zappos.com is the perfect fit for all your shoe needs!
>http://us.click.yahoo.com/iWGL5B/QrSDAA/ySSFAA/dkFolB/TM
>---------------------------------------------------------------------~->
>
> 
>
>Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/

>