PureBytes Links
Trading Reference Links
|
Mark's suggestion is valid and there are all sorts of places where the
Batman program by Fred will work and often yields more results (better
picture capture for example).
For a simple scan I tried a very short js file, and called it from the
scheduler and it worked fine for running the scan and updating all of my
composites.
Here is the code that works for me.
/* create AB object */
AB = new ActiveXObject("Broker.Application");
/* retrieve automatic analysis object */
AA = AB.Analysis;
/* load formula from external file */
AA.LoadFormula("....put your complete path to the formula in here")
/* setup filters */
/* backtest over symbols present in market 0 only (zero-based number) */
AA.ClearFilters();
/* set apply to and range */
AA.ApplyTo = 0; // use symbols
AA.RangeMode = 2; // use last day's quotes
AA.RangeN = 1;
/* run Scan */
AA.Scan();
The above code is in a xxxxx.js file and this file is called from the
scheduler. In this case, the scheduler does not need to do anything but run
the file, but some updates require running a program and issuing some
commands. I do not think XP scheduler does this, so Mark and I have found
and tested a freeware scheduler that can be setup to issue keystrok commands
and even mouseclicks (if you need to click on a button for example). I
update five different programs, in sequence, and last night was the first
night that all processed normally and completely. We have learned that with
the freeware version of this scheduler, you can not be working in another
program at the time--you have to be completely off the computer as the
scheduler uses the program or window that has the focus to which its
commands are issued. While I have not tried it, I believe their purchase
scheduler will recognize and pick windows you designate, thus it would not
matter whether you were working in another program.
This freeware scheduler can be found at
http://www.splinterware.com/
Hope this helps.
Ken
_____
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of MailYahoo
Sent: Thursday, October 05, 2006 11:36 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Using the XP scheduler to run an AB scan
Paul,
Look into Fred's BatMan program
Sounds like what you are looking for
Mark
_____
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of polomorabe
Sent: Thursday, October 05, 2006 11:11 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Using the XP scheduler to run an AB scan
I was reading an earlier message about running AB from a command line
using JScript
http://finance.
<http://finance.groups.yahoo.com/group/amibroker/message/91616>
groups.yahoo.com/group/amibroker/message/91616
and I was wondering if I could use this approach to solve a problem I
have. I live in Europe, which means that I usually do my pre-market
analysis in the morning before I go to work.
I use AB together with Telechart data. Each morning when I get up, I
manually update the TC EOD data, and then start up AB and run the AB
scan. The problem is that on my machine, the TC update and AB scan
together take about 30 minutes, which means I have to get up much
earlier to get my analysis done ;<(.
I've already found a way to schedule TC to update its DB. I was
wondering if it would be possible to automate the AB scan in the same
way using the XP scheduler, and so save myself the 30 minutes each
day.
Has anyone done this? I've used DOS command-line scripts before, but
not JScript. How do I write the script listed in the post mentioned
above, and then execute it? Can it be integrated into the XP
scheduler?
Many thanks,
Paul
|