Here is the classical MACD indicator weighted by the Volume. Much more accurated for stock trading.
1 2 3 4 5 6 7 8 9 10 |
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" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Is there any way the MACD/signal line histogram can be included in the package?
Just replace the last line with this :
RETURN dm as \"Volume Weighted MACD\", masignal as \"Signal Line\"
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
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.