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
Changing z order programatically?
Collapse
X
-
Changing z order programatically?
Is there some way to change the z-order of a data series programmatically in NT7? I would like to create an indicator that at the close of every bar, automatically brings the price bars to the top of the z-order, on top of everything else that is painted on the chart. Is there some way to do this in NinjaScript by any chance?Tags: None
-
Originally posted by NinjaTrader_Bertrand View PostHi JS999, changing this programmatically is not supported at this point in time, but on our feedback list for future consideration.
Comment
-
Originally posted by NinjaTrader_Bertrand View PostYou're welcome, I would agree this can come in handy, for now you can add the unsupported ZOrder = -1 call to your indicators scripts that would move the study behind the price bars (as done in our VolumeZones).
Comment
-
Thanks - incidentally, this unsupported code where we can set ZOrder = -1.... can we also set it to something else to put it always on top of all the other indicators? What would happen if we put a really big number there, like ZOrder = 100? Would it work and just make the indicator topmost, or would it crash because it was trying to set it to a value that was greater than the number of plots on the chart?
Comment
-
Bertrand,
I was just pointed to this thread from Ryan. Handy workaround.
I've started to add the ZOrder = -1 to ALL of my indicators, so that price will always be on top. Could there be any issues in doing this? That is having all ZOrder values equal to -1? What exactly does setting ZOrder to -1 do? Does it just place the indicator "outside" of the ZOrder processing? What if I programmatically set all my ZOrders to like 999? Would there be an issue with multiple indicators having the same ZOrder?
Thanks.
Joe
Comment
-
Originally posted by fosch View PostBertrand,
I was just pointed to this thread from Ryan. Handy workaround.
I've started to add the ZOrder = -1 to ALL of my indicators, so that price will always be on top. Could there be any issues in doing this? That is having all ZOrder values equal to -1? What exactly does setting ZOrder to -1 do? Does it just place the indicator "outside" of the ZOrder processing? What if I programmatically set all my ZOrders to like 999? Would there be an issue with multiple indicators having the same ZOrder?
Thanks.
Joe
Hopefully you're not talking about programming script.
I have a problem with an indicator by PrTester, "Keltner Channel with Color". The first chart I added the Keltner on a 100 Range and it's perfect. However, when I applied it to a 40 Range and 60 Range, the Keltner is ON the bars, not behind the bars like on the 100 Range.
I emailed PrTester about this and he directed me to this thread. ???
I don't want changes to my EMAs as I like them on top of the bars.
Comment
-
Originally posted by fosch View PostBertrand,
I was just pointed to this thread from Ryan. Handy workaround.
I've started to add the ZOrder = -1 to ALL of my indicators, so that price will always be on top. Could there be any issues in doing this? That is having all ZOrder values equal to -1? What exactly does setting ZOrder to -1 do? Does it just place the indicator "outside" of the ZOrder processing? What if I programmatically set all my ZOrders to like 999? Would there be an issue with multiple indicators having the same ZOrder?
Thanks.
Joe
BertrandNinjaTrader Customer Service
Comment
-
Originally posted by SharonSS View PostDoesn't look like you've gotten an answer to your question yet. However, I have a question for you. You said you started adding the ZOorder = -1 to ALL your indicators. Where did you do this? In the property window of the indicator? If so, what area?
Hopefully you're not talking about programming script.
I have a problem with an indicator by PrTester, "Keltner Channel with Color". The first chart I added the Keltner on a 100 Range and it's perfect. However, when I applied it to a 40 Range and 60 Range, the Keltner is ON the bars, not behind the bars like on the 100 Range.
I emailed PrTester about this and he directed me to this thread. ???
I don't want changes to my EMAs as I like them on top of the bars.
Have a good weekend,Attached FilesBertrandNinjaTrader Customer Service
Comment
-
Hi Sharon,
I see that Bertrand got back to you before I could. Anyway, to reiterate what Bertrand said, I placed the code (yes it was NinjaScript) within the Initialize() section of the indicators. I am a programmer, so this was no big deal for me.
I want to point out though, that I am no longer setting the z-orders to -1 in my indicators, as it caused some "odd" behavior. So, I abandoned it. However, with Bertrands response, I will try setting the z-order for each indicator on my charts manual, and see how that works out.
Joe
Comment
-
Strange. I added the ZOrder = -1, and it works when the indicator is applied the first time, but refuses to work the second time. I had removed the Keltner with colors from a 150Range chart, applied the indicator after I had gone in and made the correction and it worked. Then to test it, I removed the indicator, applied, and closed. Opened and put the indicator back on and it wouldn't work.
Here's the correction I made using your example:
///<summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
///</summary>
protectedoverridevoid Initialize()
{
Add(new Plot(Color.Blue, "Upper"));
Add(new Plot(Color.Blue, "Lower"));
Add(new Plot(Color.DarkGray, "Midline"));
diff = new DataSeries(this);
Overlay = true;
ZOrder = -1;
PriceTypeSupported = false;
}
So what's wrong that it's not consistent? Maybe because the original one that worked on my 100Range chart is still the original? I didn't mess with that one at all since it was correct from the beginning.
Last edited by SharonSS; 02-26-2012, 06:46 PM.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by traderqz, Today, 09:44 AM
|
2 responses
4 views
0 likes
|
Last Post Today, 10:00 AM | ||
Started by stafe, 04-15-2024, 08:34 PM
|
8 responses
40 views
0 likes
|
Last Post
by stafe
Today, 10:00 AM
|
||
Started by rocketman7, Today, 09:41 AM
|
2 responses
5 views
0 likes
|
Last Post
by rocketman7
Today, 09:52 AM
|
||
Started by rocketman7, Today, 02:12 AM
|
7 responses
31 views
0 likes
|
Last Post Today, 09:23 AM | ||
Started by guillembm, Yesterday, 11:25 AM
|
3 responses
16 views
0 likes
|
Last Post Today, 09:11 AM |
Comment