NinjaTrader ZOrder and Advanced Charting

Author: Carl on October 29, 2026
Featured image for “NinjaTrader ZOrder and Advanced Charting”
Subscribe to get alerts to our next blog post!
NinjaTrader ZOrder is another way to describe how you can layer different indicators on a chart. An example of this would be if you wanted an indicator to be in front of the candlesticks or behind the candlesticks?
Below you can find our free price line indicator tool for NinjaTrader 8 in the examples below. In the first example you can see that the grey and pink line are behind the candlesticks.
NinjaTrader ZOrder Example 2
Changing the ZOrder to a positive number puts these indicators in front of the candlesticks.
NinjaTrader ZOrder Example 2

When to use the ZOrder?

Personal Preference

It all depends on the trader and how they want their charts to look. If you would rather have your indicators more visible then you could want them in front. If you wanted to have them less visible because you might focus more on price action, then you have a perfectly good reason to send them into the background.

Cluttered Free Charts

You can also prevent your charts from being less cluttered and organize to see things that you should be able to see without having them be covered up.
Most indicators will have this option available to their users so that you can modify their behavior as you wish. If you have any questions about the ZOrder and how it can be used with our software feel free to reach out to us.

Frequently Asked Questions

What is ZOrder in NinjaTrader and how does it work?

ZOrder in NinjaTrader controls the visual layering of drawn objects, indicators, and chart elements, determining which items appear in front of or behind others. A higher ZOrder value brings an object to the front, while a lower value pushes it behind other elements. This is essential for ensuring that important chart annotations and indicators remain visible and are not obscured by other drawings.

How do I change the ZOrder of an indicator in NinjaTrader?

To change the ZOrder of an indicator in NinjaTrader, you can set the ZOrder property programmatically within your indicator's code, typically in the OnStateChange() method or State.SetDefaults block. You can also adjust layering through the chart's visual properties by right-clicking the indicator and modifying its display settings. Assigning a specific integer value to ZOrder determines its position relative to other chart objects.

Why are my NinjaTrader drawings hidden behind price bars?

If your drawings or indicators are hidden behind price bars, it is likely because their ZOrder value is set lower than that of the price panel's bars. To fix this, increase the ZOrder property of your drawn objects or indicators so they render on top of the price bars. Adjusting ZOrder ensures your custom visuals maintain the correct front-to-back layering on the chart.

What is the default NinjaTrader ZOrder value for custom indicators?

NinjaTrader assigns default ZOrder values to various chart elements, and custom indicators typically receive a default that may place them behind or at the same level as price bars. You can override the default by explicitly setting the ZOrder property in your indicator's code to a higher value. Checking NinjaTrader's documentation for the specific default values of different chart components helps in choosing an appropriate ZOrder.

Can I set ZOrder for draw objects in NinjaScript?

Yes, you can set ZOrder for draw objects in NinjaScript by assigning a value to the ZOrder property of the draw object after it is created. This allows you to control whether a specific line, rectangle, region, or text annotation appears in front of or behind other chart elements. Using ZOrder programmatically gives you precise control over the visual stacking of multiple drawn objects on your NinjaTrader charts.

Frequently Asked Questions

What is ZOrder in NinjaTrader and how does it work?

ZOrder in NinjaTrader controls the visual layering of drawn objects, indicators, and chart elements, determining which items appear in front of or behind others. A higher ZOrder value brings an object to the front, while a lower value pushes it behind other elements. This is essential for ensuring that important chart annotations and indicators remain visible and are not obscured by other drawings.

How do I change the ZOrder of an indicator in NinjaTrader?

To change the ZOrder of an indicator in NinjaTrader, you can set the ZOrder property programmatically within your indicator's code, typically in the OnStateChange() method or State.SetDefaults block. You can also adjust layering through the chart's visual properties by right-clicking the indicator and modifying its display settings. Assigning a specific integer value to ZOrder determines its position relative to other chart objects.

Why are my NinjaTrader drawings hidden behind price bars?

If your drawings or indicators are hidden behind price bars, it is likely because their ZOrder value is set lower than that of the price panel's bars. To fix this, increase the ZOrder property of your drawn objects or indicators so they render on top of the price bars. Adjusting ZOrder ensures your custom visuals maintain the correct front-to-back layering on the chart.

What is the default NinjaTrader ZOrder value for custom indicators?

NinjaTrader assigns default ZOrder values to various chart elements, and custom indicators typically receive a default that may place them behind or at the same level as price bars. You can override the default by explicitly setting the ZOrder property in your indicator's code to a higher value. Checking NinjaTrader's documentation for the specific default values of different chart components helps in choosing an appropriate ZOrder.

Can I set ZOrder for draw objects in NinjaScript?

Yes, you can set ZOrder for draw objects in NinjaScript by assigning a value to the ZOrder property of the draw object after it is created. This allows you to control whether a specific line, rectangle, region, or text annotation appears in front of or behind other chart elements. Using ZOrder programmatically gives you precise control over the visual stacking of multiple drawn objects on your NinjaTrader charts.

New NinjaTrader Articles Delivered First
Recommended Video
XABCD Pattern Indicator Suite
Ditch NinjaTrader ATMs: This Is More Powerful
See how to set your risk and calculate contracts directly on the chart.
Watch Now
(opens in a new tab)
Subscribe on YouTube
(opens in a new tab)
Related Tool
Product image placeholder
XABCD Position Tool
Automatic position sizing and on-chart trade management.
Explore the Tool
Why XABCD Trading
  • Built for NinjaTrader 8 since 2009
  • Trusted by 2,000+ traders
  • On-chart tools, no ATM templates needed
  • Free tools to get started
Free XABCD Tools
Product image placeholder
XABCD News
GET IT
Product image placeholder
XABCD Performance
GET IT
Product image placeholder
XABCD ATM Pack
GET IT
Get Project Updates
Twice-monthly maximum, we will give you updates on all the projects going here.