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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      57 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      78 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      39 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      101 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      61 views
      0 likes
      Last Post PaulMohn  
      Working...
      X