home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / finance / tas515dm.zip / EXAMPLES.ZIP / EASEMOVE.TAS < prev    next >
Text File  |  1991-06-15  |  2KB  |  75 lines

  1. { Ease of Movement - from July '91 Technical Analysis of Stocks and
  2.   Commodities.  Coded by Jim Camenos - Prodigy # VNGH10A.
  3.  
  4.   This indicator is an oscillator designed to reveal the direction that
  5.   a stock or commodity is moving with the least amount of resistance.
  6.  
  7.   First, calculate the midpoint movement (MPM):
  8.  
  9.                 MPM = TH+TL  - YH+YL
  10.                       -----    -----
  11.                         2        2
  12.  
  13.   Where   TH = Today's High
  14.           YH = Yesterday's High
  15.           TL = Today's Low
  16.           YL = Yesterday's Low
  17.  
  18.   If, for example, yesterday the stock had a high of 32 and a low of 31,
  19.   its midpoint would be 31-1/2.  If today it had a high of 34 and a low
  20.   of 32, then the midpoint would be 33.  The midpoint move would be 33
  21.   minus 32-1/2, or 1/2.
  22.  
  23.   The next step is to calculate the box ratio.  The box is the Equivolume
  24.   box, which uses the day's high-to-low-price range for the vertical
  25.   axis and the volume for the horizontal axis.  Use a number of increments
  26.   to represent volume - for example, 10,000 shares equal 1 unit,  A 55,000
  27.   share day would have 5.5 units.  For the height of the box, use 1/8
  28.   of a point for 1 unit.  If a stock had a high of 24 and a low of
  29.   23-1/8, the number of units would be 7 units.  Divide the volume
  30.   units by the range units for the box ratio.
  31.  
  32.                 EMV = Midpoint Move
  33.                       -------------
  34.                         Box Ratio
  35.  
  36.   The ease of movement value is:
  37.  
  38.                 EMV =       0.05
  39.                       ----------------    = 0.64
  40.                          (5.5 / 7)
  41.  
  42.   Use a 13-day moving average of the EMV to calculate the ease of
  43.   movement oscillator.
  44.  
  45. }
  46. #max_quotes 14
  47. #output_file 'EASEMOVE.LST'
  48. emva  : array;
  49. emvama : array;
  50.  
  51. x = 1;
  52. :loop
  53. if x < 14 then
  54.   gosub ease else
  55.   begin
  56.   emvama = mov(emva,13,'s');
  57.   if emvama > 0 then
  58.      ease = '  Least Resistance is UP' else
  59.      ease = '  Least Resistance is DOWN';
  60.   writeln(ticker,fullname,emvama,ease);
  61.   end;
  62. return;
  63.  
  64. :ease
  65. if v = 0 then return;
  66. mpm = ((h[x]+l[x])/2)-((h[x-1]+l[x-1])/2);
  67. box_ratio_price = (h[x]-l[x])/8;
  68. if v[x] > 1000 then box_ratio_vol = v[x]/1000 or box_ratio_vol = v[x]/100;
  69. emva[x] = (mpm/(box_ratio_vol+box_ratio_price));
  70. x = x+1;
  71. goto loop;
  72.  
  73. return;
  74.  
  75.