|
OHLC colors |
Posted by Doug on May-19-2014 09:08 |
|
I would like the daily lines to have a different color based on these criteria:
1. One color if a higher high AND a higher low than the previous day.
2. Another color if a higher high OR a higher low (but not both) than the previous day.
3. A third color if neither of the conditions above are true (both high and low are lower than
the previous day).
Is this possible? If so, how you would recommend accomplishing this?
Thanks. |
Re: OHLC colors |
Posted by Peter Kwan on May-20-2014 01:33 |
|
Hi Doug,
For custom coloring, the best method is to use multiple OHLC layers.
For example, in the original "High-Low-Open-Close Chart" sample code, the OHLC symbols
are created by calling XYChart.addHLOCLayer. For your custom coloriing, you can call
addHLOCLayer 3 times. For the first time, the data arrays should contain valid values for
symbols that satisfy your first condition (higher high AND a higher low than the previous
day). For other symbols, please fill them with NoValue. The exact syntax for NoValue
depends on your programming language. Please refer to the "Missing Data Points" sample
code for an example that uses NoValue. You can repeat the same method for the second
condition and the third condition, and this will create the coloring you need.
Hope this can help.
Regards
Peter Kwan |
Re: OHLC colors |
Posted by Doug on May-20-2014 01:59 |
|
Thank you, Peter, I'll give that a try. |
|