Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 Data exchange from NTDirect.dll to other platforms

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

    NT8 Data exchange from NTDirect.dll to other platforms

    Hello i want to create a bridge from nt8 to mt4. I want to use dll and not file option.
    What i need is when i open a new order on nt8 sent this info with the price of order filled SL TP. So i need to share order info ONLY from nt8 TO mt4.

    I tried to import the NTDirect.dll on mql4 script. But i got only zero on log. But i trade forex and my order was 0.02. but the int Filled(string orderId) is int.
    And i also had to put manually the string with the id of the order.


    P.S. I am not looking someone or the support to code that from me. I just doing this exchange thing for first time with ninja. So if you can advice me on where to look would be a lot helpful.

    thank you

    #2
    Hello stoxos,

    Thank you for your note.

    So I may best answer your question, could you provide more information.
    Is it NinjaTrader reporting 0’s for quantity to mt4? Or is mt4 reading these as zeros?

    In your example your trade size for .02 was 20,000?

    On the control center>Accounts Tab>Right Click on the account>edit, what is your Forex Lot Size set to?

    For reference here is a post that gives an overview of how to use the DLL interface.


    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hello sorry for the bit late response and thank you for your fast answer. My lot was 2000 it was microlot fxcm demo. Yeah the output is in mt4 console. I saw the videos very helpful and i had a progress after that.

      The current state. I connect to NT dll successfully , i subscribe to a market successfully
      ,everything untill here is working great.
      But i try to get last price or bid and i get 0.0.


      int constatus=Connected(1);
      if(constatus==0){
      Print("Connected");
      }else{
      Print("Not Connected");
      }
      int subscribed=SubscribeMarketData("EURUSD");
      if(subscribed==0){
      Print("Subscribed");
      }else{
      Print("Not Subscribed");
      }
      double lastprice=MarketData("EURUSD",2);
      Print(lastprice);

      Comment


        #4
        Hello stoxos,

        If you try pulling the last price rather than the offer, do you see prints?

        double lastprice=MarketData("EURUSD",0);

        I look forward to your reply.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Yes i tried everything last offer bid, still get zero. ATI is enabled. Connection is right. only data doesnt come.

          any suggestion?

          thank you!

          Comment


            #6
            Hello stoxos,

            Would you please connect to the simulated data feed and try to pull data for ES 09-18?

            double lastprice=MarketData("ES 09-18",0);

            Do you see prints?

            I look forward to your reply.
            Alan P.NinjaTrader Customer Service

            Comment


              #7
              I tried es too but not luck still 0.0. maybe is something with mql4
              on Monday i will i try a script on mql5.

              If you have any idea/ suggestion even if you are not sure please share it, cause it maybe be helpful.

              Thank you.

              Comment


                #8
                Hello stoxos,

                We are unable to support outside applications but you may read this post that gives an overview of how to use the DLL interface. The examples are written in C# but it should help nonetheless.



                If we may be of any further assistance, please let us know.
                Alan P.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by stoxos View Post
                  If you have any idea/ suggestion even if you are not sure please share it, cause it maybe be helpful.
                  Even though it's for NT7, this product may offer some ideas.

                  Perhaps they have an NT8 version ... good luck!

                  Comment


                    #10
                    Originally posted by bltdavid View Post
                    Even though it's for NT7, this product may offer some ideas.

                    Perhaps they have an NT8 version ... good luck!
                    Thank you my friend, i have already look on it . But i use only nt8 not going back to nt7 (a lot o features missing). And i also dont want a commercial solution.

                    Comment


                      #11
                      Originally posted by NinjaTrader_AlanP View Post
                      Hello stoxos,

                      We are unable to support outside applications but you may read this post that gives an overview of how to use the DLL interface. The examples are written in C# but it should help nonetheless.



                      If we may be of any further assistance, please let us know.
                      Of course you are unable there is no way to assist me on an mql4 code. Its not your product.

                      After a lot of testing and reading i found a logic to solve my problem.

                      DONT USE NTDirect.dll, yes it connects but always returns nothing. So you should use The NinjaTrader.Client.dll can be found in:
                      32 bit - C:\Program Files (x86)\NinjaTrader 8\bin\NinjaTrader.Client.dll
                      64 bit - C:\Program Files (x86)\NinjaTrader 8\bin64\NinjaTrader.Client.dll

                      The version of the dll you must be always the same as the program. So example a mt4 is 32 bit. So you need the 32bit bin\NinjaTrader.Client.dll.

                      When i finish i probably going to publish my bridge from nt8 to mt4/5 on the forum

                      P.S. the post with example is very helpful.

                      Thank you Support!

                      Comment


                        #12
                        Hello stoxos,

                        Thank you for sharing this helpful information.

                        I'm sure the forum would appreciate seeing your sample when you finish.

                        Please let us know if you need further assistance.
                        Alan P.NinjaTrader Customer Service

                        Comment


                          #13
                          Hello Stoxos,

                          Were you succesfull developing your nt8 - mt4/5 bridge?

                          Regards,

                          Guilherme.

                          Comment


                            #14
                            Originally posted by guidalpi View Post
                            Hello Stoxos,

                            Were you succesfull developing your nt8 - mt4/5 bridge?

                            Regards,

                            Guilherme.
                            Nope man i had other stuff, no time, i am currently using multiple screens. But if i make it i will post it here.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by frankthearm, Today, 09:08 AM
                            3 responses
                            7 views
                            0 likes
                            Last Post NinjaTrader_Clayton  
                            Started by yertle, Today, 08:38 AM
                            5 responses
                            15 views
                            0 likes
                            Last Post NinjaTrader_BrandonH  
                            Started by adeelshahzad, Today, 03:54 AM
                            3 responses
                            16 views
                            0 likes
                            Last Post NinjaTrader_BrandonH  
                            Started by bill2023, Yesterday, 08:51 AM
                            6 responses
                            27 views
                            0 likes
                            Last Post NinjaTrader_Erick  
                            Started by NinjaTrader_ChelseaB, 01-08-2017, 06:59 PM
                            80 responses
                            19,667 views
                            5 likes
                            Last Post NinjaTrader_ChelseaB  
                            Working...
                            X