Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Feeding Ninjatrader with Metatrader 4 real time data

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

    Feeding Ninjatrader with Metatrader 4 real time data

    I got quite a lot from this forum, I'm happy to contribute.

    The following application feeds NinjaTrader with Meatrader real time tick data.
    The development is done with VS Express 2008.
    It uses NDDE wrap for DDE service under .NET and NinjaTrader.Client.dll

    Credits to Alejandro Simon , see
    http://www.codeproject.com/Articles/...-Part-3-Get-re

    I contribute it to a public domain. It’s quite a dirty code, I worked on it no more than 2 days. It suits my needs. You can tailor the code according to your needs.

    The application is stable under NinjaTrader 7.0.1000.10 .

    Please remember:
    • Check ATI Interface (File ==> ATI Interface).
    • Add symbols to Ninja using Instrument Manager.
    • Before running the application :
      • Metatrader 4 must be running with DDE Server enabled.
      • Ninjatrader must be connected to an external data feed.

    • Please work with a proper NinjaTrader.Client.dll version. It means, if you’re using - for example - NinjaTrader 7.0.1000.10 , you should use the same version of NinjaTrader.Client.dll . This is a reason I removed NinjaTrader.Client.dll from the attached ZIP file.
    • Only real time data is provided via Metatrader DDE. Historical data cannot be supplied in this mode.


    Remark: a default symbol list is c:\ Currencies.txt . It may be in another place, you can choose it using Symbol List button.

    I removed EXE files from a distribution. If somebody asks I can send an application, however I cannot be sure it will work with your version of Ninjatrader, if not compiled..

    It is not a trading adapter. I don’t use an automated trading. However, it seems, it can be enhanced using an idea from http://paulsfxrandomwalk.blogspot.co...1_archive.html

    Another, not intended feature is, that for Forex you get a tick volume for every bar, because the application feeds Ninja with volume=1 (see NTClient.Bid/Ask/Last ) for every tick.

    Good luck.
    Attached Files
    Last edited by xTrader1; 01-11-2013, 12:56 PM.

    #2
    Hello xTrader1 and first of all thanks alot for your work with MT42Ninja.Unfortnaly I don't have MT4 so I would need to use as dataserver Metaserver RT dde 2.0 that let me to use my dataserver and in my situation there are many traders.The point is that I am not able to program and I wolud like to ask you if you wolud be so kind to change your files to make them able to work with Metaserver RT dde 2.0 and to recive also the volume and in this way helping many traders.I think that you could do the change without many problems because you know your files.
    I hope that you will help US.
    Thank you in advance.
    Last edited by dukati; 03-03-2013, 11:34 AM.

    Comment


      #3
      Thank you xTrader1 for sharing your application It would be great to create charts in NT based on NT4 feed
      I have downloaded it plus VS Express 2008 but I do not know what to do next .
      I do not know how to compile all your 11 files from Mt42Ninja.zip and how to use it.
      Could you please give us some short step by step instruction ?

      And one more question: Is it possible to use your application without closing all other data feed connections (as "external data feed" mode requires to close all the other connections) ?

      Thanks you in advance
      Last edited by rem77; 06-06-2013, 04:32 AM.

      Comment


        #4
        Real time feed to Ninja

        Hello Dukati and xTrader1,
        Can you explain how to get the real time data from MT4 or meta stock to NT7 with volume? And may I know how to install the files uploaded by xTrader1?thanks...


        Originally posted by dukati View Post
        Hello xTrader1 and first of all thanks alot for your work with MT42Ninja.Unfortnaly I don't have MT4 so I would need to use as dataserver Metaserver RT dde 2.0 that let me to use my dataserver and in my situation there are many traders.The point is that I am not able to program and I wolud like to ask you if you wolud be so kind to change your files to make them able to work with Metaserver RT dde 2.0 and to recive also the volume and in this way helping many traders.I think that you could do the change without many problems because you know your files.
        I hope that you will help US.
        Thank you in advance.

        Comment


          #5
          Hi Vamsi,
          Please wait a few days, I'll try to write better explanation.
          Regerding Metaserver DDE , in principle, it should work, may be DDE channel settings are different. I have no Metaserver, I cannot check.

          Comment


            #6
            can you give us the steps , which file should go in which folder of mt4.. please give us the installation steps of the files.
            Thanks

            Comment


              #7
              can u give us the steps where to put each files in whoch folder .. it would be helpful ...

              Thanks
              Aloakdutt

              Comment


                #8
                Hi xTrader1,

                Thanks for sharing your application. I have downloaded your file application but i don't know which files should be place in MetaTrader 4 folders. If possible could you please give some advice how to do it?

                Regards,

                matfx

                Comment


                  #9
                  thnx for contribution.
                  can u send exe file my email id is thanvinarayana[at]gmail[dot]com
                  Last edited by NinjaTrader_PatrickH; 11-24-2013, 10:23 PM. Reason: Changed e-mail format to avoid spam

                  Comment


                    #10
                    My Code.

                    Originally posted by nthanvi View Post
                    thnx for contribution.
                    can u send exe file my email id is thanvinarayana[at]gmail[dot]com
                    Sorry guys,
                    An year ago I post my pre-alpha code, it seems , probably I shouldn't post something so not mature, even if it works for me.
                    I had several questions for help, I didn't answer all of them. I apologize.
                    I didn't trade a lot of time.
                    I hope in the near future I'll have a time to polish this code, or at least I'll try to create detailed installation guide, usable even for not technical folks, I'll provide EXE file with the required DLL's as a package.

                    BTW, this code works with MT4 only, it will not work with MT5, as they removed DDE support.

                    Comment


                      #11
                      XTrader1

                      If you can provide necessary guideline and exe file.

                      So that everyone here can get MT4 data into NinjaTrader.


                      This will be your new yer gift to all of us here.


                      Thanks

                      Comment


                        #12
                        Originally posted by xTrader1 View Post
                        I got quite a lot from this forum, I'm happy to contribute.

                        The following application feeds NinjaTrader with Meatrader real time tick data.
                        The development is done with VS Express 2008.
                        It uses NDDE wrap for DDE service under .NET and NinjaTrader.Client.dll

                        Credits to Alejandro Simon , see
                        http://www.codeproject.com/Articles/...-Part-3-Get-re

                        I contribute it to a public domain. It’s quite a dirty code, I worked on it no more than 2 days. It suits my needs. You can tailor the code according to your needs.

                        The application is stable under NinjaTrader 7.0.1000.10 .

                        Please remember:
                        • Check ATI Interface (File ==> ATI Interface).
                        • Add symbols to Ninja using Instrument Manager.
                        • Before running the application :
                          • Metatrader 4 must be running with DDE Server enabled.
                          • Ninjatrader must be connected to an external data feed.

                        • Please work with a proper NinjaTrader.Client.dll version. It means, if you’re using - for example - NinjaTrader 7.0.1000.10 , you should use the same version of NinjaTrader.Client.dll . This is a reason I removed NinjaTrader.Client.dll from the attached ZIP file.
                        • Only real time data is provided via Metatrader DDE. Historical data cannot be supplied in this mode.


                        Remark: a default symbol list is c:\ Currencies.txt . It may be in another place, you can choose it using Symbol List button.

                        I removed EXE files from a distribution. If somebody asks I can send an application, however I cannot be sure it will work with your version of Ninjatrader, if not compiled..

                        It is not a trading adapter. I don’t use an automated trading. However, it seems, it can be enhanced using an idea from http://paulsfxrandomwalk.blogspot.co...1_archive.html

                        Another, not intended feature is, that for Forex you get a tick volume for every bar, because the application feeds Ninja with volume=1 (see NTClient.Bid/Ask/Last ) for every tick.

                        Good luck.

                        MY NT7 stopped importing anything after using this.

                        Comment


                          #13
                          Hello sumana.m,

                          Am I correct you are unable to import new NinjaScript files - you experience an error that states your current NinjaScript files contain errors?

                          - Open 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).
                          - A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
                          - At the bottom of the window a new section will appear where you can find the error locations.
                          - From there you have the option to comment out offending code sections, remove the complete indicator or debug it to be able to compile again.

                          If you are unsure as to what the error is indicating, please send me a screenshot of the error with the name and description fields clearly readable.

                          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 CRTL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

                          We have also collected more comprehensive steps for resolving NinjaScript programming errors in this tip on our forums - http://www.ninjatrader.com/support/f...ead.php?t=4678
                          JasonNinjaTrader Customer Service

                          Comment


                            #14
                            hi

                            can you post the setup procedure in screenshot ?
                            Is it possible to modify it such a way for BID/ASK for OFA related stuff?

                            thx
                            sumana.m

                            Comment


                              #15
                              Unfortunately, we do not have such screenshots.

                              You can modify the code as xTrader1 mentions in his first post.
                              JasonNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by daywalker1970, Today, 04:44 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post daywalker1970  
                              Started by kaywai, Today, 02:40 PM
                              0 responses
                              23 views
                              0 likes
                              Last Post kaywai
                              by kaywai
                               
                              Started by Angus7, Today, 06:03 AM
                              2 responses
                              53 views
                              0 likes
                              Last Post Angus7
                              by Angus7
                               
                              Started by Rhoamajhunm, Today, 05:15 AM
                              0 responses
                              32 views
                              0 likes
                              Last Post Rhoamajhunm  
                              Started by cannaleafzcoast, Yesterday, 11:46 PM
                              0 responses
                              21 views
                              0 likes
                              Last Post cannaleafzcoast  
                              Working...
                              X