• 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

Advice on namespace usage

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

    Advice on namespace usage

    Hi

    I have a question for any of the forum's experienced programmers about good practice regarding the use of namespaces.

    I have written a class for use in my strategies, which I have put in a separate file. The class is defined in namespace NinjaTrader.Strategy and is available to all my strategy files.

    I now want to use that class in an indicator, but it is not available within my indicator file.

    My quick solution is to add
    "using NinjaTrader.Strategy" in the Using declarations section of my indicator file.

    Is this good practice, or should I define the class in namespace NinjaTrader.Indicator as well?

    Is there a better way?

    Cheers
    Tony

    #2
    Tony, don't see a concern here - having only one location is easier for updates and management of the 'collection'.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by juanram, Today, 06:01 AM
    0 responses
    2 views
    0 likes
    Last Post juanram
    by juanram
     
    Started by random9570, Yesterday, 09:01 PM
    2 responses
    19 views
    0 likes
    Last Post Emma1
    by Emma1
     
    Started by SDaCosta30, Today, 04:19 AM
    0 responses
    5 views
    0 likes
    Last Post SDaCosta30  
    Started by memonolog, Today, 02:39 AM
    0 responses
    12 views
    0 likes
    Last Post memonolog  
    Started by Z-Starter, Today, 01:21 AM
    2 responses
    11 views
    0 likes
    Last Post Z-Starter  
    Working...
    X