Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

OnConnectionStatus no suitable method found to override

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    OnConnectionStatus no suitable method found to override

    My code on my strategy file:
    protected override void OnConnectionStatus(ConnectionStatus orderStatus, ConnectionStatus priceStatus)
    {
    }

    The error I get:
    NinjaTrader.Strategy.ConnectionStatus.OnConnection Status(NinjaTrader.Strategy.ConnectionStatus, NinjaTrader.Strategy.ConnectionStatus)': no suitable method found to override

    Please help

    #2
    Hello kiss987,

    Thank you for writing in. Please confirm that towards the top of your code you see something like the following:
    Code:
    namespace [B]NinjaTrader.Strategy[/B]
    {
        /// <summary>
        /// Enter the description of your strategy here
        /// </summary>
        [Description("Enter the description of your strategy here")]
        public class YourStrategyName : [B]Strategy[/B]
    and not:
    Code:
    namespace [B]NinjaTrader.Indicator[/B]
    {
    	/// <summary>
    	/// Enter the description of your indicator here
    	/// </summary>
    	[Description("Enter the description of your indicator here")]
    	public class YourStrategyName : [B]Indicator[/B]
    	{
    Depending on whether you copied the error message exactly as it appeared, there is an extra space in it:
    Code:
    NinjaTrader.Strategy.ConnectionStatus.[B]OnConnection Status[/B](NinjaTrader.Strategy.ConnectionStatus, NinjaTrader.Strategy.ConnectionStatus)': no suitable method found to override
    Which could signify that you have a syntax error elsewhere in your code. If you continue to be unable to resolve the issue, please export your strategy by following the directions in our help guide here: http://ninjatrader.com/support/helpG...ightsub=export
    Then please navigate to your (My) Documents\NinjaTrader 7\bin\Custom\ExportNinjaScript folder and either attach your exported strategy to your response or email it to platformsupport[AT]ninjatrader[DOT]com with the subject line: "ATTN Michael M: http://www.ninjatrader.com/support/forum/showthread.php?t=80080".

    Thank you in advance.
    Michael M.NinjaTrader Quality Assurance

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by geddyisodin, Today, 05:20 AM
    5 responses
    32 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by bmartz, Today, 09:30 AM
    2 responses
    12 views
    0 likes
    Last Post bltdavid  
    Started by f.saeidi, Today, 11:02 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by geotrades1, Today, 10:02 AM
    4 responses
    12 views
    0 likes
    Last Post geotrades1  
    Started by rajendrasubedi2023, Today, 09:50 AM
    3 responses
    16 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X