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

Re: [amibroker] Re: Looping or optimizing a set of non sequential numbers?



PureBytes Links

Trading Reference Links

Title: Re: [amibroker] Re: Looping or optimizing a set of non sequential numbers?

It looks like you are storing the values in a subscripted array. Such arrays can only have as many elements as there are bars in the current ticker.


You can use dynamically named variables.


Staticvarset("Good"+Count, ...
Varset("Good"+count, ...


etc.

herman



Tuesday, November 25, 2008, 12:32:13 PM, you wrote:


>

Thanks Herman but the problem persists. 


Here is a simplified version without the  optimize. Only 2348 values are being read and printed to screen, out of a file of 5000 values. 



count = 0;

fh = fopen("c:\\TestExtractFile03.txt""r"); 


if (fh) 

{

 while(!feof(fh)) 

 {

 good[count] = StrToNum(fgets(fh)); 

 Count++;

 }

 fclose( fh );


else 

{

 printf("ERROR: file can not be found (does not exist)");

}


for(b = 0; b < Count; b++)

{

a = good[b];

printf("Number: %g\n", a );

}


 

__._,_.___

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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

*********************************




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___