I am currently developing an add-on for NinjaTrader and have encountered an issue with extending functionality related to connection status updates. I am using NinjaTrader 8 and my class is derived from NinjaTrader.NinjaScript.AddOnBase. Here is the class definition:
public class MyClass : NinjaTrader.NinjaScript.AddOnBase { protected override void OnConnectionStatusUpdate(ConnectionStatusEventArgs connectionStatusUpdate) { // Intended implementation } }
CS0115 'MyClass.OnConnectionStatusUpdate(ConnectionStatus EventArgs)': no suitable method found to override
This suggests that the OnConnectionStatusUpdate method is not available for overriding in the AddOnBase class. My goal is to efficiently manage connection status changes to subscribe and unsubscribe from order updates dynamically within my add-on.
Questions:
- Is it possible to override the OnConnectionStatusUpdate method in a class derived from AddOnBase? If not, what would be the recommended approach to handle connection status changes within an add-on?
- If overriding this method is not feasible within AddOnBase, could I potentially implement this functionality by creating an indicator or another support class specifically for handling these events? How would I integrate such a class with my add-on to manage connection-related actions?
It’s imperative for the functionality of my add-on to react to connection status updates, so any guidance on how to achieve this within the NinjaTrader framework would be greatly appreciated.
Thank you for your assistance.
Best regards,
Aviram Y.
Comment