Zero lag ROC

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

Trade in Rs 20, No more % brokerage

Name:Phone:
Email:City:
State:
Are you a day trader?