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

  1. { EVO.TAS
  2.    This script will calculate the Elphick Volume Oscillator (EVO)
  3.    -----------------------------------------------------
  4.    To run this, you should have a ticker file containing
  5.    only NYSE Up Vol, NYSE Dn Vol, and NYSE Total Vol
  6.    I keep my NYSE Up & Dn Vol in separate ticker files in
  7.    the CLOSE field and the NYSE Total Vol is the VOL field
  8.    of my NYSE Composite.        
  9.    -----------------------------------------------------
  10.    Calculate EVO as 
  11.         CVI = cumulative sum of (up vol-down vol)/total vol
  12.         EVO = (3 day EMA of CVI - 10 day EMA of CVI) * 100
  13. }
  14. #output_file evo.lst
  15. NYUPname = 'SPNU';      { Change to your NYSE UP Vol ticker}
  16. NYDNname = 'SPND';      { Change to your NYSE DN Vol ticker}
  17. NVOLname = 'NYSE';      { Change to your NYSE Total Volume}
  18. NYUP : ARRAY;           { Up Vol}
  19. NYDN : ARRAY;           { Dn Vol}
  20. NVOL : ARRAY;           { Total Vol}
  21. NYSE : ARRAY;           { NYSE Comp}
  22. VLdiff : ARRAY;         { Up - Dn}
  23. CVI    : ARRAY;         { Cum Vol Index}
  24. EVO    : ARRAY;         { EVO goes here}
  25. if ticker = NYUPname then   
  26.    NYUP = C;                    { Up Vol in the CLOSE field}
  27. if ticker = NYDNname then
  28.    NYDN = C;                    { Dn Vol in the CLOSE field}
  29. if ticker = NVOLname then
  30. begin
  31.    NVOL = V;                    { Total Vol in the VOLUME field}
  32.    NYSE = C;                    { Save for graph}
  33. end;
  34. if last_ticker = 0 then return;  
  35. VLdiff = DIV(SUB(NYUP,NYDN),NVOL);   { (UP - DN)/TOTAL}
  36. CVI = CUM(VLdiff);
  37. EVO = SUB(MOV(CVI,3,'E'),MOV(CVI,10,'E')); {10ema-3ema}
  38. EVO = MULBY(EVO,100);   { EVO * 100}
  39. {At this point, the EVO and CVI are computed and held in arrays
  40.  EVO and CVI. Let's graph them under NYSE Composite}
  41. OPENGRAPH(3);  { Start 3 graphs}
  42. GRAPH(NYSE,'NYSE Composite');
  43. GRAPH(CVI,'Cumulative Volume Index');
  44. GRAPH(EVO,'Elphicks Volume Oscillator');
  45. CLOSEGRAPH();
  46. WRITELN('Cumulative Volume Index(CVI) for ',DATE,' is ',CVI);
  47. WRITELN('Elphicks Volume Oscillator(EVO) for ',DATE,' is ',EVO);
  48.  
  49.