Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Indicator Property - Pick List

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

    Indicator Property - Pick List

    I need to allow my user to select an indicator and plot to use as a stop loss value. How would I implement the property so the user gets a list of installed indicators? Thanks.

    #2
    Hello, thanks for your post.

    This stack overflow answer gets a list of items in a namespace using reflection. For the "string nspace = "...";" variable, you would substitute "string nspace = "NinjaTrader.NinjaScript.Indicators";"

    See the "friendly enum" property converter in this example for an example of making an enumeration property.

    Best regards.

    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the swift reply. I posted in NT7. Do you have an example for the second part for NT7?

      "See the "friendly enum" property converter in this example for an example of making an enumeration property."

      Comment


        #4
        Hello, sorry about that. The same applies to NinjaTrader 7. Just re-create the "MyEnum" property under "Use Case #4: Display "friendly" enum values"

        Edit: I found this reference sample for NT7:
        Last edited by NinjaTrader_ChrisL; 07-26-2019, 11:59 AM.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          For anyone who might want to use this, if you are using NT7, the namespace filter should be NinjaTrader.Indicator, not NinjaTrader.NinjaScript.Indicators which is NT8.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Shansen, 08-30-2019, 10:18 PM
          24 responses
          939 views
          0 likes
          Last Post spwizard  
          Started by Max238, Today, 01:28 AM
          0 responses
          7 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by rocketman7, Today, 01:00 AM
          0 responses
          4 views
          0 likes
          Last Post rocketman7  
          Started by wzgy0920, 04-20-2024, 06:09 PM
          2 responses
          28 views
          0 likes
          Last Post wzgy0920  
          Started by wzgy0920, 02-22-2024, 01:11 AM
          5 responses
          33 views
          0 likes
          Last Post wzgy0920  
          Working...
          X