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

[amibroker] How to run multiple parallel AA functions using VBscript?



PureBytes Links

Trading Reference Links



Recently I've been automating some of my optimizations and backtests using external _vbscript_.

When I run Amibroker manually, I can usually run up to 6 separate instances under a single User, which allows me to run optimizations on 6 different AFLs simultaneously. But when I try to run 6 different _vbscript_s, each calling a unique AFL, they collide which each other, and cause errors.

Without logging out, and logging back into windows as a separate User, how can I automate multiple optimizations using scripting?

Below is a typical snippet of code. How do I instruct _vbscript_ to call a unique Broker.Application, so that all scripts do not try to call the exact same instance of Amibroker? Is this even possible? Thanks for any input.


dim AB
set AB = CreateObject("Broker.Application")

dim AA
set AA = AB.Analysis

AB.LoadDatabase( Database )
AA.LoadSettings( Settings )
AB.ActiveDocument.Name = "EURUSD"        ' Set EURUSD as active document

 
AA.LoadFormula( Formula1 )                        ' load formula from external file
AA.ApplyTo                = 1                                    ' use current symbol
AA.RangeMode          = 3                                   ' use 'From' and 'To' dates
AA.RangeFromDate = FromDate
AA.RangeToDate       = ToDate
AA.Optimize( 0 )



__._,_.___


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





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

__,_._,___