Type : Indicator, Name : CCI — Stochastic
inputs:
CCILength( 14 ),
HighLowPeriod( 5 ),
Smooth( 3 ) ;
variables:
TodayCCI( 0 ),
TodayLowCCI( 0 ),
TodayHighCCI( 0 ),
CCISto( 0 ) ;
TodayCCI = CCI( CCILength ) ;
TodayLowCCI = Lowest( TodayCCI, HighLowPeriod ) ;
TodayHighCCI = Highest( TodayCCI, HighLowPeriod ) ;
if CurrentBar > Smooth + HighLowPeriod then
begin
CCISto = Average((TodayCCI — TodayLowCCI)/(TodayHighCCI — TodayLowCCI), Smooth );
Plot1( CCISto, «CCISto»);
end ;