Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Added Property to Strategy but Not Showing on Property Grid

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

    Added Property to Strategy but Not Showing on Property Grid

    I code most of my strategies by hand not using the Wizard. When I introduce a property, how do I make it appear on the Property Grid when selecting a Strategy?

    It seems as though when when you select Parameters for a strategy via the wizard, it appears on the Property Grid but if you write a Parameter by hand, it does not show.

    Can you help me please?

    #2
    Hello,

    Here is an example of how to do it. Add this in the Variables section:

    privateint test = 1;

    Add this in the Properties section:

    [Description(
    "test")]
    [Category(
    "Parameters")]
    publicint Test
    {
    get { return test; } set { test = Math.Max(1, value); }
    }
    DenNinjaTrader Customer Service

    Comment


      #3
      Here is some additional information on this topic - http://www.ninjatrader-support2.com/...ead.php?t=5782
      RayNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by martin70, 03-24-2023, 04:58 AM
      15 responses
      114 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by The_Sec, Today, 02:29 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by jeronymite, 04-12-2024, 04:26 PM
      2 responses
      30 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by Mindset, 05-06-2023, 09:03 PM
      10 responses
      265 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by michi08, 10-05-2018, 09:31 AM
      5 responses
      743 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X