The following CS0200 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 is most common when you try to assign values to a particular DataSeries index through the use of assignment operators (=). Since DataSeries objects have their values set through the Set() method, you cannot modify the value after it has been set through the use of assignment operators.
DataSeries indexed values are read only and cannot be changed through assignment operators. If you wish to set the latest value of the DataSeries please use the Set() method.
// Erroneous Sample Code - Cannot reassign values to DataSeries indexed value
Close = 25;
// Resolution Sample Code - Assigns value to a DataSeries
// Erroneous Sample Code - Cannot reassign values to DataSeries indexed value and cannot have an if statement based // on an assignment operator
if (Close = Open)
// Resolution Sample Code - Properly compares two DataSeries values
if (Close == Open)