Re: [amibroker] Re: Detecting last symbol of scan

 



On Fri, May 6, 2016 at 6:18 AM, psytek@bell.net [amibroker] <amibroker@yahoogroups.com> wrote:
 

Perhaps not the best but you can use categorygetsymbols() to get a list of your symbols, the use StrCount( List) to find the number of symbols in your list, then compare this to status("StockNum") and you know when you have reached you last symbol.


I would consider that an "easy" way and also the "best" solution (because there is no other way that I know of) if it worked, but it doesn't.  Not all symbols included in the lists returned by CategoryGetSymbols necessarily have any bars, and scans and explorations will skip those symbols.

Perhaps I should explain why I want to detect when a scan or exploration is on the last symbol.  I am running scans that collect data on tens of thousands of symbols and writing the data to files.  I would like to delay writing of the data to disk until the last symbol of each scan so as to go easier on my hard drive.  By having to open and close a file (whether the same one or different) for every symbol, AmiBroker essentially only allows unbuffered writing.

The only way to allow delayed/buffered writing that I've come up with is to have the scan save data to static variables, and when it is done, run another scan that "flushes" these buffers and writes the data to a file.  However, this is not a pretty solution to a problem that could be solved by simply allowing scans/explorations to "trap" the last symbol, allowing one to write to a file just before the scan/exploration completes.

--
Robbie Geary

__._,_.___

Posted by: Robbie Geary <rgearyiii@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___

Related Posts


EmoticonEmoticon

:)
:(
=(
^_^
:D
=D
=)D
|o|
@@,
;)
:-bd
:-d
:p
:ng
:lv