• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Self-made library protected compiled assemblies error

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

    Self-made library protected compiled assemblies error

    Hello.

    I made my own NinjaScript library:


    Code:
    using System;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Data;
    using NinjaTrader.Gui.Chart;
    
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;
    
    namespace i_Lib
    {
        public enum CS { Black, White, Print }; //ColorSet
        public enum TF { H1, D1, W1 }
        public struct BandColors_struct
        {
            public Color fill_color;    
            public Color plots_color;
        }
    }
    I put this code to i_Lib.cs file and saved it to NinjaTrader 7\bin\Custom\Indicator\ folder.

    And I use this library in my different idicators this way:
    Code:
    using i_Lib;
    It work good on my computer.

    Now I need to export some of my indicators, that using this library in protected compiled assembly.

    I can made assembly in my computer.
    But I got error when import assembly on another computer.

    What am I doing wrong?
    Please help.
    Attached Files
    Last edited by fx.practic; 03-12-2015, 01:48 PM.

    #2
    Fx.Practic,

    I tested your code out on my end and was able to export and import into a blank NinjaTrader.

    Are there any other assemblies in your Custom folder?

    Can you try manually importing the .dll, add the reference to the editor and compile?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Cal View Post
      Fx.Practic,
      Can you try manually importing the .dll, add the reference to the editor and compile?
      Excuse me, I don't quite understand what exactly I have to do.



      In attachment:
      i_Lib.cs - my custom library;
      i_ChartTemplate.cs - indicator that using i_Lib;
      I_Chart_Template__I_Lib.zip - protected assembly, that contain i_ChartTemplate.cs and i_ChartTemplate.cs

      I can do assemly, but I cannot import it.
      Attached Files
      Last edited by fx.practic; 03-12-2015, 02:15 PM.

      Comment


        #4
        Originally posted by NinjaTrader_Cal View Post
        Fx.Practic,
        Can you try manually importing the .dll, add the reference to the editor and compile?
        I am understand. Trying now.

        Comment


          #5
          I put dll to bin\Custom folder, add referense, compile an indicator, restart NT and I don't see i_Chart_Template indicator. Did I miss something?
          Attached Files

          Comment


            #6
            Hello fx.practic,

            To check if you have other assemblies imported into NinjaTrader:
            • From the Control Center select the Tools menu -> select the Edit NinjaScript menu item -> select Indicator
            • Select any indicator and double click on it (we need only to open and compile one script to see all compile errors for all files).
            • Right-click the code editor -> select References...
            • Take a screenshot of this window and post the screenshot.


            To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.

            Click here for instructions

            Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

            Click here for detailed instruction
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Got it!

              I moved to bin\Custom folder both X64 and X86 dll's, but add reference only at X64.

              It works.

              Thank You, NinjaTrader_Cal !

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by ct, Today, 01:57 PM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_Jim  
              Started by 7robert, Today, 01:13 PM
              1 response
              7 views
              0 likes
              Last Post NinjaTrader_Jim  
              Started by Newtrader101, Today, 12:52 PM
              2 responses
              7 views
              0 likes
              Last Post Newtrader101  
              Started by 7robert, Today, 12:23 PM
              3 responses
              14 views
              0 likes
              Last Post NinjaTrader_Tyler  
              Started by brownsfan019, Today, 12:52 PM
              3 responses
              9 views
              0 likes
              Last Post NinjaTrader_Tyler  
              Working...
              X