NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Suggestions and Feedback > Suggestions And Feedback

Suggestions And Feedback New feature suggestions and feedback.

Reply
 
Thread Tools Display Modes
Old 03-13-2009, 11:53 AM   #1
heech
Senior Member
 
Join Date: Nov 2008
Posts: 576
Thanks: 0
Thanked 1 time in 1 post
Default 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?
heech is offline  
Reply With Quote
Old 03-13-2009, 01:05 PM   #2
mgbloomfield
Senior Member
 
Join Date: Dec 2006
Location: Seattle, Washington, USA
Posts: 151
Thanks: 4
Thanked 0 times in 0 posts
Default

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.
mgbloomfield is offline  
Reply With Quote
Old 03-13-2009, 01:41 PM   #3
heech
Senior Member
 
Join Date: Nov 2008
Posts: 576
Thanks: 0
Thanked 1 time in 1 post
Default

Quote:
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.
heech is offline  
Reply With Quote
Old 03-13-2009, 02:36 PM   #4
mgbloomfield
Senior Member
 
Join Date: Dec 2006
Location: Seattle, Washington, USA
Posts: 151
Thanks: 4
Thanked 0 times in 0 posts
Default

Quote:
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.

Quote:
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?

Quote:
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.
mgbloomfield is offline  
Reply With Quote
Old 03-13-2009, 02:59 PM   #5
heech
Senior Member
 
Join Date: Nov 2008
Posts: 576
Thanks: 0
Thanked 1 time in 1 post
Default

Quote:
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.

Quote:
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.
heech is offline  
Reply With Quote
Old 03-13-2009, 03:16 PM   #6
mgbloomfield
Senior Member
 
Join Date: Dec 2006
Location: Seattle, Washington, USA
Posts: 151
Thanks: 4
Thanked 0 times in 0 posts
Default

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.
mgbloomfield is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
About .xml files Paul_J Miscellaneous Support 1 02-12-2009 03:30 AM
NT 7.0 Configuration Requirements RJay Miscellaneous Support 1 02-03-2009 01:48 PM
damaged database or xml files... behealed Miscellaneous Support 1 05-02-2008 05:01 AM
Row Alert configuration mrlucky1x Market Analyzer 1 09-12-2007 12:09 PM
Replicating Configuration bolter Miscellaneous Support 2 04-12-2006 01:12 AM


All times are GMT -6. The time now is 01:55 PM.

FULL RISK DISCLOSURE: Futures trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.