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

RE: Autorun Macros



PureBytes Links

Trading Reference Links

(Wow, I've completely forgotten how v4.0 worked!)

Here's my understanding of the "Load Security" menu based on your
description.  It gives you a list of stocks in a particular directory and
you can specify one or more of those stocks to be loaded.  You can further
specify (indicated by an asterisk) which stock will have an AutoRun macro
modify their chart in some way after it has been opened.  Is that correct?

Assuming it is, then WinBatch can do this easily, although the specification
of which stocks to modify needs to be shifted to WinBatch since MS 6.x's
File/Open dialog doesn't have that capability.

Here's _one_ way of going about it:

Write a WinBatch script that reads a list of Ticker Symbols from a text file
(say "Stocks.txt").
The script then starts Metastock (or activates it if it is already running).
For each Ticker Symbol in the text file, the script:
1.) Issues the "File-New-Chart" command
2.) Selects the "By Symbol" option button
3.) Enters the Ticker Symbol into the dialog box
4.) Presses the "Open" button to display the chart (using the Default
Template)
5.) Issues the appropriate "Insert" and "Format" menu commands to modify the
chart appropriately.
After all of the charts have been loaded, the script then asks you if you'd
like to save all of the new charts.

(I'd guesstimate that a script that does the above would be about 40 lines
long - depending on how many mods occur in step #5.)

Of course, many variations of this script can be developed depending on what
you need to do and how much effort you want to put into it.  Some variations
I can think of include:
1.) Creating a dialog box for specifying the stocks to chart
2.) Using "Smart Charts" instead of "Dumb" charts/
3.) Applying a specified Template File instead of issuing "Insert" and
"Format" commands.
4.) etc., etc.

I use a script very similar to one I described above to auto-update all of
the charts on my website every night.  The whole process takes less than 5
minutes.

Hope this helps,
Chip
http://coolhistory.com/ChipsCharts


-----Original Message-----
From: owner-metastock@xxxxxxxxxxxxx
[mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of CMA
Sent: Sunday, April 25, 1999 8:09 AM
To: Metastock Digest
Subject: Autorun Macros



Just to review for Sean and Chip what autorun macros
are, and quoting from p. 375 of the the MSPRO ver. 4.0
manual:
  "A commun use of program automation is to perform
the same macro on some, or all, of the securities that
you are following...this can be done using MetaStock's
macro commands. MetaStock permits you to record an
'autorun' macro that will be applied to all of the
securities in the Load Securitiy menu that have been
flagged with an asterisk. ..The macro must begin and
end at the Load Security menu."
   The main use of an autorun macro is to display and
template or layout for all the stocks one is
following, one after another. Equis has never been
able to program that facility into Windows versions of
MSPRO. Has anyone been able to do this with Winbatch?
   If Equis has been unable to do it using Visual
Basic, will a non-programmer be able to easily do it
using Winbatch?
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com