Nicolas

Volume weighted MACD

Category: Indicators By: Nicolas Created: October 11, 2015, 7:26 PM
October 11, 2015, 7:26 PM
Indicators
4 Comments
Volume weighted MACD

Here is the classical MACD indicator weighted by the Volume. Much more accurated for stock trading.

 

fast=12
slow=26
signal=9
mafast = exponentialaverage[fast](volume*close) / exponentialaverage[fast](volume)
maslow = exponentialaverage[slow](volume*close) / exponentialaverage[slow](volume)
d = mafast - maslow
masignal = exponentialaverage[signal](d)
dm = d-masignal

RETURN dm as "Volume Weighted MACD"

 

Download
Filename: Volume-Weighted-MACD.itf
Downloads: 262
Nicolas
Nicolas Legend
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

thomas2004ch
8 years ago
#

I happen to read this article. I would say the formel 'd = maslow - mafast' could be inversed. It should be 'd = mafast - maslow'? See definition here: https://de.wikipedia.org/wiki/MACD

Nicolas
8 years ago
#

You are right! but still the picture is looking good. The formula is inverted! dunno why :) I will fix it. Thanks for reported this error.

Saud
10 years ago
#

Is there any way the MACD/signal line histogram can be included in the package?

Nicolas
10 years ago
#

Just replace the last line with this :

RETURN dm as "Volume Weighted MACD", masignal as "Signal Line" 

ProRealCode ProRealCode
Loading...