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 mgco4you, Today, 09:46 PM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by wzgy0920, Today, 09:53 PM
      0 responses
      3 views
      0 likes
      Last Post wzgy0920  
      Started by Rapine Heihei, Today, 08:19 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Rapine Heihei, Today, 08:25 PM
      0 responses
      6 views
      0 likes
      Last Post Rapine Heihei  
      Started by f.saeidi, Today, 08:01 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X