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 aussugardefender, Today, 01:07 AM
    0 responses
    3 views
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    238 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    384 views
    1 like
    Last Post Gavini
    by Gavini
     
    Started by oviejo, Today, 12:28 AM
    0 responses
    4 views
    0 likes
    Last Post oviejo
    by oviejo
     
    Started by pechtri, 06-22-2023, 02:31 AM
    10 responses
    125 views
    0 likes
    Last Post Leeroy_Jenkins  
    Working...
    X