Buff Averages

Category: Indicators By: Nicolas Created: August 28, 2017, 8:41 AM
August 28, 2017, 8:41 AM
Indicators
1 Comment

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

//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"

 

Download
Filename: PRC_Buff-Averages.itf
Downloads: 164
Nicolas Master
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

Logo Logo
Loading...