NexusFi: Find Your Edge


Home Menu

 





ZOrder


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one mea109 with 3 posts (10 thanks)
    2. looks_two RJay with 2 posts (11 thanks)
    3. looks_3 Fat Tails with 1 posts (3 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 5,658 views
    2. thumb_up 24 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 
mea109's Avatar
 mea109 
france
 
Experience: Beginner
Platform: nt
Posts: 198 since Oct 2009
Thanks Given: 1,776
Thanks Received: 56

Hi, this is getting on my nerves.

I'm trying to set ZOrder inside Initialize().

I can put whatever value (positive or negative) and the plots will still display behind candles. Is that normal ?

I have to set it manually.


Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Irans Dual Probability: Guns Quiet at 99.95% While Forma …
Prediction Markets & Event Contracts
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
Prediction Markets Lock Fed Pause at 99pct for April 29 …
Prediction Markets & Event Contracts
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
Khamenei Vetoes Uranium Transfer as Peace Odds Surge to …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Hello Im new here
5 thanks
  #3 (permalink)
 
mea109's Avatar
 mea109 
france
 
Experience: Beginner
Platform: nt
Posts: 198 since Oct 2009
Thanks Given: 1,776
Thanks Received: 56


Also, is there a way to separate ZOrder from plots to BarColor/CandleOutlineColor function ?

Because if my indicator has plots + paint bar study, if I change manually the ZOrder in order to put plots behind candles, then all bar painting disappears !


Started this thread Reply With Quote
Thanked by:
  #4 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


mea109 View Post
Also, is there a way to separate ZOrder from plots to BarColor/CandleOutlineColor function ?

Because if my indicator has plots + paint bar study, if I change manually the ZOrder in order to put plots behind candles, then all bar painting disappears !

The value of ZOrder - whatever it is - will be applied to all plots of your indicator. So if you have an indicator with both plots and bar coloring, you cannot manage the layers separately. Only solution here is to divide the coloring of the bars and the plots between two separate indicators.


Reply With Quote
Thanked by:
  #5 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 Vendor: www.innovative-trading-solutions-online.com 
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: ES
Posts: 687 since Jun 2009
Thanks Given: 765
Thanks Received: 789


mea109 View Post
Hi, this is getting on my nerves.

I'm trying to set ZOrder inside Initialize().

I can put whatever value (positive or negative) and the plots will still display behind candles. Is that normal ?

I have to set it manually.

Hi mea109,

I did some research on ZOrder a couple weeks back.

I started with code I found and fixed it.

This works pretty good. Contact me if you need assistance.
--------------------------------------------------
#region Variables

private bool zOrderBehind = false;

private int CatchZOrder;
----------------------------------------------------
protected override void Initialize()

CatchZOrder = ZOrder;
----------------------------------------------------
protected override void OnStartUp()
{
CatchZOrder = ZOrder;
}
----------------------------------------------------
protected override void OnBarUpdate()

{
if(zOrderBehind == true)ZOrder = -1;
if(zOrderBehind == false)ZOrder = CatchZOrder;
}
------------------------------------------------------------------
#region Properties

[Description("Draw Price Lines Behind Bars")]
[Category("Display Settings")]
[Gui.Design.DisplayName ("Draw Price Lines Behind Bars")]
public bool ZOrderBehind
{
get { return zOrderBehind; }
set { zOrderBehind = value;}
}
-------------------------------------------------------------------------------
Enjoy,

RJay


Reply With Quote
  #6 (permalink)
 
mea109's Avatar
 mea109 
france
 
Experience: Beginner
Platform: nt
Posts: 198 since Oct 2009
Thanks Given: 1,776
Thanks Received: 56

Sorry I found no time earlier.

Your code snippet is useful.

In the end I came up with ZOrder = int.MaxValue; on Initialize()
This allows and indeed worked to put plots in front of candles but on top of that, it will also manage to set the proper order between numerous indicator installations...

The opposite is ZOrder = int.MinValue;


Started this thread Reply With Quote
  #7 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 Vendor: www.innovative-trading-solutions-online.com 
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: ES
Posts: 687 since Jun 2009
Thanks Given: 765
Thanks Received: 789


mea109 View Post
Sorry I found no time earlier.

Your code snippet is useful.

In the end I came up with ZOrder = int.MaxValue; on Initialize()
This allows and indeed worked to put plots in front of candles but on top of that, it will also manage to set the proper order between numerous indicator installations...

The opposite is ZOrder = int.MinValue;

Hi mea109,

You just solved an issue I was dreading working on.

Thanks,

RJay


Reply With Quote
Thanked by:




Last Updated on September 22, 2011


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts