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

# CS0200

The following CS0200 error code information is provided within the context of NinjaScript. The examples provided are only a subset of potential problems that this error code may reflect. In any case, the examples below provide a reference of coding flaw possibilities.

## Error Code Explanation

This error is most common when you try to assign values to a particular **Series`\<t\>`** index that is read-only. Instead try making your own [Series\<t>](/developer/desktop-sdk/references/common/iseriest/seriest) and assign the value there.

## Error Description

Property or indexer '**NinjaTrader.NinjaScript.ISeries`\<double\>.this`\[int]**' cannot be assigned to -- it is read only

## Examples

### Example #1

Erroneous Sample Code - Cannot assign values to something that is read-only

```csharp
Close[0] = 25;
```

Resolution Sample Code - Assigns value to a custom Series\<double>

```csharp
myCustomClose[0] = 25;
```

### Example #2

Erroneous Sample Code - Cannot reassign values to Series\<double> indexed value and cannot have an if statement based on an assignment operator

```csharp
if (Close[0] = Open[0]) 
```

Resolution Sample Code - Properly compares two Series\<double> values

```csharp
if (Close[0] == Open[0]) 
```