Today there is Initialize() and OnBarUpdate(), and certain items can not be accessed in Initialize() because Bars does not exists yet. There are certain kinds of setup that needs to be done post initialize and before processing data. Typically, this is done with a if (CurrentBar == 0) or some other bool flag to call a routine once.
What would be nice is to have a new routine PostInitialize() that could be overridden to implement this type of functionality (dont care about the name). The routine would only be called once after initialize and before the first tick of data.
By placing this in the framework, the constant checking if a routine has run once could be removed from OnBarUpdate(). There should be an elegant place to put this routine call in the Ninja indicator framework (and perhaps strategy also).
This is a minor enhancement, but would really clean things up and move functionality to where it really belongs.

Comment