Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PropertyEditor (custom editor) for Stroke in Indicator?

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

    PropertyEditor (custom editor) for Stroke in Indicator?

    Hi,

    Is there any PropertyEditor for the Stroke object? i.e. can I add anything to the following section to enable the end-user to tailor the properties of the stroke object in an indicator?

    #region Properties
    [NinjaScriptProperty]
    [Display(Name = "Current Open", Description = "Current Open", Order = 3, ResourceType = typeof(Resource), GroupName = "Parameters")]
    public Stroke CurrentOpenStroke { get; set; }
    #endregion




    #2
    Hello mav8rick,

    Thanks for your post.

    This behavior exists for Strokes and is built in to the platform. Additional attributes would not need to be added.

    In addition to the code you have entered for the property, a default will have to be set in State.SetDefaults in order for the controls to be usable on the property grid.

    Once that is wired up, manipulating the Stroke in the property grid will look like the attached screenshot.

    Let us know if you have any additional questions.
    Attached Files

    Comment


      #3
      Just added:
      CurrentOpenStroke = new Stroke(Brushes.DeepSkyBlue);

      under State.Defaults and it worked like magic. Thanks!!!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      571 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      330 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      548 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      548 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X