Trend Continuation Factor

Category: Indicators By: Nicolas Created: February 12, 2016, 11:34 AM
February 12, 2016, 11:34 AM
Indicators
1 Comment

The Trend Continuation Factor is an indicator built to draw trend state. It is a typical momentum indicator calculated with the rate over change price movement, compound over a summation period.

The oscillator is made of 2 lines, the green one for summation of the ROC positive variation over the “sumperiod” and the red one for the negative price movement.

Trade would be initiated when the 2 lines cross, but it is also an effective oscillator to keep an eye on the recent trend momentum continuation.

 

//parameters 
// SUMperiod = 35

r = ROC[1](close)

if r>0 then
  pc = r
else
  pc = 0
endif

if r<0 then
  nc = -r
else
  nc = 0
endif

if nc=0 then
  ncf = 0
else
  ncf = ncf[1]+nc
endif

if pc=0 then
  pcf = 0
else
  pcf = pcf[1]+pc
endif

TCFplus = SUMMATION[SUMperiod](pc) - SUMMATION[SUMperiod](ncf)
TCFminus = SUMMATION[SUMperiod](nc) - SUMMATION[SUMperiod](pcf)

RETURN TCFplus coloured(0,255,0) as "TCF +", TCFminus coloured(255,0,0) as "TCF -"

 

Download
Filename: Trend-Continuation-Factor.itf
Downloads: 130
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...