> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# ZOrder

## Definition

A unique identifier representing the index in which chart objects are drawn on the chart's Z-axis (front to back ordering). Objects with a higher ZOrder are drawn first.

The ZOrder index should NOT be set using this property. Please use the dedicated [SetZOrder()](/developer/desktop-sdk/references/common/charts/rendering/setzorder) method for this purpose.

## Property Value

A int value representing the order that the object is drawn.  Default value is categorized by the type of object drawn, which will then increment for each instance of the chart object that is drawn.  Each type of object will have a different default starting value to keep these objects separate:

| Chart Bars          | 1     |
| ------------------- | ----- |
| NinjaScript Objects | 10001 |
| Global Draw Objects | 20001 |
| Draw Objects        | 30001 |

## Syntax

ZOrder

## Examples

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
  // call the base.OnRender() to ensure standard Plots work as designed
  base.OnRender(chartControl, chartScale);

  // Print the currently assigned ZOrder index for this NinjaScript object
  Print("Current ZOrder level is: " + ZOrder);
}
```