NinjaScript > Editor > Compile Error Codes >

CS0117

Print this Topic Previous pageReturn to chapter overviewNext page

The following CS0117 error code information is provided within the context of NinjaScript. The examples provided are only a subset of potential problems that this error's 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 try to use a method or access an exposed property that does not exist for your particular object.

 

Please check the methods and exposed property available for your particular object.

 

Error Description #1
'double' does not contain a definition for 'Set'

// Erroneous Sample Code - DataSeries object’s value does not have a Set() method. Only a DataSeries object does

SMA(5)[0].Set(5);

 

// Resolution Sample Code - DataSeries using the Set() method

Plot0.Set(SMA(5)[0]);

 

Error Description #2
'NinjaTrader.Indicator.CurrentDayOHL' does not contain a definition for 'CurentOpen'

// Erroneous Sample Code - CurrentDayOHL()’s property is 'CurrentOpen' not 'CurentOpen' (typo)

double value = CurrentDayOHL().CurentOpen[0];

 

// Resolution Sample Code - 'CurrentOpen' property available

double value = CurrentDayOHL().CurrentOpen[0];