IsSuspendedWhileInactive
Definition
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
Scenarios where suspension will not occur
The IsSuspendedWhileInactive property will be ignored and real-time events will be processed as normal under the following cases:
- Indicators running in Automated NinjaScript Strategies
- Indicators which have manually configured alerts
- Indicators which have been manually attached to orders
Property Value
This property returns true if indicator can take advantage of suspension optimization; otherwise, false. Default set to false.
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.
This property should ONLY be set from the OnStateChange() method during State.SetDefaults or State.Configure.
Syntax
IsSuspendedWhileInactive

