Thanks and regards.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Change Dash Style
Collapse
X
-
Hello soyjesus,
Thanks for your post.
You can change this a couple of ways. One of the method overloads includes the ability to apply a named template. To create a template you can manually draw a rectangle (its size/shape does not matter) then change its colors and lines as you want them to be and save the template with a specific name. When you use the overload with the specific template name, it will draw the rectangle according to how you have specified in the code and will use the characteristics of the template for the line type and colors. Please review, "Understanding Drawing Object templates" for further details: https://ninjatrader.com/support/help..._tools__ob.htm
Alternately, In the code, you can use the Rectangle interface to change the stroke of the outline.
References:
From the above references, Here is an example:
Rectangle myRec = Draw.Rectangle(this, "tag1", 10, Low[10] - TickSize, 5, High[5] + TickSize, Brushes.Blue);
myRec.OutlineStroke = new Stroke(Brushes.Blue, DashStyleHelper.Dash, 3f);
- Likes 1
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
83 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
45 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
65 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
68 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
57 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment