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

Parameters - drop down selection?

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

    Parameters - drop down selection?

    Can an indicator/strategyparameter have a drop down selection box applied to it? eg for True/False or multiple values.

    If so could someone post a code snippet? If not could it be added to the suggestions list?

    Thanks.



    #2
    imported post

    Yes this is possible.

    Please look at the PriorDayOHLC indicator source. Take a look at the following:

    Under variables:

    showOpen

    Under properties:

    ShowOpen
    Ray
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      Thanks Ray.

      I see it is possiblewith bool True/False. Can one specify multiple values - eg multiple strings or numbers?

      eg "PlotBasedOn"

      "Close" or

      "(H+L) / 2" or

      "(O+H+L+C) / 4"






      Comment


        #4
        imported post

        Yes but I do not have code samples to provide you.

        If you want to choose between plots in Initialize() set:

        PriceTypeSupported = true;

        This will allow you to select in the indicator dialog when adding to a chart, either OHLC, Median or Typical price types, like the Simple Moving Average indicator.

        Then in your indicator code, where you want to reference the actual plot, use:

        Input[0] as opposed to Open[0] or Close[0].
        "Input" will always reference the price type you selected.

        See the SMA indicator source for an example.

        Ray
        RayNinjaTrader Customer Service

        Comment


          #5
          imported post

          I think the question has more to do with defining an enumerated list or type (or similar concept) and making itavailable in a parameter pulldown list to suggest predfined inputs.For example:

          Exponential, Simple, Hull

          7, 14, 21

          1.0, 1.5, 2.5

          1- Conservative, 2-Moderate, 3-Aggressive

          I see there are preexisting Color and PriceTypes available but what about the ability to define other customized lists. An example set of code for this simplistic type of input would be helpful.

          Regards,

          Whitmark
          whitmark
          NinjaTrader Ecosystem Vendor - Whitmark Development

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by trilliantrader, Today, 08:16 AM
          0 responses
          3 views
          0 likes
          Last Post trilliantrader  
          Started by AttiM, 02-14-2024, 05:20 PM
          9 responses
          174 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by funk10101, Today, 08:14 AM
          0 responses
          2 views
          0 likes
          Last Post funk10101  
          Started by adeelshahzad, Today, 03:54 AM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by RookieTrader, Today, 07:41 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X