Posted 8/2/2010 16:01:22
|
|
|
|
Any idea whats causing this exception - I have a 30m RSI on 5m system
RSI14 = New RelativeStrength(14,Close)
AddHandler ThirtyFreq.NewBar, AddressOf NewThirtyBar
SystemData.IndicatorManager.SetFrequency(RSI14, ThirtyFreq)
Indicator value (NaN) did not match RSI Queue value (27.0696790413563) at index 0
at RightEdge.Indicators.RelativeStrength.CalcNewValue(Int32 index)
at RightEdge.Common.SeriesCalculatorBaseWithValues.NewBar()
at RightEdge.Common.IndicatorManager.NewBar(FrequencyNewBarEventArgs args)
at RightEdge.Common.Internal.SystemRunner.UpdateObjects(FrequencyNewBarEventArgs args)
at RightEdge.Common.Internal.SystemRunner.ProcessBarEvents(IEnumerable`1 eventList)
at RightEdge.Common.FrequencyManager.SendPendingBars()
at RightEdge.Common.FrequencyManager.UpdateTime(DateTime dateTime)
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()
|
|
Posted 8/3/2010 12:15:37
|
|
|
|
I haven't been able to reproduce yet, but I can tell you that the source of the error is from the calculation itself. We're looking for smoothed upward and downward values. This is the meat of the RSI calculation. We're getting a NaN from that calculation where we expect a value.
I wrote a quick system that creates an RSI indicator and calls
SystemData.IndicatorManager.SetFrequency(rsi30, FiveSecondFreq);
I'm doing a 5 second frequency to see if I can get it to happen faster. So far, no luck. Maybe you can post more of your system as their may be other bits we're not considering here.
|
|
|
|