• 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

Suggestion for NT7: Use XML files for configuration

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

    Suggestion for NT7: Use XML files for configuration

    Hi,

    I've heard NT7 will hopefully be easier to automate (auto-connection, etc). I hope that's the case. I'd love to see NT7 also automatically start a strategy as well.

    If that exists, my suggestion is that NT7 provides a XML file format for defining parameters to be passed into these strategies. All of the parameters (account, begin/end time, skip weekends, GTC, etc...) can just be defined in the xml file.

    It'd make my life 1000 times easier. Well, maybe not 1000... 2?

    #2
    Then what happens when you incorrectly modify the XML configuration file? When NinjaTrader tries to load the XML configuration file, it bombs. Then, what happens? People will post 100 hundreds of threads on NinjaTrader, "NinjaTrader does not load my strategy! What is going on!?"

    Then NinjaTrader support people will have spend time responding to each thread, "We do not support people modifying the XML configuration file. Please leave it alone."

    From a developer perspective (me) -- I love XML configuration files.

    But from a support perspective -- a time drain.

    If you want NinjaTrader to auto-start a strategy, then the configuration will probably be in the Access db that stores everything else.

    Comment


      #3
      Originally posted by mgbloomfield View Post
      Then what happens when you incorrectly modify the XML configuration file? When NinjaTrader tries to load the XML configuration file, it bombs. Then, what happens? People will post 100 hundreds of threads on NinjaTrader, "NinjaTrader does not load my strategy! What is going on!?"
      I don't think the two are mutually exclusive. NinjaTrader has a "generate configuration" tool which always outputs legal XML; those who want more advanced functionality can output our own.

      Putting it in XML makes it human-readable (obviously), and more usefully to me, makes it possible for me to tweak the configuration parameters easily through other tools.

      Comment


        #4
        Originally posted by heech View Post
        I don't think the two are mutually exclusive. NinjaTrader has a "generate configuration" tool which always outputs legal XML;
        Of course, NinjaTrader will output and update the XML.

        Originally posted by heech View Post
        those who want more advanced functionality can output our own.
        Those who output their own will have to make assumptions on the XML schema. Do you really want NinjaTrader to spend development/support cycles on this?

        Originally posted by heech View Post
        Putting it in XML makes it human-readable (obviously), and more usefully to me, makes it possible for me to tweak the configuration parameters easily through other tools.
        Give me a scenario where exposing the XML configuration to your "other tools" is meaningful and compelling.

        Comment


          #5
          Originally posted by mgbloomfield View Post
          Those who output their own will have to make assumptions on the XML schema. Do you really want NinjaTrader to spend development/support cycles on this?
          It really doesn't seem like it would be a challenging task. I'm talking about a XML-based replacement to the "new strategy" screen. Just a series of elements, with an attribute equal to the variable name, and the corresponding value.

          Gee, what if someone reaches into the .mdb file and screws up the database? How will NT support that? Here's one possible answer to both the XML and database case: it doesn't. Your custom mods either work, or they don't.

          By the way, XML serialization in C# takes one line of code + a few lines of compiler tags. If you haven't done it, maybe you think it's complicated.

          Give me a scenario where exposing the XML configuration to your "other tools" is meaningful and compelling.
          1) When I first deploy a new strategy, I like to raise the debugging level on my output messages. (And after a few days, I'll usually drop it down.) Rather than putting this in my strategy, I'd rather have my build scripts take care of it.

          2) Depending on overnight volatility (futures), I would adjust the Period value for the primary bar in my strategy.

          3) Depending on the current margin balance in different accounts, I would select the account that a specific strategy is to be run in.

          Meaningful and compelling to me. I could get around most of this, but not as elegantly and easily as XML file. That said, I *could* get by with the database approach too... I can just reach in there and modify my values. I just don't see why human-readable parameters should ever be stored in anything other than XML.

          Comment


            #6
            What if you created an indicator that loads your XML configuration file?

            The strategies that use the indicator can retrieve the appropriate values from the indicator.

            In your case, put the strategy's Period in the XML configuration file. The indicator loads it (during strategy's Initialization and OnBarUpdate). Your build scripts can update the indicator's XML configuration file.

            I had an indicator that loaded a configuration file every 5 minutes (the chart was a 5 minute bar chart). In turn, the strategy used the indicator's updated values.

            By using an indicator to load the XML (and write the XML, if necessary), you can use the indicator in multiple strategies.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by dshalom9, Today, 08:36 AM
            9 responses
            13 views
            0 likes
            Last Post NinjaTrader_PatrickG  
            Started by stock_wizard_49, 07-11-2020, 06:57 PM
            1 response
            16 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Started by asmmbillah, Yesterday, 03:03 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by AspenHiker, Today, 08:37 AM
            0 responses
            7 views
            0 likes
            Last Post AspenHiker  
            Started by StarTrader, 07-11-2020, 11:27 AM
            2 responses
            20 views
            0 likes
            Last Post StarTrader  
            Working...
            X