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 tradingnasdaqprueba, 05-07-2024, 03:42 AM
      16 responses
      63 views
      0 likes
      Last Post tradingnasdaqprueba  
      Started by Vulgoth_t_Destroyer, 05-09-2022, 04:45 PM
      55 responses
      5,456 views
      0 likes
      Last Post BartMan
      by BartMan
       
      Started by DawnTreader, 05-08-2024, 05:58 PM
      16 responses
      52 views
      0 likes
      Last Post DawnTreader  
      Started by kevinenergy, Yesterday, 12:01 PM
      8 responses
      28 views
      0 likes
      Last Post kevinenergy  
      Started by nightstalker, Today, 01:32 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Zachary  
      Working...
      X