home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / finance / tas515dm.zip / EXAMPLES.ZIP / TO.TAS < prev    next >
Text File  |  1993-03-14  |  4KB  |  106 lines

  1. {****** TO.TAS  3/9/93  BY LEN BENADE  301-428-3165  ****************}
  2. {Thrust Oscillator}
  3. {     Script based on based on the article by Stuart Meibuhr (Stocks &
  4. Commodities, March '93) describing studies on the Thrust Oscillator (TO)
  5. originally developed by Tushar Chande (Stocks & Commodities, August '92).
  6. The TO is intended to be an improvement the Arms Index, which has a limited
  7. bullish scale ranging from 0 to 1.0 but a theoretically unlimited bearish
  8. scale from 1.0 upwards.  The TO ranges from +1.0 to -1.0.
  9.       The Thrust Oscillator is defined as
  10.             TO = (ADV*UV)-(DEC*DV) / (ADV*UV)+(DEC*DV)
  11.       Where
  12.             ADV = NYSE Advancing Issues
  13.             DEC = NYSE Declining Issues
  14.             UV  = NYSE Up Volume
  15.             DV  = NYSE Down Volume
  16.       Meibuhr describes the use of the TO as a tool for trading the OEX,
  17. focusing on moving averages previously studied by Richard Arms for the TRIN.
  18.  
  19. The 4, 13, and 35 day moving averages are presented as extremely short, 
  20. short, and intermediate term indicators, respectively.  Crossovers of the 
  21. 4 day and 13 day moving averages are offerred as signals with 
  22. trades in the direction of the 13 day average.  
  23. However, confirmation by a second indicator such as a CCI, RS, etc., on 
  24. the OEX suggested.  Short-term tradable tops are signaled
  25. when the 4 day average touches or exceeds +0.5.  Coincident bottoming of the
  26. 4, 13, and 35 day averages can signal an intermediate low.  A downward
  27. crossing of the 0 line by the 35 day average can be an early warning signal.
  28.  
  29. The trend of the 35 day average and any divergence with the OEX should be
  30. noted.  Crossovers of the 21 and 55 day averages can be useful, particularly
  31. crossovers of the 0 line by former and then the latter.  Divergences of 
  32. each from the index should be noted.  
  33. On the rare occasions that the 21 day average has
  34. dropped to -0.3, a significant market bottom has been signaled allowing a
  35. profitable buying opportunity.  Meibuhr points out that the daily Thrust
  36. Oscillator is too "chaotic" for the most part, but notes that one day values
  37. of -0.9 can signal bottoms and that several-day spikes to +1.0 or -1.0 
  38. can be bullish and bearish, respectively.  
  39. To remove the final screen in the script that shows
  40. the daily Thrust Oscillator, just enclose it in curly brackets.
  41.       Each screen with TOs is shown with the index in the bottom graph for
  42. comparison and Bollinger Bands as a second indicator.  The band periods and
  43. widths have been set to roughly correspond to the TO lengths after the 
  44. manner suggested by Bollinger in his Stocks & Commodities article from 
  45. February, 1992.
  46. Consult this article for his recommended trading rules.}
  47. #MAX_QUOTES 200
  48. #index '_OEX'
  49. #OUTPUT_FILE 'TO.LST'
  50. F1 :array;
  51. F2 :array;
  52. F3 :array;
  53. F4 : array;
  54. F5 :array;
  55. m1 : array;
  56. m2 : array;
  57. m3 : array;
  58. m4 : array;
  59. m5 : array;
  60. {I have my NYSE advances, declines, up volume, and down volume in PRO format
  61.  in a
  62. file called UVDV.  You will need to adjust the script to reflect the locatio
  63. n of
  64. this data in your files.  You will probably also have to change the ticker s
  65. ymbol
  66. _OEX above to OEX or whatever you use.}
  67.  
  68. if ticker = 'UVDV' then F2 = H;
  69. if ticker = 'UVDV' then F3 = L;
  70. if ticker = 'UVDV' then F4 = OI;
  71. if ticker = 'UVDV' then F5 = V;
  72. if last_ticker = 0 then return;
  73. F1 := DIV(SUB(MUL(F2,F4),MUL(F3,F5)),ADD(MUL(F2,F4),MUL(F3,F5)));
  74. m1 :=MOV(F1,4,'s');
  75. m2 :=MOV(F1,13,'s');
  76. m3 :=MOV(F1,35,'s');
  77. m4 :=MOV(F1,21,'s');
  78. m5 :=MOV(F1,55,'s');
  79. OpenGraph (2,-75,0);
  80. SizeGraph (1,2);
  81. Graph (m4,'TO, 21 day Moving Average',m5,'TO, 55 day Moving
  82.   Average');
  83. Graph (index,'OEX',bbandt(50,2.5),'BBand Top',
  84.    bbandb(50,2.5),'BBand Bot')
  85. CloseGraph ();
  86. OpenGraph (2,-75,0);
  87. SizeGraph (1,2);
  88. Graph (m1,'TO, 4 day Moving Average',
  89.  m2,'TO, 13 day Moving Average');
  90. DrawLine (4,-10,0.5,0,0.5);
  91. Graph (index,'OEX',bbandt(10,1.5),'BBand Top',
  92.    bbandb(10,1.5), 'BBand Bot');
  93. CloseGraph ();
  94. OpenGraph (2,-75,0);
  95. SizeGraph (1,2);
  96. Graph (m3,'TO, 35 day Moving Average');
  97. Graph (index,'OEX',bbandt(20,2),'BBand Top',bbandb(20,2),
  98.    'BBand Bot');
  99. CloseGraph ();
  100. OpenGraph (2,-75,0);
  101. SizeGraph (1,2);
  102. Graph (F1,'Thrust Oscillator');
  103. Graph (index,'OEX',bbandt(5,1),'BBand Top',bbandb(5,1),
  104.    'BBand Bot');
  105. CloseGraph ();
  106.