LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating an OHLC chart with LabVIEW?

I was wondering if anyone knows how, or if it is even possible, to create an OHLC financial stock chart for LV? For those who do not know, OHLC data consists of a number of time "ticks", each one containing the open, high, low, and closing price of stocks/options/future/forex/etc.
Normally this data is displayed in a fashion that looks like this (image linked for dialup users): http://img90.imageshack.us/img90/7858/nati11012008mp2.png


I know I can make a regular chart that contains a bunch of points, but is there any way to make something like this? Thanks!
0 Kudos
Message 1 of 4
(3,236 Views)
You could plot things onto a picture control.

Check out the Artificial Strip Chart.VI example (LabVIEW 7.1) for starters.



Message Edited by Conseils on 01-12-2008 10:28 AM
0 Kudos
Message 2 of 4
(3,220 Views)
Altough Conseils suggestion to use a picture control for this, is valid, you
can draw this kind of data in an XY Graph. You need to make a plot for each
color (, one red, one yellow in the picture you've attached).

Then you need to parse the input data so it shows ok in the plot.

The color the data should have places the points in plot one or two. Then
you need to add points so the lines have those nice horizontal lines comming
in and out of the vertical lines. For instance, draw a line through points
(1,5), (2,5) incomming horizontal line; (2,10) line to top of vertical;
(2,1) line to bottom of vertical line; (2,2), (3,2) outgoing horizontal
line.

Do this for each set of data (I have no idea how this data is organised).
Between each line, you need to put a NaN, so LV doesn't connect the data.

Regards,

Wiebe.


0 Kudos
Message 3 of 4
(3,179 Views)
If you want to use a picture control, you can also use the new picture
overlays that are new in 8.2 (8.0?).

Create a new property node of a graph (not a chart!). Look for Picture
Overlay (or something) submenu. It has three pictures that you can write to,
Back, Middle and Front. You can draw to each one of them.

The picture graphs shipped with LabVIEW are really a set of VI's, and you
can't modify them easilly, because they are used by all the picture graph
VI's. So you need to save each VI you modify under another name, and that
gets old soon. Also, they aren't always very easy to understand.

When you use the overlay pictures, you don't need to draw your own scales.
Drawing the scales are about 90% of the entire graph drawing... You can even
read out user changes to the scales, and update the picture that is drawn!
That way, you can display any kind of data inside a normal graph.

Regards,

Wiebe.


0 Kudos
Message 4 of 4
(3,179 Views)