home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
finance
/
tas515dm.zip
/
EXAMPLES.ZIP
/
EASEMOVE.TAS
< prev
next >
Wrap
Text File
|
1991-06-15
|
2KB
|
75 lines
{ Ease of Movement - from July '91 Technical Analysis of Stocks and
Commodities. Coded by Jim Camenos - Prodigy # VNGH10A.
This indicator is an oscillator designed to reveal the direction that
a stock or commodity is moving with the least amount of resistance.
First, calculate the midpoint movement (MPM):
MPM = TH+TL - YH+YL
----- -----
2 2
Where TH = Today's High
YH = Yesterday's High
TL = Today's Low
YL = Yesterday's Low
If, for example, yesterday the stock had a high of 32 and a low of 31,
its midpoint would be 31-1/2. If today it had a high of 34 and a low
of 32, then the midpoint would be 33. The midpoint move would be 33
minus 32-1/2, or 1/2.
The next step is to calculate the box ratio. The box is the Equivolume
box, which uses the day's high-to-low-price range for the vertical
axis and the volume for the horizontal axis. Use a number of increments
to represent volume - for example, 10,000 shares equal 1 unit, A 55,000
share day would have 5.5 units. For the height of the box, use 1/8
of a point for 1 unit. If a stock had a high of 24 and a low of
23-1/8, the number of units would be 7 units. Divide the volume
units by the range units for the box ratio.
EMV = Midpoint Move
-------------
Box Ratio
The ease of movement value is:
EMV = 0.05
---------------- = 0.64
(5.5 / 7)
Use a 13-day moving average of the EMV to calculate the ease of
movement oscillator.
}
#max_quotes 14
#output_file 'EASEMOVE.LST'
emva : array;
emvama : array;
x = 1;
:loop
if x < 14 then
gosub ease else
begin
emvama = mov(emva,13,'s');
if emvama > 0 then
ease = ' Least Resistance is UP' else
ease = ' Least Resistance is DOWN';
writeln(ticker,fullname,emvama,ease);
end;
return;
:ease
if v = 0 then return;
mpm = ((h[x]+l[x])/2)-((h[x-1]+l[x-1])/2);
box_ratio_price = (h[x]-l[x])/8;
if v[x] > 1000 then box_ratio_vol = v[x]/1000 or box_ratio_vol = v[x]/100;
emva[x] = (mpm/(box_ratio_vol+box_ratio_price));
x = x+1;
goto loop;
return;