[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: CCI Equis formular in AB format



PureBytes Links

Trading Reference Links





function MeanDev( array, mean, range )
{
  result = 0;

   for( i = range ; i < BarCount; i++ )
   {
      result[ i ] = 0;
      // the mean is not 'moving' over the range (outside the loop)
      tm = mean[ i ]; 
      for( j = 0; j < range; j++ )
      {
        result[ i ] = result[ i ] + abs( array[ i - j ] - tm );
      }
    
    result[ i ] = result[ i ]/range; 
  }
  
  return result;
}

n = 20;

SMATP = MA(Avg,n);//1,2

MD = MeanDev( Avg, SMATP, n );

CCIx = (Avg - SMATP) / (0.015 * MD);//5,6,7

Plot(CCIx,"CCIx",colorGreen,styleLine);

Plot(CCI(n),"CCI",colorRed,styleLine);

> Anyone would like to share the formular for CCIE of
> metastock in AB or MS format ?
> 
> many thanks
> 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Make Yahoo! your home page 
> http://www.yahoo.com/r/hs





------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/