Spacejock Software 'FreeCharts SE' User manual
(With additional sections for F-Charts PRO)
Disclaimer
FreeCharts SE and F-Charts PRO come with absolutely no warranty. Use these programs at your own risk. I cannot possibly check every combination of data that you might feed into this software, and therefore I cannot be held responsible for what comes out. If you are uncomfortable with that, please don't use this program.
Although I have tested this software, I do not guarantee the accuracy, integrity or quality of the information given by this software. Any reliance upon the information shall be at your sole risk.
Information presented by these programs is not suitable to be used as investment advice. You should seek professional advice before making any investment decisions relying on the information provided.
Both Freecharts and F-Charts will import end-of-day data and display it in a graphical format. If you choose, you may enter variables in the formula boxes and view indicators on the current chart, BUT these programs do not make guesses or judgements, they just present factual data on charts. What you read into those charts is your business.
Finally, Trading is inherently risky. You should always seek professional advice before buying stocks.
From this point on, I shall refer to the software as 'Freecharts' unless discussing a feature specific to F-Charts PRO, in which case I will use that name instead.
Terms of Use
"FreeCharts SE" is a licensed Freeware product and may be freely distributed and used provided full credit is given to Spacejock Software, and no fee is charged for its use. All rights to "FreeCharts" remain the property of Spacejock Software.
It is strictly forbidden to reverse engineer, attempt to reverse engineer, decompile, or otherwise make use of any part of the core code that constitutes FreeCharts. Any such activity will result in criminal prosecution and the pursuit of damages.
Spacejock Software retains all rights to change or modify the terms of use and distribution for this program at any time.
"F-charts PRO" is a commercial product, and may not be distributed. All rights to "F-charts PRO" remain the property of Spacejock Software.
Read Me
Freecharts SE is a stockmarket charting program. It will take end-of-day data and import it either file-by-file or whole directories at a time. The only limits to the amount of data you can use with the program are physical ones - the speed of your computer, the amount of hard drive space you have, and how long you are willing to wait for a chart to appear. The more data you shovel in, the slower things will run. Of course, you can install multiple instances of the program and use each instance for a different market - e.g. commodities, DJ, Nasdaq and so on.
I have a Celeron 633 (overclocked to 950mhz) with 128mb of RAM. I have just over 12 months of data for every company on the ASX - the Australian Stock Exchange. My file shows 4000+ companies, but I do have records for all commodities, other indexes, etc. My database file is 32mb, and from the time I enter a code to the time the program has finished drawing all three charts I have to wait about one quarter of a second. On a Celeron 366 with 96mb of RAM that blows out to 2 seconds. Importing an end of day file containing 1000 stocks takes under 1 second on my computer.
Installation
Freecharts SE is written in Visual Basic 6, and therefore requires the Visual Basic runtimes from Microsoft (The direct link is http://download.microsoft.com/download/vb60pro/Redist/sp4/win98/EN-US/VBRun60sp4.exe)
If you get error messages about essential files missing, I suggest you return to the Spacejock Software home page (http://www.spacejock.com) and follow the links to the full package downloads on the Freecharts SE page.
Anyway, the basic instructions are as follows:
For the self-installer:
Unpack the ZIP file to a temporary folder
Run Setup.exe from the temporary folder
Choose your destination directory and proceed.
Once the installation has finished, youll have a new entry in your start menu. Look under Programs and youll see a folder called FreeCharts. Inside this folder is the shortcut to the main program, and you should click it to run FreeCharts.
For the EXE-Only file:
If you have already installed Freecharts before, just extract the contents of the ZIP to the same program folder you previously installed to. If you haven't installed the program, see above. You need the full package first.
IT WON'T RUN!
Or 'what to do if things go wrong'
Note that you should download and install the full Freecharts SE package before you try and run the program. The full Freecharts install contains all kinds of Microsoft files which are required in order to run the programs.
If you can't even run the installer you are missing the Visual Basic 6 runtime. Visit http://www.spacejock.com and download the file from the runtimes page, which is accessible from the main screen.
After installation you can run Freecharts using the start menu icon or double-clicking the program file itself. If you run the program and nothing happens there is only one likely cause - the FCSE.ocx file must be in the same path as FreeCharts.exe. They are actually two pieces of the same program, and neither will work without the other. If the OCX file is missing, just install the program again, or extract the OCX file from the original ZIP and place it into the Freecharts program directory. Note, for F-Charts PRO the file is called 'chartengine.ocx'.
If the program runs but freezes on the splash screen with the message 'Checking Database' it is almost certainly caused by outdated Microsoft Jet files. Please visit www.spacejock.com and you will see a link to the JET file on my 'Runtimes' page.
If the program runs, but gives you an error message about missing essential components you will need to visit the Runtimes page. If you are running Windows 95 or Windows 98 you can download the JET 4 runtimes, the DCOMxx package (where the xx is '95' or '98') and Mdac_Typ.exe. Install all of them and try F-Charts again.
If you have done all the above and it still doesn't run, visit www.spacejock.com and see whether there is an updated version available. Freecharts is available from many public archives, and not all versions are updated at the same time. The very latest version will always be available as an update file from www.spacejock.com.
If you have tried everything and it still doesn't work, please send an email to freecharts@spacejock.com. Please tell me whether you ever had Freecharts SE running (which will tell me the runtimes are present) and if possible, tell me the version number of the program you are using.
Using the Program
When you look at the main screen you will see a number of buttons surrounding three chart windows. I'll describe the functions for each of these buttons.
[SINGLE IMPORT] Button
(See Appendix B for a full explanation of data importing and file formats)
Click this button, then select a file to import. After you click OK your file will be imported. You will need to import at least three days worth of data before prices appear on the charts.
If you import the same file twice, Freecharts will simply replace existing data with new data from the second file. Data is indexed by ticker symbol and date, so two prices with the same date and ticker cannot exist in the database at the same time.
[BULK IMPORT] Button
There is no way you want to select one file at a time in order to get a whole years worth of data into my system. The BULK IMPORT function allows you to specify a folder full of SEZ, PRN, CSV or TXT files, and FreeCharts will then import the lot. Make sure the import folder doesn't contain anything but ascii price files or you will corrupt your database. I use c:\temp\data for mine.
[CODE] Text box
The box is where you enter the stock code for which you would like to see a chart. Type in the code and click the SHOW button (or press Enter) and the charts will appear. If they dont, either the code was wrong or there is no data for that company in the database. You can also select a company from the drop-down list. This list will only contain stock codes until you import a suitable titles file (some supplied with the program)
[TIME PERIOD] Drop-down list
This drop-down list selects the length of time visible in the chart windows. Choose One, Two, Three, Six or Nine months, One Year or All Data and the charts will immediately be redrawn to show the new information. When I say immediately, it does depend on the speed of your processor and the amount of data in your database. If you put 10 years of data in there and run the program on a 486 good luck. Next to the Time period buttons are buttons to select daily, weekly, monthly or yearly price ticks.
[EDIT COMPANY] Button
If you don't have a valid stock code in the CODE field, this button will do nothing.
Once you have a valid stock code in the CODE field you can click Edit Company and you will see a company details screen for the current stock. On this screen you can do the following:
You can change the title. Just enter a new title in the box at the top of the screen.
You can set the watch list. Select a new watchlist from the drop-down list. (I'll show you how to edit the watch list titles themselves later)
You can enter the number of shares held.
You can enter the total amount paid (including brokerage, if you like) Freecharts will show your percentage gain or loss, and price paid per share. It will also show the current value of these shares.
You can also change the Yield, P/E, Dividend and Earnings per Share values.
F-Charts PRO Only: You can enter a Stop-loss price and projected Sell price, and F-charts will not only show you the potential profit/loss from the stock if sold at these prices, it will display the values on the main chart window as colour-coded lines. You will also see a line on the main chart labelled 'Paid' - this is the average buy price for the stock you are viewing. After entering a stop loss and sell price, PRO will display a calculated 'projected profit' and 'projected loss' for that stock, should you sell at either of these prices.
'Import Tickerless' button
Some data suppliers offer you historical data where you specify the ticker and in return you get a file like this: date, open, high, low, close, volume. In other words, no ticker symbol at the start. Because the main import routine expects a ticker on every line, you can't import this kind of data unless the program knows what the code is. That's where this button comes in, because it expects a data file with no ticker codes in, and assumes that all the incoming data is for the current company. Don't import IBM prices when viewing Microsoft. Yahoo finance offers data in this format.
[Previous] and [Next] buttons
Jump to the next company with stock holding information, allowing you to page through your portfolio and edit stocks at will.
Back on the main chart window...
SHOW PORTFOLIO [Button]
This button will display a summary of all the stocks for which you have entered stock holdings.
With the PRO version, you will see warnings next to stocks that have fallen below your programmed stop loss value, or risen above your sell value.
SETTINGS [Button]
The settings button brings up a new dialog box which allows you to set the number of days used by each of the indicator lines on the charts. The defaults are set when the program is first loaded, and you can experiment with any numbers you like. If you mess up, click 'reset to defaults'.
Maximum Code Length is a cut-off for when you do data importing. If you want to exclude codes of more than 4 characters, then set this to 4. To allow all codes up to 6 characters, set this to 6. I dont need to tell you what to put here if you want to exclude codes of more than 3 characters. To be effective you should set this before you import all your data.
You can also reverse the background and foreground colours, select whether tips will be displayed when you hold the mouse over a chart window, and choose whether you can click the left mouse button to draw a vertical line across all three charts. If you clicked on the main chart window you'll also get a horizontal line.
After you have changed the figures, you should click Apply to save the changes. All charts will be re-drawn to reflect any changes you made.
The 'Rename Watchlists' button will let you change the titles on the ten watchlists built into the program. You can call them anything you like, but can't exceed 10 letters.
The 'database utilities' button allows you to maintain your database. You can delete price data before a given date, after a given date, remove a company and all its prices, enter stock splits or consolidations, clear the entire database and import titles for the companies in the database. (This requires a SYM file for your chosen market, and importing this SYM file will also import the 'sectors.txt' file if you have one. This file allocates sectors to ASX stocks. If you are not interested in ASX - Australian - stocks, just delete sectors.txt)
You can now create your own 'keep' list. Just create a text file using wordpad or notepad and put a stock code per line. E.g.
TLS
BHP
SOH
...etc
When you click the new 'clear unwanted' button on the database utilities form you can select this text file, and ALL stocks and prices NOT in the file will be deleted from your database.
PLEASE be careful when choosing your 'keep' file from the file selector box, because if you click on something other than your list of keep codes your entire database will be wiped. I suggest you create a directory called 'keep' and a file called 'keep.txt' within that directory and no other files. The program will remember the 'keep' directory as the last used for this function, which should help prevent mistakes.
By the way, there's another new button on the database utilities form - it's for exporting a list of all codes in your database. You can create the export list, remove all the codes you DON'T want, rename the file to 'keep.txt' and use it to clean your database out...
Back to the settings screen...
Fcharts PRO: Because you have more charts and indicators, there are more fields to adjust. You also have a setting marked 'Simplified Ratings' which reduces the entries in the ratings list from sixteen to four.
The 'Rename Ratings' button will let you change the titles for the four main ratings built into the program. You can call them anything you like, but can't exceed 10 letters.
Back to the main chart window...
Watchlist [Drop-down list]
This list comprises 11 entries - 'ALL' and 10 user-defined headings. You can put your held stocks in one, prospects in another, dogs in a third - it's up to you. When you select a category, the NEXT and PREVIOUS buttons are restricted to the current category
Ratings List [Drop-down list] (F-Charts PRO only)
This list has either 18 or 6 entries, depending on the current setting for 'Simple ratings'. In Simple mode you will see ALL, Untraded, (1), ex-1, (2) and ex-2 (unless you've renamed these titles) Next to each heading is the number of stocks in that category as a result of the last market scan. In complex mode the headings are sub-divided by the 'liquidity' settings in the market scanner screen. You will notice that each of the market sizes (Big, Medium, Small, Tiny) has its own entry. They are further divided into (1), (2), ex-1 and ex-2. What do the postfixes mean?
(1) means that the stocks in this list matched your Condition 1 on the very last trading day for this stock. Please be aware that the last trading day could be a week ago - always check it. If you select Big (1) you will see a chart - if there are any stocks in this watch list. The last price tick on the right will have a green circle floating above it. This stock matched your Condition 1 on the last trading day.
(2) means that the stocks in this list matched your Condition 2 on the very last trading day for this stock. If you select Big (2) you will see a chart - if there are any stocks in this watch list. The last price tick on the right will have a red circle floating above it. This stock matched your Condition 2 on the last trading day.
ex-1 means that the stock was recently marked (1), and has not yet been marked (2). If you are using condition (1) as a buy condition, then ex-1 would represent stocks that you have bought and are not yet ready to sell. Some people term ex-1 as 'Hold'
ex-2 means that the stock was recently marked (2), and has not yet been marked (1). If you are using condition (2) as a sell condition, then ex-2 would represent stocks that you have sold and are not yet ready to buy again. Some people term ex-1 as 'Wait'
You can rename these headings in the Settings screen - just click 'Ratings Titles'
PRO Owners - important note:
The two lists work together. If you select ALL on both lists you will be able to access the entire database with NEXT and PREVIOUS. If you select a rating but leave the watchlist on ALL you will be able to access any stocks with that rating. If you select a watchlist but leave the rating on ALL you will be able to access stocks in that watchlist. If you select a rating AND a watchlist you will only be able to access stocks which match the rating and are also in that watchlist.
NEXT [Button]
Clicking this button will move from one stock in the current watch list to the next.
PREV [Button]
Clicking this button will move from one stock in the current watch list to the previous.
AUTO> and <AUTO buttons
Enter a number in the Sec: (Seconds) box and click one of these buttons and the program will scroll through the stocks in the current watchlist automatically, pausing 'n' seconds between each one.
About [Button]
This will show the splash screen with the current version number. For F-Charts PRO it will show the registered owner's details.
Market Scanner [Button] (Feature only available in F-Charts PRO)
This button is located just below the 'Next' button on the main form. When you click it, you will be presented with two options.
Set Scan Parameters
This is where you enter your two conditions and decide which levels to use to sort the market into Big, Medium, Small and Tiny shares. This has nothing to do with market capitalisation, it is just a value calculated by multiplying the latest recorded value for the long-term moving average of the closing price by the average volume. The resulting figure will give you an idea of the value of shares traded on the latest day in the database, and this value is used to segregate the companies in your database into the previously mentioned categories.
You can also select which watchlists will be included in your scan.
Perform Market Scan
This is a one-click-and-get-a-coffee button. (But you'll need a fast-boil kettle because the scan takes under 60 seconds on my PC)
When you click it, your formulae will be applied to every stock on the market. In order to speed things up, only enough periods are examined to determine a result (as opposed to the main chart, which scans all prices for one stock). Note that it will always be more periods than the highest number on the settings form. What I mean is, if you set the number of periods for the long term moving average to 100, the market scanner will use 120 so that the average has time to start working. (You need at least 100 price periods before a 100-day moving average begins to return the right values)
You will see companies listed against the green (1) and red (2) - these are updated as the scan progresses to show which companies have last matched your criteria.
The market scanner uses the least amount of data it can to work out the conditions - what happens is, if you put [90] the program adds a few days to that and only looks at the past 90 + 30 days.
What this means is that if the first occurrence of (1) was 15 days into that 90 days, it may be on a different day to the first occurrence on the chart you bring up on the screen (which goes right back to the start of the data) If effect, it's saying that your condition was not matched in the past 90 days.
Now, if you want the scanner to go back 300 days, just go into the settings screen and change 'No. periods to Examine' to 300. The scan will take a lot longer, but will examine more prices and be more accurate.
The Chart Window.
Now that we've covered all the buttons and lists, it's time to examine the chart windows themselves.
Once you've imported some data you want to look at a chart or two. First thing you should do is enter a stock code into the 'Code' box halfway down the left side of the screen. After you've typed in a valid code, click Show.
Three charts will appear - the main window will show a bar chart, while the two lower charts will show volume and MACD charts. To select the style of chart displayed in a window, just right-click on the window and choose the chart from the popup menu. On the main chart this popup menu also allows you to choose the overlay type (various combinations of moving averages)
These are the chart types you can select in the Freecharts upper window:
OCLH. The top chart shows a bar chart of the selected period. Along the top of the chart you can see the open, high, low and close for the most recent day, with each figure in red if they are below the previous days close, and green if they are above. Next is the amount of change from one days close to the next, then the volume (red for lower, green for higher) and finally the number of days currently in use to plot the Exponential moving average lines. The colours show you which line is using which number of days.
Candlesticks The classic candlestick chart.
MACD Next is an MACD chart with a histogram. The blue line is the difference between two exponential moving averages of unequal lengths, the red dotted line is the exponential moving average of the blue line. The current number of days for each line is shown in the relative colour.
Line Chart Shows a line representing the closing price.
Lower window charts:
Momentum The blue momentum bars show the difference between the current close price and the close price x days ago. (X being 10, usually, but you can change it) If the bars are above the black line the closing price is higher than it was ten (or rather, x) days ago.
Volume The next chart shows historical volume, with 0 at the bottom. The red bars show the actual volume, while the purple line is an exponential moving average. By default it is 21 days, but you may change this in the settings screen.
RSI Finally, the Relative Strength Index is at the bottom.
Fcharts PRO has these additional lower window charts:
3-way momentum
Instead of using 1 range to display momentum, this chart uses three: one of 10 periods, one of 15 and one of 21. The result is a chart which displays more information about the trending of this stock. You can access momentum values 2 and 3 in your formulae with the variables MOM2 and MOM3.
Fast Stochastics
This is a Fast Stochastic chart. You can access the values in your formulae with PercentD and PercentK keywords. EG.
close < lowest_low[30] and percentd > lowest_percentd[30]
That will tell you the price hit a 30-day low, but the percentD didn't.
Slow Stochastics
This is a Slow Stochastic chart. You can access the values in your formulae with PercentDSlow and PercentKSlow keywords. EG.
close < lowest_low[30] and percentdSlow > lowest_percentdSlow[30]
That will tell you the price hit a 30-day low, but the percentDSlow didn't.
You can also use %K, %D, Slow%D and Slow%K instead of the full names.
Wilder's DMI
You can plot the +DI, -DI and ADX of the current stock by selecting this chart. You can access the variables in your formula with +DI, -DI and ADX. Make sure there are no spaces between the + and the DI.
F-Charts PRO Main Chart Overlays
Guppy MMA.
I read about this overlay in Daryl Guppy's Trading Tactics book. It consists of two separate strands of moving averages - one strand with six averages of between 3 and 15 periods, and the other strand with six averages of between 35 and 60 periods. I thoroughly recommend reading the book before using this overlay. (Actually, I thoroughly recommend all of Daryl's books)
HiLo moving Average
Instead of an exponential moving average of the closing price, this overlay uses the low and high prices as its data source.
Compare with Sector
In order to use this feature you will need to have daily price values for the sector itself, and you will need a sectors.txt file. This file consists of three codes per row (example below)
XAI,XAT,BAM
XAI,XAT,BRL
XAI,XAT,CBW
XAI,XAT,CEW
XAI is the All Industrials. The first code on each line must be present, but is currently not in use.
XAT is Alcohol and Tobacco. This sector belongs to XAI.
BAM is a company which belongs to the XAT sector.
I have put a sectors.txt file in the F-Charts package. When you import a sym file, F-charts will automatically import and apply the sectors to the imported companies.
If you are not using the ASX (ie you are using another country's stock exchange) then you must delete sectors.txt before you try and import company titles for your stocks.
Once you have everything set up, clicking on 'Compare with sector' will overlay a dashed line chart of the sector's performance over the top of the current chart. Note: make sure the stock and the sector data are both up to date, or the charts will still overlay but with the wrong time frame.
Compare with...
When you select this overlay you can enter any valid stock code. The second stock will be charted as a dotted red line chart over the top of the current chart.
Bollinger Bands
Places bollinger bands around the current price chart. You can use BollUpper, BollMiddle and BollLower in your formulae.
View Raw Data
There is also an option to view the raw data that went into the drawing of the chart. Just right-click on any chart window and choose 'View Raw Data'
By the way, you can double-click on a chart to get a larger view in its own window. While zoomed in you can select a drawing colour from the pallette and cover the chart with support and resistance lines, trend lines or anything else. Click and hold the mouse, then drag to a new point before letting go. You can move whole lines around by dragging them with the mouse, and you can move end-points the same way. As the mouse passes over a line you have drawn, the cursor changes to a cross with arrows or a diagonal line with arrows - when it's a cross with arrows, hold the left button to drag the current line around. When it's a diagonal line with arrows you can hold the left button to drag the end of the line around.
In the Zoomed view you can also drag the chart to the right and left when the time-frame is six months or more. To do this, just click and hold the right mouse button on the chart window and move the mouse. When you release the mouse, the chart will stop in its new position.
If you change the time-frame using the buttons at the top of the form, it will also change the time-frame in the underlying main chart. You will lose your lines, though.
You can click 'next' or 'previous' to move between stocks. If you click on either of the Auto buttons the program will scroll through the stocks in the current watch list, pausing the number of seconds you specify in the 'Sec' box. Click the Auto button again to stop the automatic display.
To Add:
Using 'Yield', 'Earnings', 'Dividend' and 'PE' as variables in your formulae.
Printing from Output windows (Click Print!)
Right-click menu items - several new options not covered in the manual.
Conclusion
If you are using Freecharts and are interested in some of the features in PRO, you may be surprised to discover that the PRO version only costs AUD$35 (Under US$20). It represents great value for money, and you can order your copy through the secure server on the Spacejock web site. Visit www.spacejock.com for the latest news and updates.
Programming Guide
OK, so you'd like to develop and test a trading strategy for your favourite stock. With Freecharts you can do so quickly, easily and without a mess of arcane commands.
For example, you may want to know whether you should buy your stock when the MACD line crosses the MACD signal, and sell when the reverse is true. Sure, you can look at a chart and see for yourself where that happens, but when you start adding more qualifiers (volume must be up 50%, close must be higher than day's open, etc) it can get frustrating trying to spot an opportunity from a bunch of coloured lines.
By entering a pair of matched conditions you can have the results of your strategy shown immediately on the current chart. Freecharts scans the historical data for the current stock and determines the oldest point where your first condition is met. It will place a at this point, right above the price bar. Note that if condition 1 is never met, there will be no indicator. Some users have decided that condition is a buy signal.
After placing a indicator, Freecharts will look for the first occurrence of your second condition from this point forwards (heading towards the right hand side of the chart - it works forward from the earliest date to the latest.) While Freecharts is looking for condition 2 it will ignore any further condition 1 events. As soon as it finds a condition 2 it will place a indicator on the chart above the price bar, and will again start looking for a condition 1. Some users have decided that a condition could represent a sell signal.
Because it updates the chart so quickly you can modify your formula again and again until you are happy with the results. Then, when you click 'GO', both formulae are stored in the database so you can change to another company and test them again.
NOTE: You do not program Freecharts to examine the relationship between today's price and yesterday's price. Instead, you must tell Freecharts what you want your conditions 1 and 2 to be, and the program will then tell you where each condition occurs, whether it was six months ago and last week, or two weeks ago and last Friday. The easiest way to understand this is to put a really simple formula into the condition 1 field (close > open) and another simple formula into the condition 2 field (close < open). When you click 'Show' it will update your chart with a load of indicators. Notice how the 1's and 2's alternate, and notice also that they don't highlight EVERY occurrence of close > open or close < open, just the first occurrence since the previous, opposite condition.
An example Freecharts formula
Let's say you've decided to buy a stock when the MACD line (keyword: MACDLine) crosses over the MACD Signal (MACDSignal), the long-term moving average (MA3) is higher (>) today than it was yesterday (PREVIOUS MA3) and today's volume (VOLUME) is higher than the moving average of volume (MAVOL). Can you spot all that after a single glance at a chart? Well FreeCharts can:
previous MACDLine < previous MACDSignal and MACDline > MACDSignal and MA3 > previous MA3 and Volume > MAVol
That's a pretty complex example to start off with, but I wanted to show you the sort of thing this program can do. To test it, bring up a company in Freecharts, change to a 3-month view and then paste the italicised formula above into the text box.
(Tip: you can highlight the italicised formula above, right-click the selection and choose 'Copy'. Next, change to the Freecharts window and right-click on the text box before selecting paste from the pop-up window.)
Now, if you press GO your chart will refresh... and it will look exactly the same as it did before.
Why?
If you click on the ALL DATA button you will understand. Somewhere on the far left there will be a single, green circle - providing your condition was met, of course. What's happened is that the condition was met, but your initial view was zoomed in to the last three months so you couldn't see it. Freecharts starts applying the conditions from the very beginning of the data.
So, you can see a green, circled '1' the first time this condition was met, and nothing else. In order to get a condition 2 we need to enter a formula into the box.
close < open
This is a pretty simple one. It refers to the trading price on the day, and indicates that the close price should be lower than the opening price.
Now click Show. Bingo! Lots of circles (hopefully). Click on the 3-month view to zoom in a bit. Now you can see the power of this stuff.
OK, end of example. In order to use it, you need to know which keywords and operators are available to you. There is a list in Appendix A, along with some macros which I programmed in because I thought they might be useful. For example, instead of
you could just put:
(The M_ prefix indicates a pre-calculated macro)
Also, since Freecharts will pick out the first date when your condition is true, there is no need to say
previous MACDLine < previous MACDSignal and MACDline > MACDSignal
as you can simply say
MACDline > MACDSignal
and Freecharts will mark the first time it happens. (They're not quite the same, though. If you add in another expression such as Close > Open, in the former case you will only see an indicator where the lines crossed and the close is higher than the open. In the second case, you will see an indicator whenever the MACD line is above the MACDSignal and the close price is higher than the open. To restrict things further, you could enter:
(previous MACDLine < previous MACDSignal and MACDline > MACDSignal) and (previous close < previous open and close > open)
Note the use of brackets to tell Freecharts which bits belong together. This formula is very specific - unless all the conditions are met on the same day, you won't get an indicator.
Warning!
If you write a formula which evaluates as
TRUE > FALSE
or something like
close > open and close > M_GappedUp
(which is a TRUE/FALSE macro) then I have no idea what will happen. Probably something bad, so don't do it.
Appendix A
Please note: Freecharts is a work in progress. There are many elements I want to add to the formula language, but in order to road-test the basics I have released it with a functional set of commands. If there is something you would like to see, please email suggestion@spacejock.com with your idea.
Price-related Moving Averages Operators
Close MA1 + - / *
Open MA2
High MA3 Evaluation
Low MAVol > < = <> <= >=
Volume
Calculated
Typical (open+close+high)/3
Median (High-Low)/2
Indicators
MACD1 Moving average of close price
MACD2 Moving average of close price
MACDLine Value of MACD1 - MACD2
MACDSignal Value of the MACD Signal line
RSI RSI value
MOM Momentum value
Prefixes
You can prefix any variable or macro with HIGHEST_ or LOWEST_ and append a pair of square brackets containing the number of periods you want the high or low calculated from. Huh? Well, Highest_Close[14] is equal to the highest close in the past 14 days. Lowest_Volume[30] is equal to the lowest volume in the past 30 days. Because of the intensive calculations this can slow down the drawing of charts. (The program has to count back [n] prices and check the recent high/low for EVERY tick on the chart. Thank goodness we have an excess of Mhz nowadays!
You can stick HIGHEST_ and LOWEST_ in front of absolutely anything. Just don't forget the [, the number of periods and the ]. There should be no spaces anywhere in the whole thing.
E.g. close < lowest_close[7]
Note that it cannot 'see' back past the start of your data. If you put lowest_close[200] and you only have 100 prices in the database, it will reduce the 200 for you. E.g. when it's scanning the fifth price in the database it will use lowest_close[4] as the comparison. This may lead to some 'false' indicators on the chart near the start of your database - false in that the price concerned may NOT be the lowest for 200 periods, while it IS the lowest from the earliest data on hand.
Keywords
You can put LastDayOnly = TRUE into a formula so that the stock will only be marked if the rest of the formula is true on the very last day in the database. Eg.
close > highest_close[30] and LastDayOnly = True
This will only pick stocks which have closed higher than any other day in the past 30 days AND the formula will only check back from the very last price in the database.
Macros
These are pre-calculated values which are stored along with every day's price data. You can access these just like the values above, and they also work with the PREVIOUS keyword and the [n] postfix.
M_VolumeSpike Volume is at least twice the average. TRUE or FALSE
M_GappedUp TRUE or FALSE
M_GappedDown TRUE or FALSE
M_GapAmount Amount the price gapped. A dollar value.
M_Overbought Price is above your RSI upper band. TRUE or FALSE
M_Oversold Price is below your RSI lower band. TRUE or FALSE
M_OutOfOversold Price has moved above the lower band. TRUE or FALSE
M_VolumeRises Number of days in a row the volume has increased.
M_VolumeFalls Same, but decreased.
M_PriceRises Number of days in a row the price has closed higher. M_PriceFalls Number of days in a row the price has closed lower.
M_MACDHistFallDays Number of days the MACD histogram has fallen
M_MACDHistRiseDays Number of days the MACD histogram has risen
M_MACDHistAboveZero TRUE or FALSE
M_MACDHistBelowZero TRUE or FALSE
M_InsideRangeDay T/F open > previous open and close < previous close
M_OutsideRangeDay T/F open < previous open and close > previous close
M_OpenCloseReversal T/F
M_RisingBars Whole number. Counts number of days where 'open > previous open and close > previous close'
M_FallingBars Whole number. Counts number of days where 'open < previous open and close < previous close'
More Variables
Date You can use the date keyword with comparison operators like '=', '>=', etc to restrict the condition to specific dates. For example,
date >= 21/04/2001 (on computers with DD/MM/YYYY dates)
or
date >= 04/21/2001 (on computers with MM/DD/YYYY dates)
Yield
Dividend
PE
Earnings You can use these Fundamental variables in your formulae, but you have to have financial data in your database to make use of it. You can enter financial data per company in the Edit Holdings screen.
Appendix B
Importing Data explained in full.
Both versions of Freecharts will import end-of-day data in Ascii, comma-delimited format. Because I've had several emails asking me the exact procedure I've decided to explain it from start to finish.
A charting program without data is like a tiger without fresh meat. In order to toss a couple of spare ribs into FreeCharts you should click this button. Data can be in the SEZ file format from ftp://ftp.stockwatch.com.au/pub/sez/pub/sez or Metastock Ascii with Open.
A quick reminder you can limit what gets imported by setting the minimum and maximum code length in the settings form.
For people who want to roll their own data (or convert from some other source) you need to observe one of the following formats
For files which end in SEZ or TXT:
CODE, YYYYMMDD, Open, High, Low, Close, Volume
CODE, YYYYMMDD, Open, High, Low, Close, Volume
(It doesnt matter if there are blank lines between the lines of data.)
Two digit years are also acceptable:
CODE, YYMMDD, Open, High, Low, Close, Volume
For files which end in PRN:
CODE, YYYYMMDD, Open, High, Low, Close, Volume (yes, exactly the same as above)
OR CODE, YYMMDD, Open, High, Low, Close, Volume (same as SEZ)
OR the same data, with tabs separating the values instead of commas.
For files which end in CSV:
First line must contain "Code,Security,Issuer,Date,Open,Close,Low,High,Volume"
Lines must be CR terminated, not CRLF
Data is stored as "AAA","WXA","ACACIA RESOURCES",18-Jun-1999,0.150,0.150,0.150,0.150,120000
Note the date is DD-MM-YYYY.
I will add more data formats as they are described to me. If you have ten years of historical data in some quaint ascii format, just let me know what the first couple of lines look like and I'll add an import routine for you.
A future version of Freecharts will enable user-specified input filters. For now, I suggest you load each file into MS Excel and massage the columns until they match one of the requirements above, then export the page as text. You will have to look at it with Notepad to make sure Excel hasn't added loads of ,,,,,, after each column. If so, load the data back into Excel, highlight all the empty columns to the right of your data and then clear/delete them all, then save out again.
Now for a more datailed example using the ASX and a couple of different data suppliers:
I'm going to use the Australian market as an example, because that's where I live and that's what I use. You can get US data for free from http://www.hooyaya.com/stockdata/oze/index.html. The procedure is the same, but the exact details might be a little different.
Free ASX data is also available from an ftp site at www.stockwatch.com.au. On this site the data is kept in four different formats. Only the SEZ files are suitable for Freecharts. Each daily file on this site is over 250kb because the data includes all warrants as well as untraded stocks and other bits and pieces. Unless you're trading warrants, over 200k of each file is wasted space and if you import them without limiting the maximum code length to '5' in the Settings screen your database will rapidly expand to consume a hundred megs or more of hard drive space. To use the Stockwatch data, just download all the data for the period you want into a temporary folder such as c:\temp\data and then skip down the page to 'The Next Step'
The next step. Whichever of the two methods you used, you will now have a c:\temp\data folder containing dozens of TXT or SEZ files. Run Freecharts and click Settings, then check the minimum and maximum code lengths. Click Apply, then Save, then select Bulk Import. Navigate to c:\temp\data and click OK. The program will begin to update a small status bar under the Bulk Import button with the letter of the stock code it is currently importing. On a slow machine this will tick over like a Sesame Street alphabet song. On a fast machine it will blur. When it's finished your database will contain all the data which was present in the ascii files you originally downloaded.
Now to tidy up. The program will run decidedly faster if you remove a lot of past data. You can go into the settings menu and choose database utilities, enter the data approximately 2 years ago in the 'Erase all prices before this date' box and click the button - after a warning, all that old data will be wiped. Note that the original Ascii files will be untouched, and you can always import the data again if you want it.
I suggest you move all the ascii data files (SEZ or TXT) into a new folder called c:\temp\data\imported, otherwise next time you download and import an end-of-day file you will get the whole lot again, which could take an awfully long time.
A word on database size.
I use a database which contains all the prices for all stocks traded on the ASX during the past 18 months. This database is 32mb in size. If you want to import years and years of data, or if you want to have a database of Dow Jones or Nasdaq stocks, might I suggest that you simply install another copy of the program into a different directory, and use each copy of the program for a different market or decade?
Multiple Databases
I use the ASX which contains 2000 stocks or so. The database file for 18 months of data is 30mb, which is quite manageable, and every now and then I tell it to clear out prices over that age (using the database utilities screen). As far as I know, the Naz has 4500 stocks, and the NYSE has lots more. Combining them into one database would make it very large, and as with anything big databases can take longer to work through. Actually, you'll slow the program down more if you put 3 stocks in with 5 years data than 20000 with 6 months.
Therefore, I suggest you make these folders:
C:\My Documents\Nasdaq
C:\My Documents\NYSE
Then create new shortcuts like this (Give them different names):
(For the Naz)
Target = "C:\Program Files\FChartsPRO\F_ChartsPRO.exe"
Start In = "C:\Program Files\Nasdaq"
(For the NYSE)
Target = "C:\Program Files\FChartsPRO\F_ChartsPRO.exe"
Start In = "C:\Program Files\NYSE"
(Change "C:\Program Files\FChartsPRO\F_ChartsPRO.exe" to match the location of your program file)
If you run the program by double-clicking it will use the default database which is stored with it. If you use either shortcut you will be using the database present in that shortcut's Start In folder.