Macro commands may be used either in macros or by sending the commands to DPlot via dynamic data exchange (DDE). Some commands are valid only in macros (noted by Macros Only). Commands sent to DPlot via DDE must be enclosed by square brackets [ ]. Macro commands should not include the brackets.
Command parameters shown in the descriptions below are placeholders for the actual values. Command parameters are either numeric values, equations that evaluate to numbers, or character strings. Character string parameters are always bound by double quotation marks. Equations must be preceded by an equals sign (=).
The pipe symbol (|) in the command syntax indicates that a parameter is optional, and should not be included in your macro unless otherwise noted.
All indices into arrays are 1-based, e.g. Curve1=1 refers to the first curve in a plot.
A 0x prefix for numbers in the descriptions below indicates hexadecimal notation; e.g. 0x0010 = 16.
JR/Viewer indicates that the command is supported by DPlot Jr or DPlot Viewer.
JR/Viewer indicates that the command is NOT supported by DPlot Jr or DPlot Viewer.
[OHLC(open,high,low,close,options,color1,color2)] |
JR Viewer |
Creates an open-high-low-close (OHLC) chart with the Open values taken from the 1-based open index, the High values from curve high, the Low values from curve low, and the Close values from curve close. The X values (normally dates) of the open curve will be used on the result, and the X values from the high, low, and close curves are ignored. That is, the n'th value from the high curve is used as the n'th High value for the Open curve, regardless of the actual high X values.
options is a combination of the following bits:
1 |
Use color1 for close prices greater than or equal to open prices, or color2 for close prices less than open prices. If not set, use the color associated with the open curve. |
16 |
None of open, high, low, or close indices may be the same. If any of the open, high, low, or close indices do not exist, then this command does nothing. If any of the open, high, low, or close curves are subsequently erased, then the OHLC settings for the open curve are erased.
Colors are in the form blue*65536+green*256+red, where blue, green, and red are between 0 and 255, inclusive. Colors may be specified in hexadecimal notation with a '0x' prefix. For example 0x00FFFF00 is cyan (blue=255, green=255, red=0).
To turn off the OHLC setting for the open curve, use the OHLC command again with any of high, low, or close indices set to 0.
____________________________
See also
OHLC Chart menu command
Page url:
https://www.dplot.com/help/index.htm?ohlccommand.htm