Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enums in Indicators

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

    Enums in Indicators

    Custom enums as parameters in strategies seem to work fine. I can create them inside the class and they don't pollute the namespace.

    Unfortunately it doesn't seem like you can do the same with indicators because the designer generated code needs access to the enum. I would need to add the enum to the namespace instead of the class.

    Is there any other alternative or is it just how it is?

    #2
    You can add enums to a namespace defined by you, then add a using statement for that namespace to the global section of the file being compiled.

    Comment


      #3
      Hi GrumpyTrader,

      Yes, what strategesis mentioned would be the recommended way of going about that.
      <span class="name">Alex C.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by ageeholdings, 05-01-2024, 05:22 AM
      6 responses
      42 views
      0 likes
      Last Post ageeholdings  
      Started by tony_28217, Today, 07:04 PM
      0 responses
      11 views
      0 likes
      Last Post tony_28217  
      Started by flybuzz, Today, 10:33 AM
      1 response
      9 views
      0 likes
      Last Post flybuzz
      by flybuzz
       
      Started by spencerp92, 10-10-2023, 09:56 AM
      4 responses
      308 views
      0 likes
      Last Post flybuzz
      by flybuzz
       
      Started by samish18, Yesterday, 10:13 AM
      1 response
      26 views
      0 likes
      Last Post NinjaTrader_Eduardo  
      Working...
      X