PureBytes Links
Trading Reference Links
|
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@xxxxxxxxxx>
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@xxxxxxxx>
> 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=12h84mjtv/M=362343.6886682.7839641.1493532/D=groups/S=1705632198:TM/Y=YAHOO/EXP=1123612313/A=2894352/R=0/SIG=11fdoufgv/*http://www.globalgiving.com/cb/cidi/tsun.html">Help tsunami villages rebuild at GlobalGiving. The real work starts now</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/
|