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 Barry Milan, Yesterday, 10:35 PM
        5 responses
        16 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by DanielSanMartin, Yesterday, 02:37 PM
        2 responses
        13 views
        0 likes
        Last Post DanielSanMartin  
        Started by DJ888, 04-16-2024, 06:09 PM
        4 responses
        12 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by terofs, Today, 04:18 PM
        0 responses
        11 views
        0 likes
        Last Post terofs
        by terofs
         
        Started by nandhumca, Today, 03:41 PM
        0 responses
        8 views
        0 likes
        Last Post nandhumca  
        Working...
        X