The indicator “Buff Averages” plots two moving averages based on the candlestick price and volume.
For each bar, the indicator calculates the sum of the volume over a number of bars specified in the ‘fastAVG’ and ‘slowAVG’ parameters, and then it sums the following formula: price multiplied by volume and then divided by the previously calculated sum of volume.
Original idea and code : “BUff Up Your Moving Averages”, Buff Dormeier, S&C Magazine, Traders Tips, 02/2001
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
//PRC_Buff Averages | indicator //23.08.2017 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge // --- settings //fastAVG = 5 //slowAVG = 20 // --- end of settings price = customclose fast = Summation[fastAVG]( Volume * price) / Summation[fastAVG]( Volume ) slow = Summation[slowAVG]( Volume * price) / Summation[slowAVG]( Volume ) RETURN fast coloured(30,144,255) style(line,2) as "fast Buff Average", slow coloured(220,20,60) style(line,2) as "slow Buff Averages" |
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 :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Is there any way to build something similar for FX? I wonder what would be the replacement for volume…