SmartQuant Discussion
http://www.smartquant.com/forums/

Error with strategy persistence
http://www.smartquant.com/forums/viewtopic.php?f=86&t=14879
Page 1 of 1

Author:  ericwang [ Wed Jan 02, 2019 9:24 am ]
Post subject:  Error with strategy persistence

Hi, when i started a strategy with full persistence, I got the following error and strategy stops updating.

Code:
GUI exception System.ArgumentException: Item has already been added. Key in dictionary: '0 12/28/2018 09:28:16.271 Limit Sell'  Key being added: '0 12/28/2018 09:28:16.271 Limit Sell'
   at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
   at System.Collections.Specialized.OrderedDictionary.Add(Object key, Object value)
   at SmartQuant.Controls.Orders.OrderManagerWindow.ProcessExecutionCommand(ExecutionCommand executionCommand)
   at SmartQuant.Controls.Orders.OrderManagerWindow.UpdateGUI()
   at SmartQuant.Shared.TimerManager.timer_Tick(Object sender, EventArgs e)


How can I reset persistence after it is used (other than rename strategy)?

Thanks

Author:  skuvv [ Fri Jan 04, 2019 11:36 am ]
Post subject:  Re: Error with strategy persistence

Hello,
we know about this problem and solving it.
Actually, this problem is only on displaying (Order Manager window). Strategy works.

Additionally:
1)You can delete files orders.quant and portfolios.quant
2)You can delete saved portfolio/order series from scenario:
Code:
         if (deletePortfolios)
         {
            framework.PortfolioManager.Delete(name);
            framework.OrderManager.Delete(name);
         }

Author:  ericwang [ Thu Jan 10, 2019 5:22 am ]
Post subject:  Re: Error with strategy persistence

Thanks for your reply.

Yes, the error will make GUI chart stop updating.

BTW, I found that the sell side instrument strategy orders will not be recovered after solution restarted, even if they are shown in order manager. I am wondering if it is on purpose to do so?

skuvv wrote:
Hello,
we know about this problem and solving it.
Actually, this problem is only on displaying (Order Manager window). Strategy works.

Additionally:
1)You can delete files orders.quant and portfolios.quant
2)You can delete saved portfolio/order series from scenario:
Code:
         if (deletePortfolios)
         {
            framework.PortfolioManager.Delete(name);
            framework.OrderManager.Delete(name);
         }

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/