Paul - Thanks. I should have written out that the result of the SCAN are accumulated or built up in a series of static variables that are not complete until the last ticker is categorized, and I wanted to write out to file the list of static variables. So the result of the SCAN is not in the AA window, but in composites and ticker lists for each sector.
Since StaticVar persist between jScript job steps I could do it that way also, build the variables in step 1 and then run a job step that writes them out to files. Best regards JOE ----- Original Message ----- From: Paul Ho To: [email protected] Sent: Monday, March 05, 2007 6:23 AM Subject: RE: [amibroker] End of Scan Why not do it outside AFL and use Analysis.Export(file) to export the result of your scan to a file ------------------------------------------------------------------------------ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Joe Landry Sent: Monday, 5 March 2007 10:59 PM To: [email protected] Subject: [amibroker] End of Scan I'd appreciate some help please. I use this logic to control the initial work in a SCAN if ( Status( "action" ) == 3 AND Status( "stocknum" ) == 0 ) // 3 is SCAN, 4 is an Explore running a scan and it's the 1st stock { .....work, clear watchlists or static variables etc. } What logic can I use to trigger writing out the results of the SCAN to disk.. The approach that comes to me is to pull the watch list and count the tickers to find the number (ordinal); or retrieve the symbol of the last ticker in the string. Is there a better way? Like "END OF WATCHLIST". if ( Status( "action" ) == 3 AND Status( "stocknum" ) == ordinal of the last stock ) // { write files } Thanks Joe L.
