CoeffofLine indicator shows the most likely future price direction (2-3 bars).
The indicator depends on symbol, timeframe and period. If the indicator is turned up, it’s a signal to open long position. A signal to close long position is: turn down of the indicator and a confirmation from lower timerframe (negative values). The similar rules for short position: turn down on the current timeframe, for closing of short position it needs a confirmation from lower timeframe (positive values).
description found on the web. Indicator converted from MT4 by a request in the indicators forum section.
//PRC_CoeffOfLine | indicator
//26.07.2019
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
ndot=5
TYVar=0
ZYVar=0
N=0
M=0
TIndicatorVar=0
ZIndicatorVar=0
for cnt=ndot downto 1 do
ZYVar=ZYVar+(High[cnt-1]+Low[cnt-1])/2*(6-cnt)
TYVar=TYVar+(High[cnt-1]+Low[cnt-1])/2
N=N+cnt*cnt
M=M+cnt
wa=wilderaverage[5](medianprice)[3]
ZIndicatorVar=ZIndicatorVar+wa[cnt-1]*(6-cnt)
TIndicatorVar=TIndicatorVar+wa[cnt-1]
next
AY=(TYVar+(N-2*ZYVar)*ndot/M)/M
AIndicator=(TIndicatorVar+(N-2*ZIndicatorVar)*ndot/M)/M
cfl=(-1000)*Log(AY/AIndicator)
if cfl>cfl[1] then
if cfl>0 then
r=0
g=255
b=0
endif
if cfl<0 then
r=255
g=0
b=255
endif
else
if cfl>0 then
r=0
g=0
b=255
endif
if cfl<0 then
r=255
g=0
b=0
endif
endif
return cfl coloured(r,g,b) style(histogram)