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

[amibroker] Re: adaptative indicator



PureBytes Links

Trading Reference Links

Hi Thomaz,
Is the below formula based on the Ehler method about dynamic period?
is this the adaptive CCI?

Do you have the same adaptive for Stochastic indicator?

Thank you in advance for your respond.

Best regards,
Ismed


--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxx> wrote:
>
> Jerome,
> 
> Built-in CCI does not work with variable period.
> You would need to re-implement it using loops or using other
functions that
> are variable-period enabled to have variable-period version.
> 
> function MeanDev( array, mean, range ) 
> { 
>   result = 0; 
> 
>    for( i = LastValue( 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[ i ] AND ( i - j ) >= 0 AND ( i - j ) <
BarCount; j++ ) 
>       { 
>         result[ i ] = result[ i ] + abs( array[ i - j ] - tm ); 
>       } 
>      
>     result[ i ] = result[ i ]/range[ i ]; 
>   } 
>    
>   return result; 
> } 
> 
> function VarCCI( array, period ) 
> { 
> 
>  SMATP = MA(array,period );//1,2 
> 
>  MD = MeanDev( array, SMATP, period  ); 
> 
>  CCIx = (Avg - SMATP) / (0.015 * MD); 
> 
>  return CCIx; 
> 
> } 
> 
> n = 20 + 4 * sin( Cum(1) ); // variable period 
> 
> Plot(VarCCI(Avg, n),"CCIx",colorGreen,styleLine); 
> 
> //Plot(CCI(n),"CCI",colorRed,styleLine); 
> 
> 
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: "jerome_maeder" <jerome_maeder@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Tuesday, August 09, 2005 3:37 PM
> Subject: [amibroker] adaptative indicator
> 
> 
> > Hi!
> > 
> > I would like to change the parameter of my indicator ( CCI for 
> > exemple ) after each bar. For example:
> > 
> > Length = 0;
> > Length = Length + 1;
> > 
> > NewCCI = CCI(Length);
> > 
> > Buy = CCI(Length) > 150;
> > 
> > It's just a simple example, do you understand what is my problem?
> > Length is an array and it's not possible to use it as a parameter!
> > 
> > Thanks in advance!
> > 
> > Jerome
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 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
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
>



------------------------------------

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/