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

Re: [amibroker] How to loop all tickers?



PureBytes Links

Trading Reference Links

Hello,
 
This KB article contains the iteration code using OLE:
 
 
Comma separated list is easy to made by concatenating tickers:
 
AB CreateObject("Broker.Application");
sts AB.Stocks;
Qty sts.Count;
List = "";
for( 
= 0< Qtyi++ )
{
  st sts.Item);
  Ticker st.Ticker;  
     List = List + "," + Ticker;
}

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Herman
To: dingo
Sent: Wednesday, January 09, 2008 9:34 PM
Subject: Re: [amibroker] How to loop all tickers?

Thanks D!


herman


For tips on developing Real-Time Auto-Trading systems visit:

http://www.amibroker.org/userkb/


Wednesday, January 9, 2008, 3:31:30 PM, you wrote:


>

I'll give TJ a few mins to respond so I don't dupe his effort. It he doesn't I'll send an example.

 

d




From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Herman

Sent: Wednesday, January 09, 2008 2:52 PM

To: Tomasz Janeczko

Cc: amibroker@xxxxxxxxxxxxxxx

Subject: Re: [amibroker] How to loop all tickers?


Thanks, but... all my code is developed for use in Indicators. Loops are executed under user control when needed, it is far more effective to see what an equity looks like on a chart than in tabular form. Also i prefer not to have to double up all my params...it would become a mess and hard to maintain. I am not worried about unresponsive UIs. Its easy enough to break on a mouse-click.


Using OLE, how would I retrieve a csv list of symbols?


many thanks if you can help!

herman


For tips on developing Real-Time Auto-Trading systems visit:

http://www.amibroker.org/userkb/


Wednesday, January 9, 2008, 2:38:50 PM, you wrote:


>

It is available if you use OLE interface (iterate through stocks collection).

There is good reason for not having "direct" function - you should not loop through tickers at all, because it may mean

executing longer than a second or two and this leads to unresponsive UI.

Instead use Automatic Analysis: Apply to : All symbols and skip the loop. This gives you ability to see

PROGRESS bar and ability to abort going through tickers and UI/chart refreshes BETWEEN tickers being processed.


Best regards,

Tomasz Janeczko

amibroker.com

----- Original Message ----- 

From: Herman 

To: dingo 

Cc: amibroker@xxxxxxxxxxxxxxx 

Sent: Wednesday, January 09, 2008 8:25 PM

Subject: Re: [amibroker] How to loop all tickers?


sorry typo, I meant I DON'T see a category "All" but that is what I seem to need. Seems odd this would not be possible... am i missing something obvious?


herman


For tips on developing Real-Time Auto-Trading systems visit:

http://www.amibroker.org/userkb/


Wednesday, January 9, 2008, 2:19:46 PM, you wrote:


>

I don't see category "All"..

 

d




From: Herman [mailto:psytek@xxxxxxxx] 

Sent: Wednesday, January 09, 2008 2:09 PM

To: dingo

Cc: amibroker@xxxxxxxxxxxxxxx

Subject: Re: [amibroker] How to loop all tickers?


is it not possible to retrieve all tickers with a command like CategoryGetSymbols( category, index ) ?


I simply want to loop all tickers in afl...there appears to be category "All"...


Many thanks,

herman


For tips on developing Real-Time Auto-Trading systems visit:

http://www.amibroker.org/userkb/


Wednesday, January 9, 2008, 2:00:27 PM, you wrote:


>

By using fopen to open the file and then:

 

if the file is one line per ticker then a for loop that would use fgets to get a line process that ticker, etc.

 

if the file is one very long line with tickers separated by "," then use fgets to read that line and then a for loop using strExtract on that line to get to the tickers.

 

Need more info about the csv file.

 

d




From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Herman

Sent: Wednesday, January 09, 2008 1:53 PM

To: AmiBroker Users Group

Subject: [amibroker] How to loop all tickers?


How would one retrieve a csv list of all tickers in the database from AFL?


Many thanks,

herman

 

 

 

 

__._,_.___

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 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

__,_._,___