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

# CS1501

The following CS1501 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 can occur when you use an overload (method parameter signature) that does not exist. This could be because you are passing in 3 arguments when the method only requires 2.

You can cycle through the available overloads with the use of the up and down arrows on the **Intelliprompt** when you call an indicator method or any other method.

## Error Description #1

No overload for method '**SMA**' takes '0' arguments

## Examples

### Example #1

Erroneous Sample Code - **SMA()** does not contain an overload that has 3 arguments

```csharp
double myValue = SMA(Close, 5, 2)[0];
```

Resolution Sample Code - **SMA()** has an overload consisting of 2 arguments

```csharp
double myValue = SMA(Close, 5)[0];
```

### Example #2

Erroneous Sample Code - **EMA()** does not contain an overload that has 0 arguments

```csharp
double myValue = EMA()[0]; 
```

Resolution Sample Code - **EMA()** has an overload consisting of 1 argument

```csharp
double myValue = EMA(5)[0]; 
```