Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Using ISeries

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

    Using ISeries

    ## What I expect

    When adding `NinjaTrader.Custom.dll` to references and using `NinjaScript` like so
    Code:
    using NinjaTrader.NinjaScript;
    I expected to be able to use `ISeries` because when I mouse over `ISeries` in NinjaTrader it shows `NinjaTrader.NinjaScript.ISeries<double>`


    ## What actually happens

    Visual Study underlines ISeries and said it "could not be found". The code is as follows. With `ISeries<double>` underlined in read.
    Code:
    using NinjaTrader.NinjaScript;
    
    namespace ISeriesBuilder {
        public class ISeriesBuilder {
            private ISeries<double> myDoubleSeries;
        }
    }
    Any ideas? I know imports are probably pretty basic but I'm new to `.Net`.

    #2
    Welcome to the forums Zeero!

    Compiling NinjaScripts in the NinjaScript Editor or through Visual Studio will build NinjaTrader.Custom.dll. It would not be necessary to add a reference for this dll.

    When I test your snippet, I do not see an issue compiling a script in the NinjaScript Editor or Visual Studio that includes
    Code:
     
     using NinjaTrader.NinjaScript;
    and adds the snippet you have provided:
    Code:
     
     using NinjaTrader.NinjaScript;  namespace ISeriesBuilder {     public class ISeriesBuilder {         private ISeries<double> myDoubleSeries;     } }
    If you set up a clean environment, set up a test script and compile the snippet above, do you see any issues when compiling in the NinjaScript Editor? After taking this test, please use the Visual Studio button in the NinjaScript Editor to open Visual Studio, and then use Ctrl + Shift + B to compile the solution.

    Clean environment test:

    Creating a clean environment can be done by following the steps below:
    1. Close NinjaTrader 8, and rename the "NinjaTrader 8" folder in My Documents to something like: "NinjaTrader 8 OLD"
    2. Uninstall NinjaTrader from the Windows Control Panel and reinstall using the installer from http://ninjatrader.com/PlatformDirect
    3. Test building the script in the NinjaScript Editor and then from Visual Studio as directed above.
    If you ever need to switch back to your original platform, you may do so by closing NinjaTrader and swapping the platform folder names.

    For example, Close NinjaTrader and rename the new "NinjaTrader 8" folder to "NinjaTrader 8 NEW" and the "NinjaTrader 8 OLD" folder to "NinjaTrader 8." Then restart the platform. Simply put: NinjaTrader 8 will always load the "NinjaTrader 8" folder in My Documents.

    I look forward to being of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thank you so much NinjaTrader_Jim! This solved my issues.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Taddypole, 04-26-2024, 02:47 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Eduardo  
      Started by futtrader, 04-21-2024, 01:50 AM
      6 responses
      58 views
      0 likes
      Last Post futtrader  
      Started by sgordet, Today, 11:48 AM
      0 responses
      4 views
      0 likes
      Last Post sgordet
      by sgordet
       
      Started by Trader146, Today, 11:41 AM
      0 responses
      5 views
      0 likes
      Last Post Trader146  
      Started by jpapa, 04-23-2024, 07:22 AM
      2 responses
      22 views
      0 likes
      Last Post rene69851  
      Working...
      X