 ProEssentials v9 Help .Net Reference

# Common Question 13

## How do I create a High-Low Bar, High-Low-Close, Open-High-Low-Close, or Box Plot (Candle Stick) graph?

These types of graphs actually require multiple subsets to define different aspects of the plotting graphics. When constructing one of these types of graphs, first make sure you are setting the Subsets property to an appropriate value.

 Graph Type Subsets Subset Order High-Low Bar 2 BarStart - BarEnd High-Low-Close 3 LineStart - LineEnd - Close Open-High-Low-Close 4 LineStart - LineEnd - Open - Close Candle-Stick (BoxPlot) 4 LineStart - LineEnd - BoxStart - BoxEnd

You then set PlottingMethod to SpecificPlotMode and also set the SpecificPlotMode appropriately.

For example, if you wanted to produce a High-Low Bar (requires 2 subsets) along with 1 comparison line showing the mid point of each bar.

 Pego1.Subsets = 3 Pego1.Points = 4   Pego1.YData(0, 0) = 100: Pego1.YData(0, 1) = 150 Pego1.YData(0, 2) = 200: Pego1.YData(0, 3) = 250 Pego1.YData(1, 0) = 200: Pego1.YData(1, 1) = 250 Pego1.YData(1, 2) = 300: Pego1.YData(1, 3) = 350 Pego1.YData(2, 0) = 150: Pego1.YData(2, 1) = 200 Pego1.YData(2, 2) = 250: Pego1.YData(2, 3) = 300   Pego1.PlottingMethod = 15 ' 15 = Specific Plot Mode (for Graph) Pego1.SpecificPlotMode = 1 ' 1 = High-Low Bar   Pego1.ComparisonSubsets = 1 ' One comparison subset Pego1.PlottingMethodII = 8 ' Comparison Subset as Points + Line   Pego1.SubsetsToLegend(0) = -1 ' Get rid of subset legend area

The above code produces the following image. Creating an Open-High-Low-Close is just as easy. The changes would be to set Subsets to at least 4, and set SpecificPlotMode = PESPM_OHLC (4). ©2022 Gigasoft, Inc. | All rights reserved. Gigasoft is a registered trademark, and ProEssentials a trademark of Gigasoft, Inc.