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 Quick Summary with 1 posts (0 thanks)
    4. looks_4 Fat Tails with 1 posts (3 thanks)
    1. trending_up 4,858 views
    2. thumb_up 24 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 0 attachments




 
Search this Thread

ZOrder

  #1 (permalink)
 
mea109's Avatar
 mea109 
france
 
Experience: Beginner
Platform: nt
Posts: 201 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?
Build trailing stop for micro index(s)
Psychology and Money Management
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
Futures True Range Report
The Elite Circle
 
  #3 (permalink)
 
mea109's Avatar
 mea109 
france
 
Experience: Beginner
Platform: nt
Posts: 201 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, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


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
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 682 since Jun 2009
Thanks Given: 757
Thanks Received: 787


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: 201 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
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 682 since Jun 2009
Thanks Given: 757
Thanks Received: 787


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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts