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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      68 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      55 views
      0 likes
      Last Post CarlTrading  
      Working...
      X