IsSuspendedWhileInactive
<< Click to Display Table of Contents >> IsSuspendedWhileInactive |
Prevents OnBarUpdate from being raised while the indicators display is not in use. Enabling this property in your indicator helps save CPU cycles while the indicator is suspended and not in use by a user. Once the indicator is in a state that would no longer be considered suspended, the historical OnBarUpdate() events will be triggered allowing the indicator to catch up to current real-time values.
Suspension occurs in the following scenarios:
•Minimized Chart
•Minimized Market Analyzer
•Minimized Hot List Analyzer
•Minimized SuperDOM
•Background tabs of above features are considered "minimized"
•Inactive workspaces in the background
Note: Since events in OnBarUpdate() will not be processed while the indicator is suspended, internal NinjaScript functions such as Alert(), PlaySound(), Share(), Print(), etc - or any other method that would be used to notify a user of activity will NOT be processed until the indicator is un-suspended. |
•Indicators running in Automated NinjaScript Strategies
•Indicators which have manually configured alerts
•Indicators which have been manually attached to orders
This property returns true if indicator can take advantage of suspension optimization; otherwise, false. Default set to false.
Note: This property is overridden to "true" automatically by the NinjaScript Code Wizard. You will need to remove the property to return to the default value or manually set it to false to disable this behavior |
Warning: This property should ONLY bet set from the OnStateChange() method during State.SetDefaults or State.Configure |
IsSuspendedWhileInactive
protected override void OnStateChange() |