PureBytes Links
Trading Reference Links
|
Tomasz,
Excuse me, I didn't see your previous message... Thank You!
Jerome
--- In amibroker@xxxxxxxxxxxxxxx, "jerome_maeder"
<jerome_maeder@xxxx> wrote:
> Hi Tomasz and Ara,
> Yes exactly, X is in a loop, I did a copy of my code:
>
> Iter = 5;
> ZigZag = 0.5;
> LengthZig = 0;
>
> for(i = 0; i < Iter; i++)
> {
> LengthZig = LengthZig + (abs(PeakBars(Close, ZigZag, i)-
> TroughBars(Close, ZigZag, i)));
> }
>
>
> Length = round(LengthZig/Iter);
>
> NewCCI = CCI(Length);
>
> Plot(NewCCI, "NewCCI", colorRed, 1);
>
> In this case, I obtain the error #5, I think it's because Length
is
> an array and are not compatible with CCI. I tried a lot of things
to
> solve my problem, but now I relly don't know what I have to do.
>
> Thank you for your help!
>
> Jerome
>
>
>
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko"
<amibroker@xxxx>
> wrote:
> > Hello,
> >
> > I think you misunderstood the question.
> > x was supposed to change every bar.
> > x=x+1 is certainly possible, either by looping
> >
> > x = 0;
> > for( i = 0; i < BarCount; i++ )
> > {
> > x = x + 1;
> > // use new x here
> > }
> >
> > or... (easier) using Cum function
> >
> > x = Cum( 1 );
> >
> > http://www.amibroker.com/f?cum
> >
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message -----
> > From: "Ara Kaloustian" <ara1@xxxx>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Tuesday, August 09, 2005 4:45 PM
> > Subject: Re: [amibroker] adaptative indicator
> >
> >
> > > The problem is that you can not have a structure of x=x+1.
It's
> not a matter
> > > of using arrays.
> > >
> > > try using static variables
> > >
> > > //initialize variable
> > > If (isNull,StaticVarGet(isInitialized"))
> > > {
> > > StaticVarSet("Length",0);
> > > }
> > >
> > > StaticVarSet("Length",StaticVarGet("Length"));
> > >
> > >
> > > ----- Original Message -----
> > > From: "jerome_maeder" <jerome_maeder@xxxx>
> > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > Sent: Tuesday, August 09, 2005 6:37 AM
> > > 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 other support material please check also:
> > > http://www.amibroker.com/support.html
> > >
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> > >
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h2pe8ob/M=362131.6882500.7825259.1493532/D=groups/S=1705632198:TM/Y=YAHOO/EXP=1123619793/A=2889190/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Put more honey in your pocket. (money matters made easy) Welcome to the Sweet Life - brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
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/
|