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

Re: [amibroker] ATC last date



PureBytes Links

Trading Reference Links

Dan,
 
Yes, admin tasks can become overwhelming. You solution is perfect. I was planning on looking at BatMan to handle these tasks... but you are way ahead of me.
 
Thanks
 
Ara
----- Original Message -----
From: Dan Clark
Sent: Wednesday, November 09, 2005 4:02 AM
Subject: RE: [amibroker] ATC last date

Ara,

 

One of the issues that I’ve found with ATC is that, as you start using it more heavily, it increases the number of daily tasks you have.  For example, here’s mine:

 

1)       Close AB (if open)

2)       Download Quotes Plus Data

3)       Open AB

4)       Run basic ATC scan to create indexes and other indicators.

5)       Run ATC scan to create Relative Strength ATC symbols

6)       Run ATC scan to create Rank ATC symbols

7)       Run daily 1-2 other scans for “hot stocks”

 

Note that each scan has different parameters that must be set manually.

 

On a weekly basis, there is at least one other process that I will need to run and within a week or two, there should be one or two more.  

 

The administration tasks are getting a bit much.  So, I’m working on a way to 1) package scans for 1-click running of multiple scans with their attendant parameters and 2) to schedule the entire process.  

 

Item 1) involves creating a Jscript file that sets parameters and runs scans from the “Tools” menu.   After creating the Jscript file you simply add it to the Tools menu from “Tools à Customize à Tools”.  

 

Item 2) involves creating a few command files that run the QP downloader, open AB and run Jscript file.   This command file is then scheduled in Win XP “Scheduled Tasks”.

 

I finished coding last night and all of this is mostly complete.  The command files and Jscript file runs from end to end with no errors.   I’m testing the scheduling part now.  

 

I have a class tonight (trading), so I won’t be able to post more details until tomorrow (Thursday).    Writing it up so that it makes sense will take a couple of hours, but below are the raw scripts.  

 

Notes:

 

·         One caveat is that this works on Win XP or Win Server 2003.   

 

·         You need to install the “Windows Server 2003 Resource Kit Tools” to get the “Sleep.exe” utility app.   It’s a simple download and install, and works fine on Win XP.   It is located at: http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

 

·         The AFL file name referenced in “ScanRun_ATCComposite.js” MUST be changed to point to a valid scan or exploration file that you have. 

 

·         Check the paths for AmiBroker and Quotes plus.  If the default path on the C: drive was used, all should be fine; otherwise change it.

 

·         Save the text to individual files using the listed file names below.   Save them to the “..\Amibroker” folder.   

 

·         Run “LoadQPDataAndRunScans.cmd” from the Command Line.

 

If you or anyone else can improve this or knows a better way of doing it, PLEASE SPEAK UP!

 

Regards,

 

Dan.

 

 

“LoadQPDataAndRunScans.cmd”

@Rem Close AB, if open

TaskKill /fi "Imagename eq Broker.exe" /IM Broker.exe

 

@Rem Sleep for a while to let AB save symbols

SLEEP 120

 

@Rem Start QuotesPlus Downloader

call RunQuotesPlusDownloader.cmd

 

@rem Sleep 10 minutes for downloaded data to process

SLEEP 600

 

@Rem Start AB:

Start RunAmiBroker.cmd

 

@rem Sleep for 30 seconds

SLEEP 30

 

@Rem Call 1st Scan

cscript "c:\Program Files\AmiBroker\ScanRun_ATCComposite.js"

 

exit

 

 

“RunAmiBroker.cmd”

@Rem Run AmiBroker

"C:\Program Files\AmiBroker\Broker.exe"

 

exit

 

 

“RunQuotesPlusDownloader.cmd”

@rem run Quotes Plus Downloader

"C:\Program Files\Quotes Plus\GetPasswd.exe"

 

 

“ScanRun_ATCComposite.js”

 

/* create AB object */

AB = new ActiveXObject("Broker.Application");

 

/* retrieve automatic analysis object */

AA = AB.Analysis;

 

/* load formula from external file */

AA.LoadFormula("C:\\Program Files\\AmiBroker\\Formulas\\Systems_DailyScans\\A_QPAddCompositeIndexes7.afl")

 

/* setup filters */

AA.ClearFilters();

AA.Filter( 0, "group" ) = 2;   // Common Stocks

 

/* set apply to and range */

AA.ApplyTo = 2; // use filters

AA.RangeMode = 2; // use all available quotes

AA.RangeN = 1;

 

/* run scan */

AA.Scan();

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Ara Kaloustian
Sent: Tuesday, November 08, 2005 8:39 PM
To: AB-Main
Subject: [amibroker] ATC last date

 

I have started using ATC for creating Industry / Sector data....

 

One issue is that I MUST update the ATC daily.

 

I would like to verify the date the ATC was processed and compare it to the date of "normal" data. The date is visible in the symbols list in group 253, but I have not seen any way of getting the date with AFL.

 

Anyone with info on this?

 

Ara




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





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS