One of the things I'm keeping in mind when programming the chart layer hit detection is optimization, because when using a hit layer, there's the potential that drawing to the chart takes double the time.
So unless there is a need to isolate particular items drawn to a single layer, the logical conclusion would be to use a single coloured mask. So then the question is, can this be generated from the layer itself, without having to draw all items again?
The answer lies in using the existing colour channels of the layer and use composition and blending modes to create a solid mask. Whether this ends up being faster depends upon the number of items to be drawn to the canvas. So this feature will be only be invoked for layers where there is a large number of items, such as the price history (candles)
However, I may still want to make individual candles selectable, which means I won't be able to use the mask option.
There is no defined formula for the development of this chart. I plan it out as best I can, scrutinizing other charts to infer what solutions that might have been implemented for them. There are no online tutorials for building a fully featured trade chart. So a great deal of trial and error informs the decision making process.
Interestingly, out of developing this chart, I can already see other components or applications I could develop from the technologies pieced together for the chart. But one thing at time. There's still a good deal of work to be done on the chart, but the progress is consistent.