Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Drawing Text Above/Below Every Bar
Collapse
X
-
Drawing Text Above/Below Every Bar
I'm trying to draw text below and above every bar. I think I need to use OnBarUpdate to draw it for previous bars until I receive the data. I then need to switch to OnRender. Is that the right approach? If I'm using OnBarUpdate, I don't want the text for the last bar loaded since that should be handled by OnRender. How would I go about not drawing text for that last bar before OnRender takes over if this is the right approach?Tags: None
-
Hello walley,
Thank you for your post.
OnRender can be used to accomplish this, however using Draw.Text() should also be sufficient to draw text above and below the bar.
Draw.Text() Help Guide page - https://ninjatrader.com/support/help.../draw_text.htm
Draw.Text(NinjaScriptBase owner, string tag, string text, int barsAgo, double y)
If you want to draw on the building bar, make sure you are using the appropriate Calculate setting. OnBarClose means OnBarUpdate will only update or draw the text when the bar has closed.
Calculate Help Guide page - https://ninjatrader.com/support/help.../calculate.htm
Please let me know if I can assist further.
- Likes 1
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
599 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
344 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
558 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
557 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment