• 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

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 Heavyweight_Prop, Today, 09:06 PM
            1 response
            4 views
            0 likes
            Last Post NinjaTrader_EricB  
            Started by WHICKED, Today, 09:03 PM
            0 responses
            2 views
            0 likes
            Last Post WHICKED
            by WHICKED
             
            Started by saltminer, Today, 05:49 PM
            0 responses
            7 views
            0 likes
            Last Post saltminer  
            Started by brunoviveiros, Today, 05:32 PM
            0 responses
            4 views
            0 likes
            Last Post brunoviveiros  
            Started by shodson, Today, 05:00 PM
            0 responses
            2 views
            0 likes
            Last Post shodson
            by shodson
             
            Working...
            X