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 Davidtowleii, Today, 12:15 AM
      0 responses
      2 views
      0 likes
      Last Post Davidtowleii  
      Started by guillembm, Yesterday, 11:25 AM
      2 responses
      9 views
      0 likes
      Last Post guillembm  
      Started by junkone, 04-21-2024, 07:17 AM
      9 responses
      68 views
      0 likes
      Last Post jeronymite  
      Started by trilliantrader, 04-18-2024, 08:16 AM
      4 responses
      20 views
      0 likes
      Last Post trilliantrader  
      Started by mgco4you, Yesterday, 09:46 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X