(FILECREATED "10-Nov-86 15:57:53" {QV}<PEDERSEN>LISP>STOCKPLOT.;2 7564   

      previous date: " 3-Nov-86 22:42:10" {QV}<PEDERSEN>LISP>STOCKPLOT.;1)


(* Copyright (c) 1986 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT STOCKPLOTCOMS)

(RPAQQ STOCKPLOTCOMS ((FNS GET-DATE-STRING STOCK-PLOT STOCKPLOT-TICFN STOCKPLOT-TICMETHOD 
			     VOLUME-PLOT)
			(VARS DISPLAYFONTEXTENSIONS STOCKS)))
(DEFINEQ

(GET-DATE-STRING
  [LAMBDA (DATE-LIST)                                        (* edited: "10-Nov-86 15:05")
    (CONCAT (CAR DATE-LIST)
	      " "
	      (L-CASE (CADR DATE-LIST)
			T])

(STOCK-PLOT
  [LAMBDA (PRICES LABEL)                                     (* edited: "10-Nov-86 15:02")
    (LET ((PLOT (CREATEPLOT))
	  (LEFTLABEL "Price")
	  (BOTTOMLABEL "Date")
	  DATES)
         (SETQ DATES
	   (for DATUM in PRICES as X-RIGHT from .25 by 1.0 as X-MID from .5
	      by 1.0 as X-LEFT from .75 by 1.0 when (CADR DATUM)
	      collect (LET ((DATE (CAR DATUM))
			      (LOW (CADR DATUM))
			      (CLOSING (CADDR DATUM))
			      (HIGH (CADDDR DATUM))
			      OBJECT)
			     (SETQ OBJECT (PLOTCOMPOUND PLOT (QUOTE RANGE)
							    (CREATECURVE (LIST (CREATEPOSITION
										     X-MID HIGH)
										   (CREATEPOSITION
										     X-MID LOW)))
							    (CREATECURVE (LIST (CREATEPOSITION
										     X-RIGHT CLOSING)
										   (CREATEPOSITION
										     X-LEFT CLOSING)))
							    (GET-DATE-STRING DATE)
							    NIL T))
			 DATE)))
         (PLOTPROP PLOT (QUOTE N)
		     (LENGTH PRICES))
         (PLOTPROP PLOT (QUOTE DATES)
		     DATES)
         (PLOTTICS PLOT (QUOTE BOTTOM)
		     T T)
         (PLOTTICS PLOT (QUOTE LEFT)
		     T T)
         (PLOTLABEL PLOT (QUOTE BOTTOM)
		      BOTTOMLABEL T)
         (PLOTLABEL PLOT (QUOTE LEFT)
		      LEFTLABEL T)
         (PLOTLABEL PLOT (QUOTE TOP)
		      LABEL T)
         (PLOTTICFN PLOT (QUOTE X)
		      (FUNCTION STOCKPLOT-TICFN)
		      T)
         (PLOTTICMETHOD PLOT (QUOTE BOTTOM)
			  (FUNCTION STOCKPLOT-TICMETHOD)
			  T)
         (RESCALEPLOT PLOT (QUOTE Y)
			T)
         (OPENPLOTWINDOW PLOT)
     PLOT])

(STOCKPLOT-TICFN
  [LAMBDA (MIN MAX)
    (LET ((INTMAX (PLOT.CEILING MAX))
	  (INTMIN (PLOT.FLOOR MIN)))
         (create TICINFO
		   TICMIN ← INTMIN
		   TICMAX ← INTMAX
		   TICINC ← 1.0
		   NTICS ←(DIFFERENCE INTMAX INTMIN])

(STOCKPLOT-TICMETHOD
  [LAMBDA (MARGIN PLOTSCALE PLOT)                            (* edited: "10-Nov-86 15:03")
    (LET* [(DATES (PLOTPROP PLOT (QUOTE DATES)))
	   (N (PLOTPROP PLOT (QUOTE N)))
	   (SKIP (TIMES 5 (QUOTIENT N 20]
          (for DATE in DATES as X from .5 by 1.0 as I from 0
	     when (EQ (IREMAINDER I 5)
			  0)
	     collect (if (EQ (IREMAINDER I SKIP)
				   0)
			   then (CONS X (GET-DATE-STRING DATE))
			 else (CONS X NIL])

(VOLUME-PLOT
  [LAMBDA (PRICES LABEL)                                     (* edited: "10-Nov-86 15:30")
    (LET ((PLOT (CREATEPLOT))
	  (LEFTLABEL "Volume")
	  (BOTTOMLABEL "Date")
	  DATES)
         (SETQ DATES (for DATUM in PRICES as X-MID from .5 by 1.0 when (CADR DATUM)
			  collect (LET ((DATE (CAR DATUM))
					  (VOLUME (CADR (CDDDR DATUM)))
					  OBJECT)
				         (SETQ OBJECT (PLOTCURVE PLOT (LIST (CREATEPOSITION
										    X-MID VOLUME)
										  (CREATEPOSITION
										    X-MID 0.0))
								     (GET-DATE-STRING DATE)
								     2 NIL T))
				     DATE)))
         (PLOTPROP PLOT (QUOTE N)
		     (LENGTH PRICES))
         (PLOTPROP PLOT (QUOTE DATES)
		     DATES)
         (PLOTTICS PLOT (QUOTE BOTTOM)
		     T T)
         (PLOTTICS PLOT (QUOTE LEFT)
		     T T)
         (PLOTLABEL PLOT (QUOTE BOTTOM)
		      BOTTOMLABEL T)
         (PLOTLABEL PLOT (QUOTE LEFT)
		      LEFTLABEL T)
         (PLOTLABEL PLOT (QUOTE TOP)
		      LABEL T)
         (PLOTTICFN PLOT (QUOTE X)
		      (FUNCTION STOCKPLOT-TICFN)
		      T)
         (PLOTTICMETHOD PLOT (QUOTE BOTTOM)
			  (FUNCTION STOCKPLOT-TICMETHOD)
			  T)
         (RESCALEPLOT PLOT (QUOTE Y)
			T)
         (OPENPLOTWINDOW PLOT)
     PLOT])
)

(RPAQQ DISPLAYFONTEXTENSIONS (DISPLAYFONT AC))

(RPAQQ STOCKS (((14 jul)
		  750 740 738 121)
		 ((15 jul)
		  741 721 716 171)
		 ((16 jul)
		  736 724 718 160)
		 ((17 jul)
		  731 725 719 129)
		 ((18 jul)
		  734 728 716 150)
		 ((21 jul)
		  728 720 718 104)
		 ((22 jul)
		  731 730 717 139)
		 ((23 jul)
		  737 727 721 137)
		 ((24 jul)
		  730 714 709 138)
		 ((25 jul)
		  726 721 711 136)
		 ((28 jul)
		  725 713 710 128)
		 ((29 jul)
		  724 710 706 118)
		 ((30 jul)
		  728 719 706 143)
		 ((31 jul)
		  726 717 710 114)
		 ((1 aug)
		  727 713 708 116)
		 ((4 aug)
		  718 708 697 130)
		 ((5 aug)
		  721 710 702 151)
		 ((6 aug)
		  712 709 703 127)
		 ((7 aug)
		  723 715 707 122)
		 ((8 aug)
		  720 712 708 108)
		 ((11 aug)
		  724 721 710 124)
		 ((12 aug)
		  732 731 719 130)
		 ((13 aug)
		  752 748 731 158)
		 ((14 aug)
		  759 752 747 123)
		 ((15 aug)
		  761 754 750 122)
		 ((18 aug)
		  758 752 747 115)
		 ((19 aug)
		  753 743 739 114)
		 ((20 aug)
		  754 751 742 159)
		 ((21 aug)
		  763 758 757 137)
		 ((22 aug)
		  765 761 754 119)
		 ((25 aug)
		  770 761 752 102)
		 ((26 aug)
		  781 772 760 158)
		 ((27 aug)
		  788 781 771 146)
		 ((28 aug)
		  785 778 772 122)
		 ((29 aug)
		  781 771 770 123)
		 ((1 sep)
		  NIL NIL NIL NIL)
		 ((2 sep)
		  776 759 758 139)
		 ((3 sep)
		  772 770 756 157)
		 ((4 sep)
		  791 790 770 188)
		 ((5 sep)
		  791 777 775 180)
		 ((8 sep)
		  787 777 768 153)
		 ((9 sep)
		  789 782 772 139)
		 ((10 sep)
		  788 782 776 140)
		 ((11 sep)
		  780 749 742 239)
		 ((12 sep)
		  752 738 723 240)
		 ((15 sep)
		  748 740 730 158)
		 ((16 sep)
		  741 739 728 130)
		 ((17 sep)
		  757 746 738 140)
		 ((18 sep)
		  775 766 757 133)
		 ((19 sep)
		  783 780 759 152)
		 ((22 sep)
		  787 784 773 123)
		 ((23 sep)
		  799 795 781 129)
		 ((24 sep)
		  804 791 784 131)
		 ((25 sep)
		  797 783 773 131)
		 ((26 sep)
		  792 783 775 118)
		 ((29 sep)
		  793 789 778 119)
		 ((30 sep)
		  818 800 790 122)
		 ((1 oct)
		  824 813 805 143)
		 ((2 oct)
		  821 812 807 124)
		 ((3 oct)
		  823 811 808 125)
		 ((6 oct)
		  828 821 809 88)
		 ((7 oct)
		  829 818 815 122)
		 ((8 oct)
		  834 828 817 142)
		 ((9 oct)
		  838 826 822 156)
		 ((10 oct)
		  830 824 818 124)
		 ((13 oct)
		  831 829 818 55)
		 ((14 oct)
		  841 827 822 117)
		 ((15 oct)
		  840 836 827 144)
		 ((16 oct)
		  843 828 827 158)
		 ((17 oct)
		  831 822 817 123)
		 ((20 oct)
		  822 814 806 110)
		 ((21 oct)
		  822 816 806 111)
		 ((22 oct)
		  823 817 812 117)
		 ((23 oct)
		  834 829 817 149)
		 ((24 oct)
		  835 824 820 139)
		 ((27 oct)
		  832 827 819 131)
		 ((28 oct)
		  840 834 826 144)
		 ((29 oct)
		  846 839 830 164)
		 ((30 oct)
		  850 835 829 194)
		 ((31 oct)
		  841 839 826 143)
		 ((3 nov)
		  843 841 831 138)
		 ((4 nov)
		  849 844 836 162)
		 ((5 nov)
		  856 849 839 182)))
(PUTPROPS STOCKPLOT COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (414 4616 (GET-DATE-STRING 424 . 633) (STOCK-PLOT 635 . 2387) (STOCKPLOT-TICFN 2389 . 
2642) (STOCKPLOT-TICMETHOD 2644 . 3200) (VOLUME-PLOT 3202 . 4614)))))
STOP