Indicator :
CCI - Stochastic
{Average(3,(Today's 14-day CCI reading -
Lowest 14-day CCI reading
(over the past 5 periods)/Highest
14-day
CCI reading (over the past 5 periods) - Lowest 14-day
CCI reading
(over the past 5 periods))*100)
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 ;