Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Export problem 12.02.2018

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

    Export problem 12.02.2018

    During alst days i am frequently send you reports about bugs in NT compiler/exporter. So, please dont ignore them.


    now, today's problem.

    when i use code like this in indi:

    Code:
    using BarTypesXYZ = NinjaTrader.NinjaScript.Indicators.MyCompany.XYZ.BarTypesXYZ;
    and i export such indicator as "compiled assembly", then i see it is being exported such (while opening "filename.cs" of compiled archive).

    Code:
    public Indicators.MyCompany.XYZ XYZ (...... bool useMTF, BarTypesXYZ barType, bool something ...
    and thus, when i try to import that on another machine, it says that BarTypes namespace not found in NT platform.

    so, i think you understand what is the problem there.
    i think the namespace is globalised, while it should be referred.
    Last edited by ttodua; 04-13-2018, 12:22 PM.

    #2
    Hello TazoTodua,

    It may be that you are attempting to use code that is not supported by NinjaTrader.

    Can you clarify why the using statement is used for a BarType in an indicator?

    Are you attempting to prevent the indicator from working unless a specific bar type is selected?

    Do you have a reduced sample that doesn't have any logic and has just the necessary code to reproduce the error?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      thanks for prompt reply.
      I use ENUM as input for that indicator.
      that enum is also defined within indicator's namespace, like:

      Code:
      namespace NinjaTrader..........XYZ  {
      
           public enum BarTypesXYZ{
            ....
            ....
          }
      
      }
      Last edited by ttodua; 04-13-2018, 12:23 PM.

      Comment


        #4
        Hello TazoTodua,

        Two things.

        BarTypes is already a collection object in NinjaTrader. I highly recommend not using any class, method, or variable names that are already in use.

        Try using a different custom name like 'BarTypeSelection' or something that isn't already being used.

        Also, when using enums, these need to be in a custom namespace and need to be accessed with the fully qualified namespace.

        Below is a link to an example that can be (and was) exported.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        558 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 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
        546 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