ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  OHLC Stock Chart settings
Posted by Chuck on Sep-18-2019 23:22
Hello,

For this example: https://www.advsofteng.com/doc/cdnet.htm#hloc.htm

1. Can the current orientation Left to Right be changed to Right To Left? Where the current date is on the Right and historical dates are on the Left?
2. How is the length/width of the Open and Close mark set?

Thank you,
Chuck

  Re: OHLC Stock Chart settings
Posted by Peter Kwan on Sep-20-2019 00:12
Hi Chuck,

1. You can use Axis.setReverse to reverse the x-axis, so that it flows from right to left. Note that for a OHLC symbol, the closing price is a segment on the right, and the opening price is the segment on the left. If you want to reverse OHLC symbol shape as well, please swap the arrays for the open price and the close price.

https://www.advsofteng.com/doc/cdnet.htm#Axis.setReverse.htm

2. The horizontal space reserved for each OHLC symbol is simply the plot area width divided by the number of symbols. By default, all of that space is used by the OHLC symbol. You can reduce the space by using BaseBoxLayer.setDataGap or just specify the symbol width in pixels by using BaseBoxLayer.setDataWidth.

https://www.advsofteng.com/doc/cdnet.htm#BaseBoxLayer.setDataGap.htm
https://www.advsofteng.com/doc/cdnet.htm#BaseBoxLayer.setDataWidth.htm

The OHLC symbol shape is subjected to the constrain that it must be symmetrical, that is, the the length of the opening and closing segments must be the same. Also, the length of symbol and all the segments must be an integral number of pixels, and the lengths of all the symbols must be the same. (Eg, we cannot have one symbol with a longer opening segment than that of the other symbol.) If this is not possible, then ChartDirector can reduce the space of the symbol or lengths of the segment to make it possible.

For example, if the plot area width is 101 pixels, and there are 10 symbols, then one of the symbols must be 11 pixels wide and is therefore wider than the other symbols. In this case, ChartDirector will shorten the symbol to 10 pixels wide, which means there can be a one pixel gap somewhere between two symbols.

Regards
Peter Kwan

  Re: OHLC Stock Chart settings
Posted by Chuck on Sep-20-2019 01:05
Thank you Peter this is very helpful (great detail)
Best,
Chuck


hausfrauen porno tube