PureBytes Links
Trading Reference Links
|
The following VBscript works well when executed
from the command line while AMIBROKER IS EXECUTING:
' Dimension Variables
dim rc
dim AB
dim AA
'/* create AB object */
set AB = CreateObject("Broker.Application")
'/* retrieve automatic analysis object */
set AA = AB.Analysis
'/* load formula from external file */
rc = AA.LoadFormula("C:\\Program Files\\Amibroker\\AFL\\trace.afl")
WScript.Echo( "Loading the formula " & rc )
' optional: load settings */
' AA.LoadSettings("the_path_to_the_settings_file.abs")
' setup filters */
With AA
.ClearFilters()
.Filter(0,"market")=1 ' NYSE stocks only
.ApplyTo=2
.RangeMode=2 ' use 0- all available quotes 1- n last quotes, 2=
nlastdays, 3=fromtodate
'//AA.RangeN = 1; 'use with RangeMode=1 and specify number of days
end with
AA.Scan()
WScript.Echo( "after scan")
set AA = nothing
set AB = nothing
The script does not give the same result when AMIBROKER is NOT executing.
In fact,
no members of the NYSE are found. Data source being used is TC2000.
What is missing?
The include file trace.afl:
// Dummy trace utility to see what securities are selected by enabling
various filters with Scan
Desc = FullName();
_TRACE(Desc);
Buy=Sell=Short=Cover=0;
Thanks,
RR
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|