Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Variable number of parameters depending on one of them.

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

    Variable number of parameters depending on one of them.

    Hi,

    I want to create an enum parameter in the Propierties region to select the number of Take Profits to use in my strategy. For example: Number of Targets like picture 1. Once I select 1 target, I need to see 2 more parammeters, if I select 2 targets I need to see 4 parammeters more and If I selct None, I don't see any parameter.

    #2
    Hello lju45,

    Thanks for your post.

    You can create a custom typeconverter to help with this. For a reference, please see the help guide and example here: https://ninjatrader.com/support/help...r_to_custo.htm

    I've also attached an example, based on a strategy, to assist. It has nothing in OnBarUpdate and is only to demonstrate functionality in the User Interface and provide a further example of the extensive coding needed to accomplish your goal.

    ExampleTypeConverterusingEnum.zip

    Comment


      #3
      Thank you very much, it works perfect!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      90 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X