Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

I did stack overflow in a parameter, now NinjaTrader crashes upon restarting

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

    I did stack overflow in a parameter, now NinjaTrader crashes upon restarting

    I did something like this:

    public int[] x
    {
    get { return x; }
    set { x= value; }
    }

    And now NinjaTrader won't start. I understand I need to uppercase the property name. Tried deleting the C# file (but I should probably delete whatever it compiles to; what does it compile to?)

    While at it, you can tell I am trying to use an array as a parameter. Is it possible at all? Or any collection for that matter.

    #2
    Hello,

    If you have removed the .cs file, but still have the problem this is likely because the Custom assembly has not been recompiled without the file.

    Please try the following after removing the .cs file:

    Open the folder: Documents\NinjaTrader 7\bin\Custom
    Look for NinjaTrader.Custom.dll
    Delete only the one file named NinjaTrader.Custom.dll
    Now restart the platform.

    If the script no longer exists and the NinjaTrader.Custom.dll is removed, NinjaTrader will be forced to recompile on startup. If there are no errors this should allow for the platform to start.

    For your second question, yes you can have a collection as a public property. Please note that with public properties and more advanced objects like collections, you will generally run into serialization errors or problems displaying the property in the properties grid.

    to avoid this, if you are getting errors you would need to place the attribute tag [XmlIgnore] on the property, also collections generally do not work in the Properties grid, to hide this from the properties you would also need to add [Browsable(false)]

    Code:
    private int[] x;
    
    [XmlIgnore]
    [Browsable(false)]
    public int[] X
    {
    	get { return x; }
    	set { x= value; }
    }
    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    562 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    325 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    547 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X