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 andrewtrades, Today, 04:57 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    5 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    436 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    7 views
    0 likes
    Last Post FAQtrader  
    Started by rocketman7, Today, 09:41 AM
    5 responses
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X