CCI PREDICT

CCI PREDICT

Type : Function, Name : CCIPrePlus

inputs:
Length( numericsimple ) ; { will get divide-by-zero error if Length = 0 }

variables:
Mean( 0 ),
AvgDev( 0 ),
Counter( 0 ),CCIraw(0),Counter1(0),X(0) ;

Mean = Average( H + L + C, Length ) ; { don’t have to divide H+L+C by 3, cancels out }
AvgDev = 0 ;
for Counter = 0 to Length — 1
begin
AvgDev = AvgDev + AbsValue( ( H + L + C )[Counter] — Mean ) ;
end ;
AvgDev = AvgDev / Length ;

For Counter1=-15 to 15
begin
X=C+Counter1/pointvalue;
if AvgDev = 0 then
CCIraw = 0
else
CCIraw = ( H + L + X — Mean ) / ( .015 * AvgDev ) ;
if (CCIraw <100 and CCIraw > 95) then
CCIprePlus = X;
end;

 

Type : Function, Name : CCIPreMinus

inputs:
Length( numericsimple ) ; { will get divide-by-zero error if Length = 0 }

variables:
Mean( 0 ),
AvgDev( 0 ),
Counter( 0 ),CCIraw(0),Counter1(0),X(0) ;

Mean = Average( H + L + C, Length ) ; { don’t have to divide H+L+C by 3, cancels out }
AvgDev = 0 ;
for Counter = 0 to Length — 1
begin
AvgDev = AvgDev + AbsValue( ( H + L + C )[Counter] — Mean ) ;
end ;
AvgDev = AvgDev / Length ;

For Counter1=-15 to 15
begin
X=C+Counter1/pointvalue;
if AvgDev = 0 then
CCIraw = 0
else
CCIraw = ( H + L + X — Mean ) / ( .015 * AvgDev ) ;
if (CCIraw < -95 and CCIraw > -100) then
CCIpreMinus = X;
end;

 

Type : Indicator, Name : CCI Predict

inputs: Length( 14 );
Plot1(CCIPrePlus(Length),»CCIPrePlus»);
Plot2(CCIPreMinus(Length),»CCIPreMinus»);

Подписаться
Уведомить о
0 комментариев
Межтекстовые Отзывы
Посмотреть все комментарии