NT 8 Compile Seems to Generate NT 7 Errors

I was having problems with a indicator I wrote. Compile errors seem to indicate the compiler was pulling in NT 7 artifacts. I have never had NT7 in this machine. I wrote this script to confirm the compiler was using NT 8 API:

#region Using declarations
using System;
using NinjaTrader.NinjaScript;
using NinjaTrader.NinjaScript.Indicators;
using NinjaTrader.Data;
using System.Windows.Media;
#endregion

namespace NinjaTrader.NinjaScript.Indicators
{
public class TestNT8Indicator : Indicator
{
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Name = “TestNT8Indicator”;
Calculate = Calculate.OnBarClose;
IsOverlay = true;
AddPlot(PlotStyle.Line, “TestPlot”, Brushes.LightBlue);
Plots[0].StrokeThickness = 2;
}
}

    protected override void OnBarUpdate()
    {
        Values[0][0] = Close[0];
    }
}

}

I got the errors:

NinjaScript File Error Code Line Column
TestNT8Indicator.cs Argument 1: cannot convert from ‘NinjaTrader.NinjaScript.PlotStyle’ to ‘NinjaTrader.Gui.Stroke’ CS1503 20 25
TestNT8Indicator.cs Argument 2: cannot convert from ‘string’ to ‘NinjaTrader.NinjaScript.PlotStyle’ CS1503 20 41
TestNT8Indicator.cs Argument 3: cannot convert from ‘System.Windows.Media.SolidColorBrush’ to ‘string’ CS1503 20 53
TestNT8Indicator.cs ‘Plot’ does not contain a definition for ‘StrokeThickness’ and no accessible extension method ‘StrokeThickness’ accepting a first argument of type ‘Plot’ could be found (are you missing a using directive or an assembly reference?) CS1061 21 26

I was running 8.1.4.2 64-bit then installed 8.1.50 and then got this compile error. I uninstalled 8.1.5 and reinstalled 8.1.4.2. Got the same compile error. I created an indicator a few weeks ago and did not have this problem.

Any help is appreciated.

New here. Just trying to understand. Are you using the Ninjascript Editor or VSC / VS?

I am using the NinjaScript Editor

I started getting NT8 IDE errors after installing Quantower SDK for Visual Studio Code.

1 Like