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

[amibroker] Re: Is there a way to view arrays?



PureBytes Links

Trading Reference Links

hi!
To display the content of an array i use the following code:

//************************************************/
function PrintArray (array,arrName)
//************************************************/
{
fh = fopen( "c:\\program files\\amibroker\\afl\\Arrays\\"+name()
+"___"+arrname+".xls", "w"); 
   for( i = 0; i < BarCount; i++ ) 
   	{ 
		ds = StrFormat("%g.-%g.\n", i, array[ i ]);
      	fputs( ds, fh ); 
	} 
	fclose( fh ); 
}
//************************************************/

// per example to list "buy" array call the function:

printarray(Buy,"buy");

Use Excel to display the contents.

best regards
enzo

--- In amibroker@xxxxxxxxxxxxxxx, "sslack88" <jzzpiano88@xxxx> wrote:
>
> Does anyone know if there is a way to view the contents of an 
array?
> 
> For example, I want to understand the barindex() function better, 
so I 
> want to look at each value in the array.  Is there a way to do 
this?
> 
> Also, does anyone know how the barindex() function works?  Does it 
go 
> from left to right?  Does it start at zero?
> 
> Is this how it works:
> 
> Bar 1 - Bar 2 - Bar 3 - Etc. (left to right)
> 
> 0 - 1 - 2 - Etc. (barindex)
> 
> Thanks!
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/