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

# OnRender()

## Definition

Used to draw custom content to a Market Analyzer Column, such as a graph.

This method is called during the following conditions:

* The Market Analyzer is scrolled
* The user changes the Market Analyzer's properties through the Properties menu
* The Market Analyzer first loads (e.g. restoring from a workspace)
* The height / width of the Market Analyzer window changes
* A user re-sizes the content area by dragging the splitter between the columns

While similar to a Chart Indicator's **OnRender()** method, the Market Analyzer Column uses the **WPF Drawing Context** class, rather than the **SharpDX** library used for **chart rendering**. Concepts between these two methods are guaranteed to be different.

## Method Return Value

This method does not return a value.

## Syntax

You must override the method in your Market Analyzer column with the following syntax:

`protected override void OnRender(DrawingContext dc, System.Windows.Size renderSize) \{  \}`

## Method Parameters

| Parameter      | Description                            |
| -------------- | -------------------------------------- |
| **dc**         | The **drawing context** for the column |
| **renderSize** | The rendering size for the column      |

In order to force **OnRender()** to be called under a specific condition, call the **OnPropertyChanged()** method which will force the entire column to repaint. This approach should be used instead of calling **OnRender()** directly.

## Examples

```csharp
protected override void OnRender(DrawingContext dc, System.Windows.Size renderSize)
{
   // Rendering logic for our Market Analyzer column
}
```