do i get it right, that I can't do as simple thing as calling drawing and indicator functions in my own function? For example
class Sample2:Sample { public override void Calculate(IDataSeries data) { double price=SMA(data,10); DrawDot(.....); //so on } } I want to call Calculate from OnBarCalculate. If I can't do that, whats the point in using OOP with Ninja Script if after all I have to put everything in single function using old style "if else" (can't use polymorphism and so on). I've found simple workaround- to create singleton that would keep track of all drawing operations in a list and execute them at OnBarCalculate (then clear the list). I can also rewrite indicators as normal functions but this is so inelegant I simply can't believe its the only way and it's not already implemented.
Rafal
Comment