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

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 rtwave, 04-12-2024, 09:30 AM
        2 responses
        20 views
        0 likes
        Last Post rtwave
        by rtwave
         
        Started by tsantospinto, 04-12-2024, 07:04 PM
        5 responses
        68 views
        0 likes
        Last Post tsantospinto  
        Started by cre8able, Today, 03:20 PM
        0 responses
        7 views
        0 likes
        Last Post cre8able  
        Started by Fran888, 02-16-2024, 10:48 AM
        3 responses
        49 views
        0 likes
        Last Post Sam2515
        by Sam2515
         
        Started by martin70, 03-24-2023, 04:58 AM
        15 responses
        115 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X