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
// Erroneous Sample Code - SMA() indicator method is improperly called
double myValue = SMA;
// Resolution Sample Code - SMA() indicator method is properly called
double myValue = SMA(5);
// Erroneous Sample Code - ToString is a method and requires round brackets () to be properly called
string str = Close.ToString;
// Resolution Sample Code - ToString() is properly called
string str = Close.ToString();