Moved from general forum thread:
http://www.jsoftware.com/pipermail/general/2008-November/032550.html

I haven't been able to find a symbol/font combination that does a better job of 
creating the horizontal lines to mark the open & close. As you note below, the 
current symbols (Box drawings light down and left, light down and right) will 
cause problems if the open or close value equals or is close to the low value 
(which, as Henry points out, is all too frequently the case currently!)

The following is not as clean, but will not give "incorrect" results in some 
cases:

plot_ohlc3=: 3 : 0
 ''plot_ohlc3 y
:
 hl=. 1 2{y
 oc=. 0 3{y
 ntics=. {:$hl
 pd 'reset'
 pd 'xticpos ',": i.ntics
 pd 'pensize 3'
 pd 'symbolfont Arial 11'
 pd x
 pd 'color green,red'
 pd 'type symbol'
 pd 'symbols ',u: 9658 9668
 pd oc
 pd 'color blue'
 pd 'type hilo'
 pd hl
 pd 'show'
)

--- Tom wrote:
> Pretty close.  A little undershoot on the second day's low from the
> close symbol, but really close on my system's rendering.

> Sherlock, Ric wrote:
> > The following version using symbols looks quite good on Windows.
> >
> > plot_ohlc2=: 3 : 0
...
> >)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to