• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

UniversalDefinedMethods

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

    UniversalDefinedMethods

    When I defined an enum in the indicator UniversalDefinedMethods, it errored on compile due to the NT generated code. One of my properties for the indicator was going to use this enum as its type.

    It errored in the namespace NinjaTrader.MarketAnalyzer and NinjaTrader.Strategy code areas the NT generates.

    Should I delete these two or How are you able to use the UniversalDefinedMethods ( just for internal not properties )?

    To have my own namespaces, do I need to create and compile in Visual Studio then add references to the dll's in NT?

    Is this covered in Intro to NinjaScript course?

    I am using NT 6.5.0.8

    #2
    Please see these links on enums: http://www.csharp-station.com/Tutorials/Lesson17.aspx
    http://www.ninjatrader-support.com/v...37&postcount=4

    Creating your own namespace is beyond the scope of what we can support.

    The NinjaScript course does not cover programming. It covers the use of the Strategy Wizard in creating simple and complex strategies.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh,
      Awesome once again, how quickly you respond with help. Feel free to forward this on as my kudo's for your diligence and responsiveness or I can send one directly to someone if you advise where to do it.

      I found that if I place the enum declaration outside the namespace bracket in UserDefinedMethods then it works treating it as <global>.
      ( see SampleUniversalMovingAverage.zip I obtained from your site )

      Its better having it in UserDefinedMethods than in an indicator file.
      At least it's in one place versus ending up with various ones strewn across several files.

      If you put it inside the namespace brackets then the NT generated code errors in the Strategy and MarketAnalyzer namespace.

      I would prefer to have these defined in a namespace ( yours or mine ), than have that namespace referenced if it is my own. Having to place it in a global aspect seems could lead to problems. Again it doesn't matter if it is the UserDefinedMethod file or some indescriminate indicator file. Just seems dangerous these aren't allocated to a specific namespace. I'm following the example from the zip file.

      Comment


        #4
        Unfortunately this is the technique we currently recommend.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by saltminer, Today, 05:19 PM
        0 responses
        3 views
        0 likes
        Last Post saltminer  
        Started by martyn73, Today, 04:18 PM
        0 responses
        2 views
        0 likes
        Last Post martyn73  
        Started by aprendiz, Today, 03:42 PM
        0 responses
        2 views
        0 likes
        Last Post aprendiz  
        Started by 1001111, Today, 09:10 AM
        1 response
        18 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by usero86, Today, 06:02 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Working...
        X