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

Duplicate Method Names on Import.

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

    Duplicate Method Names on Import.

    Hi,
    Could you expand on how Ninja incorporates an Imported script into its collection of indicators?

    When attempting to Import my compiled NinjaScript my beta tester has got the following error.
    Import NinjaScript Archive File (.ntns) Error
    Import Failed. The existing NinjaScript file 'D3Spotter, Version=1.0.0.1, Culture=neutral,PublicKeyToken=null' containes duplicate method names found in the imported NinjaScript Archive File.

    My Indicator does have a number of Methods but they are all private except for the Methods required by the Indicator Class. ie:



    • protected override void Initialize()
    • protected override void OnBarUpdate()
    • public override void Plot(Graphics graphics, Rectangle bounds, double min, double max)
    I also have 2 Global enums with Names Long enough that I thought would avoid namespace collision.

    Q1. Given that most Ninja examples display the Plot event as Public. would it hurt my making it Protected or Internal?
    Q2. Is that likely to be where my Method collisions are occouring? or is there something happening under the covers?
    Q3. I'm assuming that private methods aren't likely to causing an issue. Or is there something that I'm overlooking?
    Thanks
    Last edited by David Lean; 12-03-2009, 06:17 AM.

    #2
    Hi David, please install the indicator manually then to see the specific issues encountered being listed (drop the dll in the Bin > Custom folder and restart NT, then compile - if this is a cs file just drop it into the Bin > Custom > Indicator folder instead).

    The Plot() method should be public and this should not be changed, thus unlikely collisions stem from this, same for the private methods you use.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Error on compile an indicator on NT7

      I compile an indicator on NT7 after copied it from NT6.5 bin/..../Indicators to NT7 Bin/.......

      On the compile it gave 2 errors on line 666 colum 8 and 36

      On line 666 we have:
      && Bars.Session.InSession(Now, Bars.Period.Id, true) )

      Can you please help me on this?

      Best



      Same lines before/after line 666:



      // Additional Minutes Timer Code
      private bool DisplayTime()
      {
      if (ChartControl != null
      && Bars != null
      && Bars.Count > 0
      && Bars.MarketData != null
      && Bars.MarketData.Connection.PriceStatus == Cbi.ConnectionStatus.Connected
      && (Bars.MarketData.Connection.Options.Provider != Cbi.Provider.OpenTick || !(Bars.MarketData.Connection.Options as Cbi.OpenTickOptions).UseDelayedData)
      && Bars.Session.InSession(Now, Bars.Period.Id, true) )
      return true;

      return false;
      }

      Comment


        #4
        How to put an indicator on forground over candles on NT7

        How to put an indicator on forground over candles on NT7? (panel 1)

        Best

        Comment


          #5
          Select the indicator, hold shift, mouse wheel up/down to change the z-order of the selected object.
          Josh P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by cmtjoancolmenero, Yesterday, 03:58 PM
          11 responses
          39 views
          0 likes
          Last Post cmtjoancolmenero  
          Started by FrazMann, Today, 11:21 AM
          0 responses
          5 views
          0 likes
          Last Post FrazMann  
          Started by geddyisodin, Yesterday, 05:20 AM
          8 responses
          52 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by DayTradingDEMON, Today, 09:28 AM
          4 responses
          27 views
          0 likes
          Last Post DayTradingDEMON  
          Started by George21, Today, 10:07 AM
          1 response
          22 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Working...
          X