NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 03-05-2009, 12:16 PM   #1
xewoox
Senior Member
 
Join Date: Dec 2008
Posts: 118
Thanks: 0
Thanked 0 times in 0 posts
Default Failed to execute DB job 'StrategyUpdateJob':

Can someone try to tell me what is that mean?

3/5/2009 2:09:40 PM|0|4|Failed to execute DB job 'StrategyUpdateJob': There was an error generating the XML document.: The type NinjaTrader.Strategy.Strategy+SmartWorXAccount was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.

SmartWorXAccount is a data structure. See below

partial class Strategy
{
public struct SmartWorXAccount
{
public int maskId;
public bool enable;
public string ID;
public string name;
public double multiple;
public void Update (string[] info) {
maskId = int.Parse(info[0]);
if (string.Compare(info[1].Trim(),"enable") == 0)
enable = true;
else
enable = false;
ID = info[2].Trim();
name = info[3].Trim();
multiple = double.Parse(info[4]);
}
public string AccountInfo() {
return "Account ("+maskId.ToString()+", "+ enable.ToString()+", \""+ID+"\",\""+name+"\", "+multiple.ToString()+")";
}

}
xewoox is offline  
Reply With Quote
Old 03-05-2009, 12:55 PM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Sure, strategies are XML serialized. The strategy you coded could not be XML serialized by .NET.

Unfortunately we are unable to provide support for using struct in a strategy for that very reason.
NinjaTrader_Dierk 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
Messsage: Default Failed to execute DB job 'StrategyUpdateJob' Torso Miscellaneous Support 1 06-13-2008 10:29 AM
Error: Failed to execute DB job 'StrategyUpdateJob'. IL ATM Strategies (Discretionary Trading) 5 05-19-2008 05:04 AM
Dozens of errors - Failed to execute DB job 'StrategyUpdateJob', etc PocoDiablo Miscellaneous Support 4 04-04-2008 08:44 AM
Market Replay error: Failed to execute DB Job 'StrategyUpdateJob': .... scriabinop23 Historical NinjaTrader 6.5 Beta Threads 1 01-25-2008 05:02 AM
Failed to execute DB Job 'StrategyUpdateJob' zoltran Strategy Development 4 04-11-2007 03:12 AM


All times are GMT -6. The time now is 10:19 PM.