Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Can I communicate to another external db or the internal NT sql lite db?

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

    Can I communicate to another external db or the internal NT sql lite db?

    I made a script indicator to send OnMarketData to csv file. It did it but slow. Similar script to send to PosgreSQL DB- does not send anything through the output script window, even though the script compiled well. So, csv is fine- but PostgreSQL is not being sent. Is this my error or NT does not allow communication to other external db's, beside its own, or has some limitations or blocks?
    1. Can I overcome this obstacle somehow?
    2. Or can I connect to the the native internal NT db (liteSQL db, i believe)?

    The error i get is: Indicator 'TonyAugust23': Error on calling 'OnMarketData' method on bar 729: Could not load file or assembly 'Npgsql, Version=2.2.7.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7' or one of its dependencies. The system cannot find the file specified.

    #2
    1. Yes, but it's on you.

    Connecting to external DBs is 'not supported' by NT Support,
    because that code is not under their domain -- but you can do
    these things as much as needed, there are no limits -- well, the
    only limits are your own skills, remember, NT Support will not
    help you, because, duh, it's a 'not supported' kind of thing.

    There are no NinjaScript APIs whatsoever for connecting to an
    external database.

    That said, all external assemblies must be located in bin/Custom
    folder, and references to the assembly must be added using the
    NinjaScript editor -- did you take care of all this correctly?

    2. Yes, but it's on you.

    Connecting to the internal SQLite DB is even more 'not supported'
    than connecting to external DBs. But, whereas, 'no' is more the
    proper answer, just like with answer #1, it really just depends
    on your skills with C# and knowledge of the DB you want to
    connect to.

    There are no NinjaScript APIs whatsoever for connecting to the
    internal SQLite database.

    Just my 2˘.

    Last edited by bltdavid; 10-16-2023, 09:48 AM. Reason: typos

    Comment


      #3
      Hello Ta284333,

      Thank you for your post and welcome to the NinjaTrader forum community!

      As bltdavid has mentioned, both items you have mentioned are not supported by NinjaTrader and therefore we do not have supporting documentation on how to achieve those things. If you choose to connect to an external database or access the NinjaTrader SQLite database, you should do so at your own risk and results may vary.

      For some general information:
      NinjaTrader uses the C# 5.0 programming language targeting .NET 4.8 for developing custom NinjaScript AddOns. Using external programming languages is not documented nor supported and we would not be able to provide assistance.

      Documents\NinjaTrader 8\bin\Custom is the proper place for a 3rd party referenced assembly DLL.

      Support for 3rd party assemblies is limited. Our team is able to assist with adding the DLL and a reference to the DLL, however we cannot assist with its use, or with any errors or unexpected behavior that may occur.

      With that said, we are happy to forward any insightful information we happen to be aware of.

      Below is a link to the help guide on referencing a 3rd party assembly DLL.
      https://ninjatrader.com/support/help...indicators.htm

      Any referenced managed assembly will need to target .NET Framework 4.8 or lower. Other versions of .NET will not work, such as .NET Core or .NET 5.

      Alternatively, unmanaged assemblies can be P/Invoked:
      https://docs.microsoft.com/en-us/dot...nterop/pinvoke
      https://ninjatrader.com/support/foru...300#post777300

      It's possible to use Nuget with Visual Studio to compile DLL for use in NinjaTrader:
      https://ninjatrader.com/support/foru...72#post1042872

      Determining the targeted .NET version for an assembly DLL:
      https://ninjatrader.com/support/foru...858#post798858

      Please let us know if we may be of further assistance.​
      Emily C.NinjaTrader Customer Service

      Comment


        #4
        Wow, what a help you gave?? None of the links works. Not even 1. So the entire NinjaTrader Customer Service was Void. Just empty words. How dissapointing and duplicitous. You just wasted further my time- by pretending to help. But that's how companies go down: By not caring for their clients and by pretending to care. Thank you NinjaTrader for the Void and Nada help- at least you pretended to care! (at least you know what's the ritht action: to care.- Just in your case, it was all fake!). I am sorry I have Lifetime License. I had commited to a culture of opportunism, non caring and non development. Every developer looking at your architecture said: old, inefficient, unfriendly, sloppy, insufficient, inadequate. Look what other companies are doing and offering. You are wellcome to terminate my LifetimeLicense, and return my money. I had had just losses with NinjaTrader. Even every step of the supposed improvements are bad: the new signup does not have feature to remember me on the same computer, so one has always to sign again the password. One should be able to choose on the same machine to not have to do that. The new windows are sloppy, limited, the API is impossible to work with, the data and mouse stoll and freeze when the Market is very active ( i have the best internet money can buy), etc, etc. So many issues. On top of that, while trading you guys added 4 trades to me (and caused me loss, while I was supposed to come out winner on the trades, which was impossible even for me to do because i have no leverage to sustain the 4 trades... Its under "investigation" now- but all I got is again empty procedures and words, walls, obfuscation and "we'll get to you back on that". This company is becoming a cesspool of intoxicated culture and inefficiences. I wander if it is from the top, or middle mannagment.

        Comment


          #5
          Originally posted by Ta284333 View Post
          None of the links works. Not even 1.
          Hmm, I'm sorry to hear that.

          I just tried every link in Emily's post above.

          Every single one works fine for me in Firefox.

          Which browser are you using?

          Comment


            #6
            Hello Ta284333,

            I am understanding you are having some frustrations using the NinjaTrader Platform.

            I'd like to try and offer any other assistance with items you may be struggling with. Please send in an email to scriptingsupport [at] ninjatrader.com, and provide a link to this forum thread.


            With regards to the NinjaTrader Database, access to this is not provided intentionally as a decision by the management team in the early days of NinjaTrader. This area is very sensitive to modification, and creates issues with liability in how orders and executions are displayed and recorded. We do not want our users accessing this part of NinjaTrader.
            Due to this our policy is that database access is not provided or supported by the NinjaTrader Support Staff.

            That said, it may be possible to access the database. Because our team does not want our users accessing this, our team is not able to provide information that would direct you to instructions or sample code on how to access this restricted area. It would be your directive to inquire with the community or find 3rd party education on how to achieve this.

            The information Emily has provided above is some general information to keep in mind if you decide to use a 3rd party assembly. This is not intended to direct you on how to access the database, however access would likely be provided by a 3rd party assembly you will need to reference.

            This thread will remain open for any community members that would like to provide insight.



            You can also contact a professional NinjaScript Consultant some of whom would be eager to create or modify this script at your request or assist you with your script that uses unsupported code. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services.

            You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more!
            Programming Services - https://ninjatraderecosystem.com/sea...mming-services
            Educators - https://ninjatraderecosystem.com/sea...ures=education

            You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third party services for NinjaTrader all pricing and support information will need to be obtained through the consultant.

            This NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.​
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by bltdavid View Post
              Which browser are you using?
              More good reading about 'bad' links is here.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by poplagelu, Today, 05:00 AM
              0 responses
              3 views
              0 likes
              Last Post poplagelu  
              Started by fx.practic, 10-15-2013, 12:53 AM
              5 responses
              5,407 views
              0 likes
              Last Post Bidder
              by Bidder
               
              Started by Shai Samuel, 07-02-2022, 02:46 PM
              4 responses
              98 views
              0 likes
              Last Post Bidder
              by Bidder
               
              Started by DJ888, Yesterday, 10:57 PM
              0 responses
              8 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by MacDad, 02-25-2024, 11:48 PM
              7 responses
              160 views
              0 likes
              Last Post loganjarosz123  
              Working...
              X