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 Perr0Grande, Today, 08:16 PM
        0 responses
        2 views
        0 likes
        Last Post Perr0Grande  
        Started by elderan, Today, 08:03 PM
        0 responses
        5 views
        0 likes
        Last Post elderan
        by elderan
         
        Started by algospoke, Today, 06:40 PM
        0 responses
        10 views
        0 likes
        Last Post algospoke  
        Started by maybeimnotrader, Today, 05:46 PM
        0 responses
        12 views
        0 likes
        Last Post maybeimnotrader  
        Started by quantismo, Today, 05:13 PM
        0 responses
        7 views
        0 likes
        Last Post quantismo  
        Working...
        X