//supply defaults for parameters if not given
#setifnotgiven CERTNAME = " " 
 
#proc getdata
file: quant.dat

#proc areadef
title: Quantitative Analysis Chart @CERTNAME

//titledetails: align=C size=14 adjust=0,.3
titledetails: size=18 align=C color=black style=R adjust=0,0.3
xscaletype: date yymmdd
rectangle: 1 1 7 4
yrange: 0 100
xautorange: datafield=1
#saveas A

#proc bars
locfield: 1
lenfield: 5
color: skyblue
outline: no
barwidth: 0.1
hidezerobars: yes
legendlabel: Caution Area 

#proc lineplot
xfield: 1
yfield: 3
linedetails: color=green width=1
legendlabel: Quantitative Analysis Line

#proc lineplot
xfield: 1
yfield: 4
linedetails: color=orange width=1
legendlabel: Closing Price Line

#proc areadef
#clone A
// need to use nearest=exact to eliminate suppress margins at max and min..
yautorange: datafields=2 nearest=exact
#endproc

// now find the nearest round multiple of 2 so we can begin placing Y axis tics there
#set YMIN = $numgroup( @YMIN, 2, high )

#proc yaxis
stubs: inc
stubrange: @YMIN
label: Market Prices
labeldetails: adjust=-0.2,0 

#proc xaxis
stubs: inc 1 month
//stubformat: Mmm