Profile Picture

Futures Calendar spreads

Posted By gc 8 Years Ago
Message
gc
Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)
Posted Wednesday April 15 2009
Hi guys,

I've got an IB data feed and am trading futures, I want to be able to run strategies for calendar spreads.. From what I understand  I will have to check the two symbols in my watchlist for example

CL 042009, CL052009

and in my code create a UserSeries within code and do my stuff against that..  I've been doing this with product spreads and it works fine.

However, when I select the same product I get the following exception

An entry with the same key already exists.

From what I understand the unique key in this case is JUST the symbol name...

Is there any way to solve this problem..???

Thanx in advance

Posted Wednesday April 15 2009
No, the unique key is not just the symbol name. If you're keying your own collection, use the Symbol object itself, not just the name. The symbol name + asset type + expiry + strike + contract type = the symbol key.

gc (4/15/2009)
Hi guys,

I've got an IB data feed and am trading futures, I want to be able to run strategies for calendar spreads.. From what I understand I will have to check the two symbols in my watchlist for example

CL 042009, CL052009

and in my code create a UserSeries within code and do my stuff against that.. I've been doing this with product spreads and it works fine.

However, when I select the same product I get the following exception

An entry with the same key already exists.

From what I understand the unique key in this case is JUST the symbol name...

Is there any way to solve this problem..???

Thanx in advance
gc
Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)
Posted Wednesday April 15 2009
Ofcourse makes sense.. What was I thinking...

Thanx once more for the immediate reply...

Have fun

gc
Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)
Posted Wednesday April 15 2009
Hi

I removed all my code from the trading system and am still getting an exception,

It looks like it's coming from RightEdge. ( Am using only CL 042009 and CL 052009)

An exception of type System.ArgumentException was thrown.
An entry with the same key already exists.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.SortedList`2.Add(TKey key, TValue value)
   at RightEdge.Common.SystemData..ctor(SystemDataCreationSettings settings)
   at RightEdge.Shared.SystemWrapper.CreateNewSystem(SystemRunData data)
   at RightEdge.Shared.SystemWrapper.RunSystem(DateTime start, String filename, ServiceFactory brokerFactory)
   at RightEdge.Shared.SystemWrapper.RunSystem(DateTime start, String filename, ServiceFactory brokerFactory)
   at RightEdge.Shared.TradingModuleWrapper.RunSystem(SystemDataCreationSettings settings, Dictionary`2 historicalData, SystemRunInfo dndInfo, ServiceAppDomainFactory brokerFactoryFactory)
   at RightEdge.SystemProgress.InitAndRunSystem()

Any ideas?

Posted Wednesday April 15 2009
Are you using the latest build of RightEdge?  It looks like you may be hitting a bug that we fixed.

Thanks,
Daniel

gc
Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)
Posted Wednesday April 15 2009
am using 2008 Edition 1 build 383 ??
gc
Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)
Posted Friday April 24 2009
Any luck why this happens??

I installed version 1 build 284 and I still get this error.. (I have commented out all my code).

An exception of type System.ArgumentException was thrown.
An entry with the same key already exists.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.SortedList`2.Add(TKey key, TValue value)
   at RightEdge.Common.SystemData..ctor(SystemDataCreationSettings settings)
   at RightEdge.Shared.SystemWrapper.CreateNewSystem(SystemRunData data)
   at RightEdge.Shared.SystemWrapper.RunSystem(DateTime start, String filename, ServiceFactory brokerFactory)
   at RightEdge.Shared.SystemWrapper.RunSystem(DateTime start, String filename, ServiceFactory brokerFactory)
   at RightEdge.Shared.TradingModuleWrapper.RunSystem(SystemDataCreationSettings settings, Dictionary`2 historicalData, SystemRunInfo dndInfo, ServiceAppDomainFactory brokerFactoryFactory)
   at RightEdge.SystemProgress.InitAndRunSystem()

Posted Friday April 24 2009
The change was only made to Edition 2. I've attached a common.dll that has the change for Ed 1. Please exit RightEdge and replace the Common.dll file in the RightEdge and RightEdge/plugin folders.

Attachments
Common.zip (277 views, 463.00 KB)
gc
Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)Supreme Being (1,905 reputation)
Posted Friday April 24 2009
Thanx alot guys

This fixed the issue..

Once again oustanding help and support!!!w00t



Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems