Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sudden error during compilation of strategy

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

    Sudden error during compilation of strategy

    I'm getting this error during compiling my strategy.
    Please look at the attached picture.
    Funny thing is that if i try to compile the indicator which contains same instructions everything is fine. When i have written that piece of code everything worked fine, after a week or so, I'm just getting an error during compiling. If i remove that line everything goes well. Recently I've removed one indicator which was protected assembly and installed the new version, and it seems to me my problems started from that point.
    My strategy had calls to that protected indicator, but I'm not using that indicator anymore in my strategy.
    Any thoughts?
    update: Can't select the strategy from the new strategy window. look at attached picture 2,3 on the 3rd picture you can see I've selected my BreakOut strategy, and all the parameters from the previously selected strategy remained in the strategy window.


    This is my list of declarations from the strategy:
    #region Using declarations
    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Data;
    using NinjaTrader.Gui.Chart;
    using System.Text;
    using System.Threading;
    using System.Collections.Generic;
    using System.ComponentModel;
    #endregion
    Attached Files
    Last edited by BankRobber; 11-24-2011, 01:57 AM.

    #2
    BankRobber, yes this has likely to do with the compiled assembly you installed - which NT7 version are you using here? Are you sure the assembly was created for the version you're using?

    To test: just uninstall the assembly again via File > Utilities > Remove NinjaScript Assembly and then recompile your scripts.

    Comment


      #3
      NT Version 7.0.1000.7. Uninstalled the protected assembly, recompiled the strategy , but nothing, everything is same

      Comment


        #4
        Did you restart NT7 after the uinstall so the assembly would not be loaded up?

        Comment


          #5
          Of course i did. and the strategy doesn't make any calls anymore to that indicator
          When i try to add the strategy I'm getting this error:

          **NT** Failed to call method 'Initialize' for strategy 'BreakOut2/145f88c59f5f4427ae4a19471b284f97': Object reference not set to an instance of an object.
          Last edited by BankRobber; 11-24-2011, 03:40 AM.

          Comment


            #6
            Calling any property / method from the indicator would not be necessarily needed to see the issue.

            Can you please post the Initialize() of the strategy where you're not getting the error on?

            Comment


              #7
              In attachment....
              Last edited by BankRobber; 11-24-2011, 01:31 PM.

              Comment


                #8
                Thanks, I would try commenting out parts of it and then rechecking, like the logic you have in there for BetterRenko would give you issues, as we would not support dynamically adding of series.

                Comment


                  #9
                  Originally posted by NinjaTrader_Bertrand View Post
                  Thanks, I would try commenting out parts of it and then rechecking, like the logic you have in there for BetterRenko would give you issues, as we would not support dynamically adding of series.
                  Thanks for your help, I figured it out.
                  I've declared a variable called 'Bars' LOL Yeah, stupid i know.

                  Comment


                    #10
                    Didn't think of that, thanks for sharing and glad to hear you could resolve it.

                    Comment

                    Latest Posts

                    Collapse

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