You are on page 1of 4

Stocks & Commodities V. 4:2 (47-49): An ultimate oscillator program for the HP-41C(V) by Charles F.

Johnson

An ultimate oscillator program for the


HP-41C(V)
by Charles F. Johnson

Relative strength and related types of indicators have long been used by the investment community to
reveal potential overbought and oversold levels of price movements. In oscillator form, such indicators
can sometimes be helpful in predicting a change in direction of price movement. Divergences between a
properly designed oscillator and the price of the stock or commodity may have predictive value at "tops"
and "bottoms" of price movements. Obviously, such indicators are not the sole basis for an investment or
trading decision.
In the August, 1985 issue of Technical Analysis of Stocks & Commodities magazine, Larry Williams
outlined an "Ultimate Oscillator." (The October, 1985 issue contained an addendum to the method of
computation on page 6 under "Correction.") In this article and in the brief note in the October, 1985
issue, the computation of the oscillator is discussed. This oscillator uses "buying units" and "total
activity." The change in buying units (BU) in relation to the level of total activity (TA) results in
overbought (top) or oversold (bottom) conditions.
Short-, intermediate-, and long-term trends all interact to create a top or bottom in price movement.
Oscillators which have input from all these trends should at times be more reliable than those oscillators
based on 7, 14, and 28-day time periods. A description of the oscillator as well as rules for its use are
contained in the August, 1985 issue of Stocks & Commodities.
The HP-41C(V) is the expanded memory version of the HP-41C. Continuous memory facilitates the
storage of data and programs without manually reentering them for each use. Programs and data can be
stored on magnetic cards, cassette, or even EPROM, through the use of peripherals. The 130 HP-41C(V)
functions and Reverse Polish Notation (RPN) make it an ideal choice for programs with multiple routines.
The program listing (Figure 1) enables you to key the program into the 41C(V) memory (refer to
manufacturer's manual for details of operation).
Programs and data can be saved on magnetic cards for future use with a card reader that attaches to the
top of the unit. Either one of the two types of thermal printers available for the system may be used to
provide a "hard copy" of the data input and oscillator output.
After the program has been loaded into the machine, press the R/S key. You will then see a statement of
the data register "size" required (refer to the manual) and a prompt for "contract" This is the name of the
stock or commodity. After keying in the contract, press the R/S key, and after a short delay a prompt for
the date will appear. Use the sample in this article (Figure 2) as a suggested format for the date. Pressing
the R/S key results in a prompt for "high," "low," and "close" in sequence.
If the program is already resident in the machine, or if after you have loaded it you want to update the
data already saved on magnetic cards, press the "G" key. You are then prompted for input of cards into
the card reader. When this is completed, the database has been loaded into memory and "DATA
LOADED" appears in the viewscreen and is printed by the thermal printer.
To update a database, you press the "A" key. This results in prompting for input of the date, high, low,

Article Text Copyright (c) Technical Analysis Inc. 1


Stocks & Commodities V. 4:2 (47-49): An ultimate oscillator program for the HP-41C(V) by Charles F. Johnson

FIGURE 1:

FIGURE 2:
Stocks & Commodities V. 4:2 (47-49): An ultimate oscillator program for the HP-41C(V) by Charles F. Johnson

and close. After data input is complete, there will be a prompt for corrections.
If any changes are to be made, press the "B" key and the date and data input prompts will appear again. If
no corrections are necessary, press R/S and the computations will be carried out by the computer. After a
short time there will be a printout of the 1-, 7-, 14-, and 28-day values of the "buying units" (BU) and
"total activity" (TA), as well as the values of the 7-, 14-, and 28-day oscillators. The final value given is
that of the "ultimate oscillator."
After completion of the output, you will more than likely want to store the output values on magnetic
cards. Press "D" and prompts for magnetic cards appear. After recording the cards, "DATA STORED"
appears in the viewscreen and is printed by the printer. The program then automatically turns off the
machine. The printer must be turned off manually. The data storage subroutine of the program is
designed to use magnetic cards which are "write-protected" (refer to the card reader manual). In other
words, you can write-protect your cards and data can still be stored on them under program control, but
the cards cannot be accidentally overwritten by turning on the unit and running the cards through the card
reader.
It should be noted that in order to run this program, the machine must be in the "User" mode. This key is
located next to the On/Off key. If it is not, you will not be able to directly access the subroutines from the
keyboard with a single stroke. Also, the full database of 28 days must be initialized before any printout
will occur. This means that you will have to enter 28 days of data before you will start to get output of
any of the oscillator values.
Following the program listing is a sample program output to demonstrate its format. The program listing
is provided for those interested in doing their own programming. I will provide copies of the program on
magnetic cards for a nominal fee.
The "Ultimate Oscillator" programmed for the HP-41C(V) is available on magnetic cards for $50 per set,
postpaid, U.S. funds. Requests to: "Investment Program" 489 Wayland Ave., Providence, RI 02906
Dr. Johnson is an actively practicing plastic surgeon. He received his B.A. from Princeton (1960) and
graduated from Johns Hopkins School of Medicine in 1964.

The ultimate oscillator on Tradeplan


by Bob Wittmuss

When I read Larry Williams' article entitled "The Ultimate Oscillator" in the August issue of Stocks &
Commodities magazine, I recognized its wisdom, having experienced the shortcomings of a traditional
RSI. I had experimented with using an average of three different time period RSIs so this looked like
what I was trying to accomplish. I used six, 12, and 24 time periods on an Intra day, 15 min S&P.
Line one (maximum--Figure 1) defines lesser of previous close or current high. Likewise, line two
(minimum) defines lesser of previous close or current low. Subtracting the two gives line three (the
range).
Line four (buy units) is current close minus the minimum from above. By subtracting the downside price
movement the upside is left.
The rest of the formula is simply totaling sums of buying, (for six, 12 and 24 periods) and dividing them

Article Text Copyright (c) Technical Analysis Inc. 2


Stocks & Commodities V. 4:2 (47-49): An ultimate oscillator program for the HP-41C(V) by Charles F. Johnson

by sums of ranges, for six, 12 and 24 periods. The answer to six periods is multiplied by two and the 24
period answer is divided by two to give equal weight to each RSI. This differs from the article somewhat.
Finally, the three RSIs are averaged to get ("the #") the ultimate oscillator.
I added a moving average of the oscillator and plotted both together under a bar chart. The result is a
chart that shows the divergence as illustrated in the original article and some additional buy and sell
signals as the oscillator and its moving average crisscross. A useful chart and all automatic now, due to
the marvels of modern technology.

Copyright (c) Technical Analysis Inc. 3

You might also like