90
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Drawing Library/Resources
Collapse
X
-
Drawing Library/Resources
Hi all. I have written a few simple indicators using a combination of the strategy builder and my own coding. I use Draw.Dot and Draw.Diamond a fair bit above and below price bars. If initiating the code in the strategy builder I always select "AutoScale" for their size, but when they render on the chart they appear larger than I like...especially when I zoom out to see a lot of data in one panel. I see other, more custom indicators that have much smaller dots and diamonds...where does one access these types of drawing items? Thanks.
90Tags: None
-
The easiest solution is instead of using Draw.Dot and Draw.Diamond simply use the Draw.Text syntax that includes Font group and Font size. Such as bellow:Originally posted by 90bideven View PostHi all. I have written a few simple indicators using a combination of the strategy builder and my own coding. I use Draw.Dot and Draw.Diamond a fair bit above and below price bars. If initiating the code in the strategy builder I always select "AutoScale" for their size, but when they render on the chart they appear larger than I like...especially when I zoom out to see a lot of data in one panel. I see other, more custom indicators that have much smaller dots and diamonds...where does one access these types of drawing items? Thanks.
90
Simply use characters from Wingdings and Webdings font groups. Use any character that you like (dot, diamonds, triangles, etc. ). Now you can use your custom font size as small or large as you want. If you change your bar size your markers will not change.Code:textFont = new SimpleFont("Wingdings",12 ); Draw.Text(NinjaScriptBase owner, string tag, bool isAutoScale, string text, int barsAgo, double y, int yPixelOffset, Brush textBrush, SimpleFont font, TextAlignment alignment, Brush outlineBrush, Brush areaBrush, int areaOpacity) Example: Draw.Text(this,"My Obj"+CurrentBar.ToString(), true, "t", 0, middle, 0, Brushes.Red, textFont , TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 50);Last edited by aligator; 12-21-2021, 06:09 PM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
581 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
338 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment