I'm not quite sure what you are wanting me to comment on in this thread. However, yes, set variables to null if you want to mark the objects previously references by them for garbage collection. With a string series vs a double series, it would depend on how long the string is on which would take more memory. Each character of a string would be 4 bytes. A double would be 8 bytes. If the string is more than 2 characters long, then the string would take more memory.
With plots, there would be more CPU and graphics use for plot series added with AddPlot() verses using a custom Series<T>. By adding this as a plot, NinjaTrader is now using CPU to check the values and try and rendering these using the GPU. A custom series is not going to have any attempts to render a plot, so marginally less CPU.
Shansen,
An indicator added to a chart with IsSuspendedWhileInactive true is similar to an indicator called from a strategy.
The indicator while inactive, queues the updates until its active, then runs through the queue of updates.
OnBarUpdate() is still triggered exactly the same for all of the queued events, including with IsFirstTickOfbar.
If there is something time sensitive in that you need OnBarUpdate() to run to trigger some kind of action that does not result in data being accessed by the host script, you can call Update() from the host script and that will trigger the bar update queue to run through to current.
However, if the point is to fetch data from the hosted indicator, then by calling series information or calling a public property with Update() will run the queue the same as if it was active the entire time.
Calling AddChartIndicator() from a strategy specifically, would keep the indicator from being inactive.
Comment