|
What I need to do is to implement an exploration/backtest
that spans across all the stocks in the database(Why the entire stock database
is a whole different question that I couldn't find an answer for. That question
is also below).
The AFL function I want to write will be reading a data
file with a list of dates,stock-list pairs, where each tock-list is a list of 15
stocks. The AFL will be generating a buy/sell signal on those specific
dates for the stocks in the assocaited stock list.
The total number of stocks(across alll dates) in the
data file is only around 30-40.
But the data file gets updates periodically(daily, weekly
or mothly) with one or more stocks and hence I can't use a fixed filter of
stocks to apply the exploration/backtest on. (Is it possible to have a
custom filter that function that could look at the data file to get the data
file, each time the exploration/backtest is run??)
I am thinking if the AFL exploration is coded to reads
the data_file, it would have to do it for every stock in the database(7000). I
have all the 7000 why? Problem described above. I don't know what stocks
are going to be added/deleted from my
data_file.
This would then mean that the file gets open/read/closed
7000 times right? I am trying to avoid that.
I was hoping that in JScript, I could create Global
Dictionary variable with the following code that should get executed
once.
table = new
ActiveXObject("Scripting.Dictionary");
ReadAndPopulate(table);
This will define, read and populate the
table with the file data once.
That way, I am trying to avoid having to read
the file everytime, but just read from the table.
Hence my question if for every run of the AFL
function for each stockduring exploration/bactesting of 7000 stocks, there is a
new JScript interpreter is created. If yes, then I can't just create global
Dictionary variable.
I could do
dict =
GetStaticObject("Scripting.Dictionary");
in AFL, but not sure how to access/populate the dict variable via AFL or Jscript.
Thx,
Sarvi
Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html YAHOO! GROUPS LINKS
|
- RE: [amibroker] AFL GetScriptObject - Is new instan... Shanmugham, Saravanan
- Re: [amibroker] AFL GetScriptObject - Is new i... Tomasz Janeczko
- RE: [amibroker] AFL GetScriptObject - Is new i... Shanmugham, Saravanan
