RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



EXCEPTION DivideByZeroException when running... Expand / Collapse
Message
Posted 3/17/2011 07:22:19 Post #12979
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
As this exception does not mention my code, I have no idea where to look.

An exception of type System.DivideByZeroException was thrown.
Attempted to divide by zero.
at RightEdge.Common.TimeFrequency.RoundTime(DateTime date, TimeSpan period)
at RightEdge.Common.TimeFrequency.x672bb09993343f2e.xfc18b789d02886f4(DateTime x7717ba0493114c75)
at RightEdge.Common.TimeFrequency.x672bb09993343f2e.ProcessTick(TickData tick)
at RightEdge.Common.FrequencyManager.x35d97af2423338b7(TickData x0b5a48bb98ab819f, FreqInfo x6496a2fed95c219f)
at RightEdge.Common.FrequencyManager.UpdateTime(DateTime dateTime)
at RightEdge.Common.FrequencyManager.ProcessBar(SingleBarEventArgs newBar)
at RightEdge.Common.Internal.SystemRunner._tickGenerator_NewBar(Object sender, NewBarEventArgs e)
at RightEdge.Common.TickGenerator.ProcessBar(NewBarEventArgs args)
at RightEdge.Common.Internal.SystemRunner.ProcessBar(NewBarEventArgs newBars)
at RightEdge.Shared.SystemWrapper.RunSystem(SystemData systemData, SharedSystemRunData runData, ServiceFactory brokerFactory)
at RightEdge.Shared.SystemWrapper.RunSystem(String filename, ServiceFactory brokerFactory, PluginSettings dataStoreSettings)
at RightEdge.Shared.SystemWrapper.RunSystem(String filename, ServiceFactory brokerFactory, PluginSettings dataStoreSettings)
at RightEdge.Shared.TradingModuleWrapper.Run(String filename)
at RightEdge.Shared.TradingModuleWrapper.RunSystem(SharedSystemRunData systemRunData)
at RightEdge.SystemProgress.InitAndRunSystem()


Regards,
PBJ
Posted 3/17/2011 11:27:09 Post #12981
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
Are you creating a TimeFrequency with a BarLength of zero by any chance?

Daniel
Posted 3/20/2011 05:01:46 Post #12991
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
dplaisted (3/17/2011)
Are you creating a TimeFrequency with a BarLength of zero by any chance?

Daniel


No Daniel, I'm sorry, it's not going to be that easy
FYI, I managed to run the exact same code on minute bars instead of ticks with no modification at all. Does RE perform computations based on tick data without checking first if the tick is non-null?

Regards,
PBJ
Posted 3/29/2011 01:03:58 Post #13012
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
If the data storage plugin returned null for a tick, a different error would occur. I've looked at the code that is throwing the exception several times, and the only way I can see for it to happen is to have a frequency with a BarLength of zero. If you're not creating that in code, can you check what the frequency is set to in the system properties? Does the same error happen when you create an empty system and run it on the same tick data?

Thanks,
Daniel
Posted 3/29/2011 03:40:37 Post #13016
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
Thanks Daniel. I won't have the time to have a look at it right now but will try to get back to you in a few days. In the meantime, feel free to reply to this post should you need to fix it quickly.
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb, young, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 5:10pm

2005-2007 © RightEdge Systems