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

# UpdateBar()

## Definition

Updates a data point in our Bars Type.

## Syntax

`UpdateBar(Bars bars, double high, double low, double close, DateTime time, long volumeAdded)`

## Parameters

| Parameter | Description                                 |
| --------- | ------------------------------------------- |
| bars      | The Bars object of your bars type           |
| high      | A double value representing the high price  |
| low       | A double value representing the low price   |
| close     | A double value representing the close price |
| time      | A DateTime value representing the time      |
| volume    | A long value representing the volume        |

## Examples

```csharp
UpdateBar(bars, high, low, close, time, volume);
```