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

# CS0103

The following **CS0103** 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

When a variable is used before declaration, the compiler will not know what it is. This error is also commonly invoked by typos.

Please ensure that you have declared your variables prior to using them. If variables are declared or properties already exist, please check for typos.

## Error Description #1

The name '**identifier**' does not exist in the current context

## Examples

### Example #1

```csharp
// Erroneous Sample Code - 'CurentBar' does not exist since it has been spelled incorrectly (missing an 'r')
if (CurentBar < 10)
```

**Resolution Sample Code** - '**CurrentBar**' exists since it is spelled correctly

```csharp
if (CurrentBar < 10)
```

### Example #2

```csharp
// Erroneous Sample Code - 'newVariable' is not declared
newVariable = 10; 
```

**Resolution Sample Code** - '**newVariable**' is now declared as an integer

```csharp
int newVariable = 10; 
```