Here's an example of an OHLC chart:
http://www.amcharts.com/stock/ohlc-chart/ .
I see how this is an attempt at something like this but the data doesn't
make sense as the first entry has a closing price lower than the low price.

On Thu, Nov 20, 2008 at 10:46 PM, Sherlock, Ric
<[EMAIL PROTECTED]>wrote:

> ---Tom wrote:
> > Does anybody know if plot can do OHLC (open/high/low/close) style
> > charting?  I see it can do high/low, but not OHLC.
>
> Not out of the box, but you can pretty easily make a custom plot to do the
> job.
> This one is a start but could be improved.
>
> plot_olhc=: 3 : 0
>  ''plot_olhc y
> :
>  hl=. 1 2{y
>  oc=. 0 3{y
>  ntics=. {:$hl
>  oc=. ,|:oc
>  oc=. (2#i.ntics);oc
>  pd 'reset'
>  pd 'xticpos ',": i.ntics
>  pd x
>  pd 'type line'
>  pd oc
>  pd 'type hilo'
>  pd 'color red'
>  pd hl
>  pd 'show'
> )
>
> NB. Example data
> data=: 0".> <;._2 ] 0 : 0
> 71.93 72.99 73.32 71.89 73.86
>   72    73  73.6  72.2  74.3
>  71.5 72.25  73.2  71.8  73.2
>   71    72    73    72    73
> )
>
> Note 'examples'
>  plot_olhc data
>  'color red;pensize 2' plot_olhc data
>  'xlabel Feb Mar Apr May Jun' plot_olhc data
> )
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to