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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      73 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      152 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X