Fractional-Bar Quick Moving Average - QMA

Category: Indicators By: Nicolas Created: May 9, 2017, 10:27 AM
May 9, 2017, 10:27 AM
Indicators
1 Comment

The QMA is a moving average that can be compared to a Jurik one. I did not find a lot of information on it on the web, but it seems to be at the same time, smooth and fast. But I also found it to have considerable overshoot that could be a problem in some case.

Anyway, this code has been translated from a multicharts version by a request on the french forum, so here it is.

 

//PRC_Fractional-Bar Quick Moving Average | indicator
//08.05.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge

// --- settings
Len = 50 //period
// ---

Series = customclose

Peak  = Len / 3
Num   = 0
Denom = 0

for j = 1 to (Len + 1) do
 if j <= Peak then
  DataArray = j / Peak
 else
  DataArray = (Len + 1 - j) / (Len + 1 - Peak)
  Num = Num + Series[j - 1] * DataArray
  Denom = Denom + DataArray
 endif
next

if Denom <> 0 then
 QMA = Num / Denom
else
 QMA = Series
endif

return qma

 

Download
Filename: PRC_Fractional-Bar-QMA.itf
Downloads: 147
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...