> 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.

# ZOrderType

## Definition

Determines the order in which sthe drawing tool will be rendered. This will help control the [ZOrder](/developer/desktop-sdk/references/common/charts/rendering/chart-zorder) index between chart objects

## Property Value

An enum determining the drawing tool's ZOrder type.  Possible values are:

| Name                                   | Description                                                                                                                                               |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **DrawingToolZOrder.Normal**           | Default behavior, drawing tools are rendered as they appear in the [ZOrder](/developer/desktop-sdk/references/common/charts/rendering/chart-zorder) index |
| **DrawingToolZOrder.AlwaysDrawnFirst** | Ensures the drawing tool is always the first to be rendered                                                                                               |
| **DrawingToolZOrder.AlwaysDrawnLast**  | Ensures the drawing tool is always the last object to be rendered                                                                                         |

## Syntax

`ZOrderType`

## Examples

```csharp
protected override void OnStateChange()  
{  
  if (State == State.SetDefaults)  
  {  
    Name               = @"My Drawing Tool";  
           
    // always draw this last  
    ZOrderType           = DrawingToolZOrder.AlwaysDrawnLast;  
  }  
  else if (State == State.Configure)  
  {  
  }  
}
```