I am getting same error when I am trying to create a custom drawing tool.
2024-06-06 19:18:03:158 *************** unhandled exception trapped ***************
2024-06-06 19:18:03:158 The value "NinjaTrader.NinjaScript.DrawingTools.PriceLev el" is not of type "NinjaTrader.NinjaScript.DrawingTools.PriceLev el" and cannot be used in this generic collection.
Parameter name: value
2024-06-06 19:18:03:158 System.ArgumentException: The value "NinjaTrader.NinjaScript.DrawingTools.PriceLev el" is not of type "NinjaTrader.NinjaScript.DrawingTools.PriceLev el" and cannot be used in this generic collection.
Parameter name: value
at System.ThrowHelper.ThrowWrongValueTypeArgumentExce ption(Object value, Type targetType)
at System.Collections.Generic.List`1.System.Collectio ns.IList.Add(Object item)
at NinjaTrader.NinjaScript.DrawingTools.PriceLevelCon tainer.CopyTo(NinjaScript ninjaScript) in C:\Users\RVReady\Documents\NinjaTrader 8\bin\Custom\DrawingTools\@PriceLevels.cs:line 239
at NinjaTrader.Gui.Chart.GlobalDrawingToolManager.OnC hanged(ChartControl source, DrawingTool drawingTool)
at NinjaTrader.Gui.Chart.GlobalDrawingToolManager.Che ckGlobalAttachToChanged(ChartControl source, DrawingTool original, DrawingTool edited)
at NinjaTrader.Gui.Chart.ChartDrawingToolCommands.<>c __DisplayClass44_0.<OnDrawingObjectPropertiesExecu ted>g__ApplyHandler|4(IEnumerable`1 editItems)
at NinjaTrader.Gui.Chart.DrawingToolEditor.OnOkClick( Object sender, RoutedEventArgs e)
at System.Windows.EventRoute.InvokeHandlersImpl(Objec t source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(Dependency Object sender, RoutedEventArgs args)
at System.Windows.Controls.Primitives.ButtonBase.OnCl ick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMo useLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Deleg ate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandle r(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Objec t source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(Dependency Object sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Deleg ate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandle r(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Objec t source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(Dependency Object sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedE ventArgs args)
at System.Windows.Input.InputManager.ProcessStagingAr ea()
at System.Windows.Input.InputManager.ProcessInput(Inp utEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput (InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.Repo rtInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.Filt erMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessa ge(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation( Object o)
at System.Windows.Threading.ExceptionWrapper.Internal RealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatch When(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Comment