Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Importing Indicator error - Duplicate methods

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

    Importing Indicator error - Duplicate methods

    I'm having trouble importing some custom indicators into NT7.

    When using the Import Utility I get an error as per first pic saying "Ninja Script archive File may contain duplicate method..." etc.

    When I do it manually and try and compile it I get an errors in the red line of code. see pic 2.

    {
    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;
    }
    Attached Files

    #2
    Tremblinghandtrader, those files are from 6.5 and use the deprecated way of working with the Bars sessions objects. You would need to modify the code for this indicator according to our 'code breaking changes' doc published here -

    Contains critical information including but not limited to migration, installation, connections and changes.

    Comment


      #3
      Thanks Bertrand

      I have got it to work. Just not too sure that my method would be classified under 'code breaking changes' .

      I just deleted the line of code and it compiled and works! LOL Thats the kind of coding I like.

      Comment

      Latest Posts

      Collapse

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