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

# CS0428

The following **CS0428** 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 miscall a method such as indicator methods.

If you are calling an indicator please ensure that you have both the parameters '()' and the indexing value '\[]' set. For other methods please ensure you pass all required parameters through the parameters set '()'.

## Error Description #1

**Cannot convert method group 'SMA' to non-delegate type 'double'. Did you intend to invoke the method?**

## Examples

### Example #1

```csharp
// Erroneous Sample Code - SMA() indicator method is improperly called
double myValue = SMA;
```

```csharp
// Resolution Sample Code - SMA() indicator method is properly called
double myValue = SMA(5)[0];
```

### Example #2

```csharp
// Erroneous Sample Code - ToString is a method and requires round brackets () to be properly called
string str = Close[5].ToString; 
```

```csharp
// Resolution Sample Code - ToString() is properly called
string str = Close[5].ToString(); 
```