I would like to create a custom drawing tool, a variant of "Line". My line is supposed to anchor to a specific bar and price and then go horizontally all the way to the right only (not the left, as "horizontal line" does). So the line has only a single anchor. I will then make the line display some additonal information attached to it.
After looking through the Line.cs file, I am unsure of how to go about creating a new "MyLine" tool. It seems that all chart line types derive from the Line class, but the actual mechanics of each line is not coded into the derived classes, but into the Line class itself. The selection of available line types is a hardcoded enum within Line.
Other than copying the whole file and pruning it down to what I need, is there a better method? Could I derive from Line and override the ChartLineType enum to add my own?
Any advice or a short code outline is much appreciated!
Thank you,
Stefan.
Comment