Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to set border brush to Rectangle?

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

    How to set border brush to Rectangle?

    Hi,

    im trying to draw a rectangle, but in the documentation https://ninjatrader.com/es/support/h..._rectangle.htm there is no constructor with Brush and isGlobal parameters.

    I try to use this constructor Draw.Rectangle(NinjaScriptBase owner, string tag, DateTime startTime, double startY, DateTime endTime, double endY, Brush brush), this draws ok my rectangle with area and border same color, but need to set after the isGlobal but it doesnot work, i found just an attribute called IsGlobalDrawingTool but it is readonly.

    So i try to use the constructor Draw.Rectangle(NinjaScriptBase owner, string tag, DateTime startTime, double startY, DateTime endTime, double endY, bool isGlobal, string templateName) to set after the brush attribute, but only found AreaBrush to set, but i want to set the brush of the border too, because it draws the area with a color and the border with other color and does not know how to assign it.

    Click image for larger version

Name:	Rectangle.PNG
Views:	252
Size:	17.3 KB
ID:	1212019

    Thank you for your help!
    Attached Files

    #2
    arbeydario To change the Rectangle's border/outline colour, have you tried setting the Rectangle's OutlineStroke: https://ninjatrader.com/es/support/h.../rectangle.htm

    Thanks.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    Comment


      #3
      Thank you jeronymite, it works!!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      80 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X