I'm trying to build an indicator which uses the two or more of the Fibonacci drawing tools that come with NT8. What I want to do is draw a grid consisting of BOTH the Retracements (horizontal lines) and the TimeExtensions (vertical lines).
It was simple enough to deal with the case of calling the Fibonacci tool from an indicator. I simply added one more constructor to the Draw partial class, which calls two methods in succession:
public static void FibonakkiBothTimeAndPrice(NinjaScriptBase owner, string tag, bool isAutoScale, int startBarsAgo, double startY, int endBarsAgo, double endY) { FibonakkiTimeExtensions(owner, tag+"Verticals", isAutoScale, startBarsAgo, startY, endBarsAgo, endY); FibonakkiRetracements(owner, tag+"Horizontals", isAutoScale, startBarsAgo, startY, endBarsAgo, endY); //return FibonakkiCore<FibonakkiTimeExtensions>(owner, isAutoScale, tag, startBarsAgo, Core.Globals.MinDate, startY, endBarsAgo, Core.Globals.MinDate, endY, false, null); }
I've looked at the code and each of the two classes has its own OnRender to deal with the anchors. Can someone point me in the right direction? Instead of tampering with the code and copy-pasting between the two classes, I'm hoping there's a straightforward way as simple as the route I took with .Draw(...) above.
Thanks in advance.
One more thing: If, in the indicator I'm building, I want to include the inputs (properties) of the drawing tool (i.e. to set Fibo levels and colours, etc) so that they can be set from the indicator and sent to the drawing tool when it's called, is there a way of "inheriting" the properties of the Fibo tool instead of copy-pasting the same properties?
Comment