Second question. Is there a Z-index parameter i can use when I want to add something like a rectangle to the chart so that i can place it behind the bar?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
A few programming questions
Collapse
X
-
A few programming questions
I have a couple of indicators that I use and they place objects and text onto the chart above and below bars. The problem I'm having is that the text from different indicators collide and so can't be read easily. Is there a technique for making sure that they don't write on top of each other? I woudl prefer them to stack vertically below/above each other.
Second question. Is there a Z-index parameter i can use when I want to add something like a rectangle to the chart so that i can place it behind the bar?Tags: None
-
Hello vlc,
Thanks for your post and I am happy to assist you.
If you are placing the DrawObjects above the High then try using the x * TickSize to create some gaps between the 2 objects so that they do not overlaps. So if you want to place the Text object “Hello” from indicator 1 and “World” from indicator 2, then use the following.
In indicator 1
in indicator 2Code:this.DrawText("indicator 1", "Hello", 0, High[0] + [B]2 * TickSize[/B], Color.Green);
adjust 2 * TickSize to suit your need.Code:this.DrawText("indicator 2", "World", 0, High[0], Color.Blue);
Unfortunately, we do not support ZOrder, but some customers have found success using
but as a note of caution, the same may conflict if you try using the same across indicators.Code:ZOrder = -1;
Please do let me know if I can assist you any further.JoydeepNinjaTrader Customer Service
-
Hello vlc,
Thanks for your post.
An indicator/strategy can read only DrawObjects drawn by itself or manually drawn by user. However there may be some functions in the ChartControl class, which is unfortunately not supported by us.
Please let me know if I can assist you any further.JoydeepNinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
579 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment