Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how can I set the dash style for a rectangle?

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

    how can I set the dash style for a rectangle?

    Hi,

    how can I set the dash style for a rectangle?

    Thanks

    #2
    Hi td_910, thank you for your note.

    There are no StrokeStyle options in the standard Rectangle drawing tool. One would need to modify the "Shapes.cs" script and change line 776 where the Stroke object is made. You can change that line to something like this:

    OutlineStroke = new Stroke(Brushes.CornflowerBlue, DashStyleHelper.Dash, 2f);

    If you attempt to make a copy of the Shapes.cs script, you will get many duplicate definitions because of copying over a lot of extra emums and base classes that already exist in the original Shapes.cs file. If you would like to make your own copy of the Shapes drawing tool and change that one line you can. As an alternative, you can just open up the "@Shapes.cs" file in an external code editor, change the line and save it and NinjaTrader will think that is the original. You would need to replace the file every time you update.

    Please let me know if you have any questions.
    Last edited by NinjaTrader_ChrisL; 05-28-2019, 01:00 PM.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    151 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    304 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    244 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    345 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    175 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X