Make Your PC Do the Math - Part I

Saturday, 3 January 2009


To speed up all the calculations, I wrote a program to help me create a trade. It gives me all the numbers we saw being used in the last chapter in just a fraction of the time it would take by longhand.

So that’s what we’re going to do in this chapter. You’re not only going to learn how to program the indicators but perhaps learn a new language as well: QBasic.

To start, please bear with me because I’m going to be very detailed about how to proceed. I’m not a computer nerd but I know computers are, as Yogi Berra, irreverent catcher for the New York Yankees might say.

So, if I sound like I'm being too picky you’ll understand why. If I can understand it so can you.

The first thing you must do is determine what OS (operating system) you are using on your computer. You probably know that already, but if not go to Start, My Computer,Help, About Windows, or simply View system information. A window will tell you ifyou have Windows 95, 98, or XP. I have XP Home.

If you’ve purchased a computer in the last 3-4 years it probably came installed with Windows XP. In any case, if you want to quickly find out if QBasic is installed on your computer go to Start=>Search and type in QBasic.

If you're running Windows 95/98 you probably already have all the tools you need right on your computer. Bundled in the DOS software is an application called QBasic. It used to be a plain language way of writing programs to mostly play games with.

But it also works to crunch numbers for people like us. I use it constantly and believe me it saves a lot of time.

Unfortunately, when Microsoft came out with OS’s that don’t use the Disk Operating System (DOS) – such as Windows XP and Vista – they dropped QBasic.

If you don’t have QBasic then you must download it from the internet. There are a number of web sites where you can download QBasic.

 The one I like is at www.geocities.com/area51/5967/qbasic.html

Before going there you might want to click on http://www.libertybasic.com/qbwindowsfaq.html which will provide you with more details about using QBasic with Windows.

Before you can download the program you must tell your computer you want to download a program into DOS (actually text-based, command-line functions).

If you have Win XP you do that by going to Start =>All Programs=>Accessories, and click on Command Prompt. A window will appear something like this:

C:\Documents and Settings\Owner>

Type cd\ then hit Enter and you should get the C prompt like this: C:\>

At the C prompt type md qbasic and hit enter. Like this C:\>md qbasic

What you are doing is creating a folder to download qbasic into. It won’t work in the normal Windows environment. But don’t worry, that’s no problem.

Next, go to the download website: www.geocities.com/area51/5967/qbasic.html and go down to the box labeled “Download Qbasic 1.1" and right click on the box.

Select “Save Target As . .” and left click on it. You want to save the download into the directory you’ve just made: C:\qbasic That way you’ll be able to open and use the program.

To do that simply select the C: drive and click on qbasic. That’s where the program will download into.

After the download is complete click on Run or go into the folder C:\qbasic, and open the file olddos.exe. You should see a msg. like this:

Make sure you see the file named C:/qbasic/olddos.exe as above and type Y

The program is now ready to use. You simply go to the command prompt as above, type cd\qbasic, then qbasic like this C:\qbasic>qbasic and hit Enter. You can make a “shortcut” on your desktop of the command prompt if you like.

Once you hit Enter a large window will appear that tells you that you're in the program. Press the Esc button to clear the screen. You’re now ready to program your computer to do the work for you.

0 comments: