Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

General Dev Environment

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    General Dev Environment

    I'm using Ninja Trader 8 and Visual Studio 2022 Pro trying to develop my own volume indicator
    I followed the instructions and added NinjaTrader.Core, NinjaTrader.Gui and PresentationCore(4.8.1) to my project references

    My Code is just for testing purposes

    using NinjaTrader.Gui;
    using NinjaTrader.NinjaScript;
    using NinjaTrader.NinjaScript.DrawingTools;
    using System.Windows.Media;

    namespace NinjaTrader.NinjaScript.Indicators
    {
    public class TestIndicator : NinjaTrader.NinjaScript.Indicator
    {
    protected override void OnBarUpdate()
    {
    Draw.Line(this, "TestLine", true, 10, Close[10], 0, Close[0], Brushes.White, DashStyleHelper.Solid, 1);
    }
    }
    }​

    and I'm getting: CSO0234 The type or namespace name 'Indicator' does not exist in the namespace 'NinjaTrader.NinjaScript' (are you missing an assembly reference?)

    Would appreciate any word of wizdom.

    TNX

    #2
    Hello RickJames,

    Thank you for your post.

    There are missing Using declarations, as well as a syntax error in the class declaration.
    When you begin developing an indicator, we highly suggest starting with the NinjaScript Wizard, which will generate the minimum necessary code for the script.
    For more information, please review the NinjaScript Wizard page of our Help Guide:The generated code would include the appropriate Using statements and class declaration. You will notice this code wouldn't use NinjaTrader.NinjaScript.Indicator, just Indicator in the class declaration.
    Code:
    public class TestIndicator : Indicator
    I also recommend reviewing our Help Guide page that explains how to use Visual Studio with NinjaScript Editor.
    When you use Visual Studio for editing, ensure that you save the file (don't run or build the solution then in Visual Studio), preferably with the NinjaScript editor opened still at the same time, so changes would be auto compiled by NinjaTrader.

    If you have any other questions or need further assistance, please let me know.​

    Comment


      #3
      Though i appreciate your reply, you didn't answer my questions
      Which references do i need to develop a NinjaTrader Indicator within VS 2022
      Your guide names 3
      they are all listed.

      TNX

      Comment


        #4
        Hello,

        Thank you for your reply.

        Please be aware that building the entire indicator in Visual Studio is not supported, as you will ultimately also need to use the NinjaScript Editor.

        I am unfortunately not certain which guide you are referring to.
        If this is something we have published, please respond with a link to it.

        I quickly generated an indicator script from the NinjaScript Wizard, and these are the Using references it generated:

        #region Using declarations
        using System;
        using System.Collections.Generic;
        using System.ComponentModel;
        using System.ComponentModel.DataAnnotations;
        using System.Linq;
        using System.Text;
        using System.Threading.Tasks;
        using System.Windows;
        using System.Windows.Input;
        using System.Windows.Media;
        using System.Xml.Serialization;
        using NinjaTrader.Cbi;
        using NinjaTrader.Gui;
        using NinjaTrader.Gui.Chart;
        using NinjaTrader.Gui.SuperDom;
        using NinjaTrader.Gui.Tools;
        using NinjaTrader.Data;
        using NinjaTrader.NinjaScript;
        using NinjaTrader.Core.FloatingPoint;
        using NinjaTrader.NinjaScript.DrawingTools;
        #endregion

        Please let me know if I may be of any further assistance.

        Comment


          #5
          Again thanks
          i see issue, i am missing
          NinjaTrader.NinjaScript.dll​, which isn't stored in my NinjaTrader installation Directory
          Weird

          where can i find the file?

          Comment


            #6
            Are you receiving a compile error?
            If so, please reply with a screenshot.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            558 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            324 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            545 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            547 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X