Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error Importing Ninja7 Strategy to Ninja6.x version

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

    Error Importing Ninja7 Strategy to Ninja6.x version

    Hello I am still using Ninja 6.X version due to OS limitation. I found very nice strategy that somebody wrote in Ninja7 and imported for me to use. It works fine in Ninja7 but when i try to import in Ninja6.X it gives me version error now thats understood so i tool manual way to copy indicators and strategy in bin/custom/indicator & strategy folder and edit and Compile but it Gives now compliation error.

    "the type or namespace name GridCategory couldnt be found , Are you missing a using Directive or assembly reference?" Error Cs0246

    Can somebody show me how to make this works in ninja6.x version.

    Thanks

    #2
    Hi jkpdon,

    In 6.5 it should be Category rather than GridCategory.

    Example from NT 6.5 SampleMaCrossOver
    Code:
    /// <summary>
    /// </summary>
    [Description("Period for fast MA")]
    [Category("Parameters")]
    public int Fast
    {
    	get { return fast; }
    	set { fast = Math.Max(1, value); }
    }
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks got that solved but now OnStartUp() No suitable method found to override!

      Comment


        #4
        OnStartup() was introduced in 7 and would need to be removed from any 6.5 code.

        You should be able to have equivalent functionality by moving the code that's currently there into OnBarUpdate() section, but only for the first bar.

        if (CurrentBar == 0)
        {
        //place all OnStartUp() code here
        }
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          it followed by bunch of errrors called The name "Medians" does not exist in the current context
          The name "Closes" does not exist in the current context
          The name "PlotColors" does not exist in the current context
          The name "PlotColors" does not exist in the current contextThe name "PlotColors" does not exist in the current context
          The name "PlotColors" does not exist in the current context
          The name "PlotColors" does not exist in the current context

          Error code - CS0103

          Comment


            #6
            I see. It sounds like too much of the script uses properties/methods that are only available in NinjaTrader 7. I would try to identify the core of what it is you're looking for, and copy only those elements, or rework it with 6.5 compatibility in mind.

            If you are not familiar with everything that would need to be done here, you may consider a NinjaScript consultant for this:
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

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