DeBry.com - Research - MetaStock - Columnists
MetaStock® Plug-ins and more
PRODUCTS  |  SUPPORT

Broad Market Example  

This example will demonstrate how to calculate and retrieve the advance/decline line for three separate groups of stocks.  For our example, the three sets of stocks are the Dow Jones Industrials (in a single folder called "Dow 30"), the entire market, as represented by stocks on the MetaStock data CD (in a little over 100 folders, with the top folder "c:\metastock data\stocks grouped by sectors"), and the S&P 100  (in a single folder called "S&P 100").

1 - Run SpyGlass and choose Calculate | BroadMarket.

2 - Save each group of stocks as a list.

a - Make sure the Broad Market folder list ("your universe of securities") is empty.
     Click on the Add button, select the Dow 30 folder, and click OK.
     Click on the Lists button, click Save as, and give it a name such as "Dow Jones Industrials", click on OK.
     Click on the Dow 30 folder, then click Remove before proceeding to the next step.

b - Make sure the Broad Market folder list ("your universe of securities") is empty.
     Check the "Subfolders" check box.
     Click on the Add button, select the "top" folder of "c:\metastock data\stocks grouped by sectors" and click OK.  Every one of the subfolders will be added.
    Click on the Lists button, click Save as, and give it a name such as "Entire Market", click on OK.
    Click on "Remove All" to clear the Broad Market dialog.

c - Make sure the Broad Market list ("your universe of securities") is empty.
     Click on the Add button, select the S&P 500 folder, and click OK.
     Click on the Lists button, click Save as, and give it a name such as "S&P 500", click on OK.
     Click on the S&P 500 folder, then click Remove before proceeding to the next step.
 

3 - Select the "Run Calculations on all Lists" Option

At the Broad Market Dialog, check the Options button.

Select the "Run Calculations on all Lists" checkbox.

Press OK.

4 - Choose your calculations

Press the Batch button.

For our example we just want two calcs, so we will clear the list by selecting each current calc and pressing remove (you can simplify the calculation selection by picking the default selections.  These include the basic advance/decline calcs and a few others).

We'll get advancing issues first.  Select "Calculate the # of securities whose close is greater than their close yesterday", and press Add.

Now get declining issues.  Select "Calculate the # of securities whose close is less than their close yesterday", and press Add.

Press OK to dismiss the batch dialog.

Check the Batch Calcs checkbox so Broad Market will run all of the selected calculations.

5 - Check Broad Market Path

So you know where the data is stored, and to fix a bug that has appeared in a few previous versions of SpyGlass, press the Options button, make sure the Broad Market Path is OK, and then press OK (not Cancel).

6 - Run the calcs

Everything should be set up.  Press Calculate.  If you are running many different calculations on lots of data, this may take a long time.  This can be automated to run at night (see here).

7 - See if the calcs created any data

You can skip this step unless you are troubleshooting a calc that won't seem to work.  Using Windows Explorer, navigate to the c:\metastock data\ broad market data folder.  Look in the subfolder that you are investigating (e.g., "c:\metastock data\broad market data\dow 30".  You should see a text file with the name of the calc you are performing (e.g., NUM_CLOSE_ABOVE_YESTERDAYS_CLOSE.TXT).

8 - Run Metastock

9 - View MetaStock charts of Broad Market data

Go to File | Open, navigate to the appropriate folder (e.g.,- "c:\metastock data\broad market data\dow 30").  Open the first chart.  You can then page through the charts in that folder.

10 - Make a custom formula calculation out of the results to be viewed in a chart or used in another formula tool

We calculated advancing issues and declining issues.  Now we want to plot the advance/decline line for the three different groups of data on a chart of the S&P 500.  So first, load up a chart of the S&P 500 (or whatever market index you want to look at).

The basic formula for the advance decline line is:

calculate advancers minus decliners, and then add to the running total

The Metastock Custom Formula for this for our Dow 30 folder would be:

cum(

ExtFml( "Broad Market.AdvancingIssuesNumberFromFolder", "Dow 30")
-
ExtFml( "Broad Market.DecliningIssuesNumberFromFolder", "Dow 30")
)

If you are an old user of SpyGlass, you'll notice those are new formulas - they have a "FromFolder" tacked on.  The old formulas still work (e.g., "Broad Market.AdvancingIssuesNumber").

To create the custom formula:

- Run MetaStock

- Go to Tools | Indicator Builder

- Press New

- Name the formula something such as Dow Advance/Decline Line

- Paste the function above into the formula field (if you want to view all of the available Broad Market functions, press the Functions button and select Broad Market).

- Plot this on a chart, or reference from any formula tool.

 

 

 

 

 

 

Contact Us | Disclosure/Disclaimer


Adaptick, Inc.
Salt Lake City, Utah