The “Trinity Impulse” indicator tells you when to enter the market and “flat” (ranging) periods.
When the indicator is zero, it indicates a neutral trend.
The “V” shaped pulses indicate when to enter the market in the opposite direction. Finally, the “U” shaped pulses indicate an entry in the same direction.
Converted from an MT4 indicator by a request in the Italian forum.
//PRC_Trinity Impulse | indicator
//10.12.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//Converted from MT4 indicator
// --- settings
//nPeriod = 5
//nLevel = 34
// --- end of settings
wprice=(high + low + close + close)/4
c = cci[nPeriod](wprice)
f = weightedaverage[nPeriod](forceindex(wprice))
//----
if(c * f >= nLevel) then
if(c > 0 and f > 0) then
iCF = 1
endif
if(c < 0 and f < 0) then
iCF = -1
endif
else
iCF = 0
endif
return iCF as "Trinity Impulse"