• 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

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.
    https://ninjatrader.com/support/foru...442#post514442

    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.

                https://ninjatrader.com/support/foru...442#post514442

                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.

                      https://ninjatrader.com/support/foru...442#post514442

                      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 Dan_D_Trader, Today, 03:49 PM
                            0 responses
                            4 views
                            0 likes
                            Last Post Dan_D_Trader  
                            Started by JohnAymin, Today, 02:38 PM
                            1 response
                            6 views
                            0 likes
                            Last Post NinjaTrader_Tyler  
                            Started by Rmos22, Today, 02:20 PM
                            2 responses
                            23 views
                            0 likes
                            Last Post Rmos22
                            by Rmos22
                             
                            Started by sawtooth500, Today, 12:59 PM
                            1 response
                            9 views
                            0 likes
                            Last Post NinjaTrader_Spencer  
                            Started by Steve L, Yesterday, 09:36 PM
                            1 response
                            24 views
                            0 likes
                            Last Post NinjaTrader_Kate  
                            Working...
                            X