Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

FileNotFound exception

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

    FileNotFound exception

    Hello.
    I have write some indicator for sending order information by tcp protocol. I am use my MessageManager.dll for this. All working good except one thing...
    Screen
    When i try to deserialize message from server i have exception. NinjaTrader can't find "MessageManager.dll".
    I put it in "c:\Users\[UserName]Documents\NinjaTrader 7\bin\Custom\" folder. And other functions from this dll working good... But deserialization... Can anybody help me?

    #2
    Hello Dzammer,

    Thank you for your inquiry.

    Please ensure that you have added your .DLL to NinjaTrader's References. To do this, please click on Tools -> Edit NinjaScript -> Indicator. Select any indicator and select OK.

    Upon the code editor opening for the indicator you have selected, please right-click inside of the code editor and select References. Click Add and then add the MessageManager.dll as a reference. I would also suggest restarting the platform.

    Please, let us know if this does not resolve your issue.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ZacharyG View Post
      Hello Dzammer,

      Thank you for your inquiry.

      Please ensure that you have added your .DLL to NinjaTrader's References. To do this, please click on Tools -> Edit NinjaScript -> Indicator. Select any indicator and select OK.

      Upon the code editor opening for the indicator you have selected, please right-click inside of the code editor and select References. Click Add and then add the MessageManager.dll as a reference. I would also suggest restarting the platform.

      Please, let us know if this does not resolve your issue.
      I'll do that. And restart platform. But still not woring.

      Comment


        #4
        Hello Dzammer,

        In order to diagnose this issue further, can you please attach and mail both the .DLL file and a sample script that utilizes the .DLL file so we may test it on our end to platformsupport [AT] ninjatrader [DOT] com with my name and a link to this thread referenced?
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          Hello, NinjaTrader_ZacharyG.
          I have attached indicator and .dll. All settings include in indicator. You can only add indicator on the chart, and you see this exception (i have remove try-catch from dll). In dll error appear in this line
          result = (MessageItem)formatter.Deserialize(nw_stream);
          where
          formatter = new BinaryFormatter();
          and
          nw_stream = client.GetStream(); (client - TcpClient)

          in same (MessageManager.dll) library i have Serialize method
          formatter.Serialize(nw_stream, msg_item);
          And it work perfectly.
          Attached Files

          Comment


            #6
            Hello Dzammer,

            Unfortunately, it looks like I am unable to open the MessageManager.zip file you have provided.

            Can you please re-upload this file?
            Zachary G.NinjaTrader Customer Service

            Comment


              #7
              Try this, please.
              Attached Files

              Comment


                #8
                Hello Dzammer,

                As you are able to create a new instance of the Messenger, this would denote that NinjaTrader is indeed able to see this file. However, there seems to be an issue with calling the Connect() method on your Messenger object and it is causing your script to have an error.

                Unfortunately, assisting further with debugging your .dll file to find the cause of this issue is outside the realms of NinjaTrader support.
                Zachary G.NinjaTrader Customer Service

                Comment


                  #9
                  I have some experiments and put my dll to all folders linked with NinjaTrader. And i find issue. When i put my dll in "c:\Program Files (x86)\NinjaTrader 7\bin64\" for x64 version and in "c:\Program Files (x86)\NinjaTrader 7\bin\" for x32 version of NT it work. I dont know why, but when i use my library in one line of code NT try to find dll in "c:\Users\[UserName]\Documents\NinjaTrader 7\bin\Custom\" folder and in other line of same dll, NT try to find dll in "c:\Program Files (x86)\NinjaTrader 7\bin64\" folder.
                  And other question, how can i export my Indicator, that other people can only import and use it, without copy dll to Program files folder and adding refferences?

                  Comment


                    #10
                    Hello Dzammer,

                    The DLL file should only be placed in (My) Documents\NinjaTrader 7\bin\Custom and not in any of those other folders mentioned.

                    I would suggest reading this link from the NinjaTrader help guide for further information on the procedures on how to add DLL files to your export: http://ninjatrader.com/support/helpG..._procedure.htm
                    Zachary G.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by DJ888, 04-16-2024, 06:09 PM
                    6 responses
                    18 views
                    0 likes
                    Last Post DJ888
                    by DJ888
                     
                    Started by Jon17, Today, 04:33 PM
                    0 responses
                    1 view
                    0 likes
                    Last Post Jon17
                    by Jon17
                     
                    Started by Javierw.ok, Today, 04:12 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post Javierw.ok  
                    Started by timmbbo, Today, 08:59 AM
                    2 responses
                    10 views
                    0 likes
                    Last Post bltdavid  
                    Started by alifarahani, Today, 09:40 AM
                    6 responses
                    41 views
                    0 likes
                    Last Post alifarahani  
                    Working...
                    X