Zero lag ROC

mastermind007

Well-Known Member
#4
Dear seniors ,
ROC ZERO LAG not possible ??? some body help me
First define meaning of the following terms.

ROC

ZERO and

LAG!
 

XRAY27

Well-Known Member
#5
First define meaning of the following terms.

ROC

ZERO and

LAG!
ROC: Rate of change
Zero lag: with each candle movement previous values should not be repainted...:thanx:
 

mastermind007

Well-Known Member
#6
ROC: Rate of change
Zero lag: with each candle movement previous values should not be repainted...:thanx:
Do You mean recalculated?

ROC is calculated over current and previous candle. As long as current shifts, ROC will. Past values of ROCs will not change, but it will be continously recalculatd
 
Last edited:

mastermind007

Well-Known Member
#7
Do You mean recalculated?

ROC is calculated over current and previous candle. As long as current shifts, ROC will. Past values of ROCs will not change, but it will be continously recalculatd
Found function that does zero lag thing

Code:
function ZeroLagMA( data, periods )
{
	MA1 = MA( data, periods );
	MA2 = MA( MA1, periods );
	Diff = MA1 - MA2;
	return MA1 + Diff;
}
you can use it like this.

Code:
z1 = ZeroLagMA( C, 10 );
zR = ZeroLagMA( ROC(C, 10), 10 );
 

Similar threads