MA Lag reduce factor

Category: Indicators By: Nicolas Created: August 26, 2018, 9:54 AM
August 26, 2018, 9:54 AM
Indicators
0 Comments

The “Lag Reduce Factor” is a simple method to the reduce the delay to a data series. In this case it is applied to a simple moving average. It could be changed with other input (change MA value with any of data serie of your choice). The factor to add more or less weight to the delay elimination is the “RLfactor” setting (default = 1.3).

While it is different to a ‘zero lag’ calculation method, it could be classified in the same category.

//PRC_MA Lag reduce factor | indicator
//26.08.2018
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//original idea from scriptor (MT5 indi)

// --- settings 
period = 20
RLfactor = 1.3
// --- end of settings 

MA = average[period](customclose)

MLR = exp(RLFactor*log(MA / MA[1]))*MA

RETURN MLR coloured(148,02,11) style(dottedline,3)

 

Download
Filename: PRC_MA-Lag-reduce-factor.itf
Downloads: 78
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...