yes thanks ,
```` natasha !!!
On 1/23/07, Terry <[EMAIL PROTECTED]> wrote:
Natasha,
The problem is you need to get a single (numeric) value of TstCy. You can
do this with SelectedBar(TstCy) or LastValue(TstCy). Then your loop would
be:
for ( i = 0 ; i < TstCy ; i ++ )
{
xyz[i] = *C*[i]; //or whatever you need
}
However, it does not seem that the array you want to access is actually
TstCy as this seems to be just the count. Access whatever array is needed
such as the Close (as shown). Also you probably don't want to start at bar i
= 0; but some other bar. Maybe that is barCount - TstCy or:
for ( i = barCount - TstCy ; i < barCount; i ++ )
This does get a little confusing when trying to do a series of peaks and
troughs…and I'm sure I don't need to remind you that both Peak and Trough
use ZigZag which looks into the future.
--
Terry
-----Original Message-----
*From:* [email protected] [mailto:[EMAIL PROTECTED] *On
Behalf Of *Natasha ~~!!!
*Sent:* Monday, January 22, 2007 09:36
*To:* [email protected]
*Subject:* [amibroker] Array in a loop
hello,
* PkCy =PeakBars( probability ,a, 1);*
TrCy =TroughBars(probability,a,1 );
TstCy= IIf(PkCy > TrCy,TrCy,PkCy) ;
*for*
*( i =0 ; i < TstCy ; i ++ )*
I have a problem with the array TstCy , i would like to
use the array in a loop .
* * Thanks .
Warm Regards;
`````` Natasha !!!
--
Warm Regards;
`````` Natasha !!!