CS0428
<< Click to Display Table of Contents >> 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.
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 '()'.
// 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)[0];
// Erroneous Sample Code - ToString is a method and requires round brackets () to be properly called
string str = Close[5].ToString;
// Resolution Sample Code - ToString() is properly called
string str = Close[5].ToString();