Re: [amibroker] Detecting last symbol of scan

 

Hello,

Detecing "last" symbol is BAD idea.

There is NO SINGLE LAST symbol in multiple threading environment !

In multiple threading execution multiple threads will execute in parallel and
multiple symbols will be "LAST" (execute as last in parallel threads).

Detecting FIRST is safe because AmiBroker when it sees status("stocknum")==0 anywhere in the code
it runs VERY FIRST SYMBOL with ONE and ONLY ONE thread.
No other threads are started until this very first finishes.

If you think that you will use "last symbol" and do some "end processing" then this idea is BAD.

The "last symbol" in the list is not necessarily the last one that would be executed as multiple threads
run parallel and their runtime is not equal. The "last symbol" may actually finish sooner than the rest.

Best regards,
Tomasz Janeczko
amibroker.com

On 2016-05-04 18:53, rgearyiii@yahoo.com [amibroker] wrote:
The condition (status("stocknum") == 0) can be used to detect when a scan or exploration is processing the first symbol.  Is there any easy way to detect when a scan is processing the last symbol of the scan?

Thanks


__._,_.___

Posted by: Tomasz Janeczko <groups@amibroker.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (29)

Check out the automatic photo album with 1 photo(s) from this topic.
mannbhlgdepdakhp.png

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