home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / finance / tas515dm.zip / EXAMPLES.ZIP / VIDYA.TAS < prev    next >
Text File  |  1992-11-29  |  896b  |  37 lines

  1. { This script plots a VIDYA graph in the top window.
  2.   The bottom window shows the short and long modulation
  3.   for the moving avg.
  4. }
  5. #MAX_QUOTES 350
  6. period = 21;
  7. period2 = 34;
  8. period3 = 55;
  9. div_stdm : array;
  10. div_stdm = div(std(c,period),std(c,period2));
  11. vidyam : array;
  12. vidyam = mov(c,
  13.          int(mulby(
  14.          div_stdm,period2)),
  15.          'e');
  16. div_stdl : array;
  17. div_stdl = div(std(c,period2),std(c,period3));
  18. vidyal : array;
  19. vidyal = mov(c,
  20.          int(mulby(
  21.          div_stdl,period3)),
  22.          'e');
  23. {  if over(vidyam,vidyal)<0 then   }
  24.      gosub dograph;
  25. return
  26. :dograph
  27. opengraph(2,-256,0);
  28. sizegraph(1,1);
  29. graph(1,'price',
  30.   mov(c,period2,'e'),'day EMA',
  31.   vidyam,'VIDYAM ',
  32.   vidyal,'VIDYAL ');
  33. graph(div_stdm,'div_stdm ',
  34.       div_stdl,'div_stdl');
  35. closegraph();
  36. return;
  37.