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 algospoke, Yesterday, 06:40 PM
      2 responses
      21 views
      0 likes
      Last Post algospoke  
      Started by ghoul, Today, 06:02 PM
      3 responses
      14 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      45 views
      0 likes
      Last Post jeronymite  
      Started by Barry Milan, Yesterday, 10:35 PM
      7 responses
      21 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by AttiM, 02-14-2024, 05:20 PM
      10 responses
      181 views
      0 likes
      Last Post jeronymite  
      Working...
      X