I haven't tried. But the default CCIAvg indicator in TS8.1 is similar to your second version. If I open the code for CCIAvg indicator the following is the code.
inputs:
CCILength( 14 ),
CCIAvgLength( 9 ),
OverSold( -100 ),
OverBought( 100 ) ;
variables:
CCIValue( 0 ),
CCIAvg( 0 ) ;
CCIValue = CCI( CCILength ) ;
CCIAvg = Average( CCIValue, CCIAvgLength ) ;
Plot1( CCIValue, "CCI" ) ;
Plot2( CCIAvg, "CCIAvg" ) ;
Plot3( OverBought, "OverBot" ) ;
Plot4( OverSold, "OverSld" ) ;
{ Alert criteria }
if CCIAvg crosses over OverSold then
Alert( "Indicator exiting oversold zone" )
else if CCIAvg crosses under OverBought then
Alert( "Indicator exiting overbought zone" ) ;
Quote from jerryz:
ww_nyc, when you use the two versions of my code in TS 8.1, do you get matching indicators?