Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Connecting to SQL or other database

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

    Connecting to SQL or other database

    I'm looking to have an NT7 strategy read parameter values from either a MySQL or PostgresSQL database. Also, I may want to write values from NT7 to a database at some point.

    Questions:
    Is there anything in NT7 that will prevent or cause problems with a strategy reading/writing to a database?

    Are there any known instances of NT users deploying databases to read/write values?

    #2
    Hello,

    I have seen some developers do this with their own strategies or indicators. Unfortunately it's not something we provide support for or that I have any available documentation on.

    You might consider asking your question here as well: http://ninjatrader.com/support/forum...ad.php?t=22435

    Additionally you could contact one of our consultants to see if they can provide you with additional help on creating a script like this: http://www.ninjatrader.com/partners....pt-Consultants

    Let me know if I can be of further assistance.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Lance,
      If you could clarify a bit further...Is there any part of NT that would prohibit a strategy from reading parameter values from an external database such as MySQL or should I expect behavior like I would see with native C# code?



      Originally posted by NinjaTrader_Lance View Post
      Hello,

      I have seen some developers do this with their own strategies or indicators. Unfortunately it's not something we provide support for or that I have any available documentation on.

      You might consider asking your question here as well: http://ninjatrader.com/support/forum...ad.php?t=22435

      Additionally you could contact one of our consultants to see if they can provide you with additional help on creating a script like this: http://www.ninjatrader.com/partners....pt-Consultants

      Let me know if I can be of further assistance.

      Comment


        #4
        The one problem I would see you running into is the fact that Initialize() can be called multiple times which could lead to your DB file having multiple access calls. Beyond that, the behavior should be the same as C#, however this is unsupported so I cannot say for sure one way or the other.
        LanceNinjaTrader Customer Service

        Comment


          #5
          Okay, thx for the warning abt Initialize() calls.

          Comment


            #6
            Happy to provide you with what I can. If you want to further test the Initialize() calls you can add some Print() statements to it and then open indicator/strategy windows to test for different times it may be called. (refreshing NinjaScript on charts, enabling strategies, opening indicator window, etc)

            (output window found by going to tools -> output window)
            LanceNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by usazencort, Today, 01:16 AM
            0 responses
            1 view
            0 likes
            Last Post usazencort  
            Started by kaywai, 09-01-2023, 08:44 PM
            5 responses
            603 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by xiinteractive, 04-09-2024, 08:08 AM
            6 responses
            22 views
            0 likes
            Last Post xiinteractive  
            Started by Pattontje, Yesterday, 02:10 PM
            2 responses
            21 views
            0 likes
            Last Post Pattontje  
            Started by flybuzz, 04-21-2024, 04:07 PM
            17 responses
            230 views
            0 likes
            Last Post TradingLoss  
            Working...
            X