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
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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
Code:this.DrawText("indicator 1", "Hello", 0, High[0] + [B]2 * TickSize[/B], Color.Green);
Code:this.DrawText("indicator 2", "World", 0, High[0], Color.Blue);
Unfortunately, we do not support ZOrder, but some customers have found success using
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 rocketman7, Today, 02:12 AM
|
0 responses
5 views
0 likes
|
Last Post
by rocketman7
Today, 02:12 AM
|
||
Started by dustydbayer, Today, 01:59 AM
|
0 responses
1 view
0 likes
|
Last Post
by dustydbayer
Today, 01:59 AM
|
||
Started by inanazsocial, Today, 01:15 AM
|
0 responses
4 views
0 likes
|
Last Post
by inanazsocial
Today, 01:15 AM
|
||
Started by trilliantrader, 04-18-2024, 08:16 AM
|
5 responses
22 views
0 likes
|
Last Post Today, 12:32 AM | ||
Started by Davidtowleii, Today, 12:15 AM
|
0 responses
3 views
0 likes
|
Last Post
by Davidtowleii
Today, 12:15 AM
|
Comment