RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



RelativeStrength LookBack Expand / Collapse
Message
Posted 2/21/2010 20:29:05 Post #10922
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
RSI.LookBack(1) throws the following error


An exception of type System.ArgumentOutOfRangeException was thrown.
Value must be between 0 and 0, value was 1
Parameter name: nBars
at RightEdge.Common.RList`1.LookBack(Int32 nBars)
at MySymbolScript.NewBar() in y:\0-TradingSystem\TradingSystems\ETFTrader\ETFTrader\ETFTrader.cs:line 55
at RightEdge.Common.SymbolScriptCollection`1.NewBar()
at MySystemBase.NewBar() in y:\0-TradingSystem\TradingSystems\ETFTrader\ETFTrader\BaseClasses.cs:line 31
at RightEdge.Common.Internal.SystemRunner.CallSystemNewBar(FrequencyNewBarEventArgs args)
at RightEdge.Common.Internal.SystemRunner.ProcessBarEvents(IEnumerable`1 eventList)
at RightEdge.Common.FrequencyManager.x189467b274f1add6(NewBarEventArgs xce8d8c7e3c2c2426)
at RightEdge.Shared.SystemWrapper.RunSystem(SystemData systemData, SharedSystemRunData runData, ServiceFactory brokerFactory)
at RightEdge.Shared.SystemWrapper.RunSystem(String filename, ServiceFactory brokerFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.SystemWrapper.RunSystem(String filename, ServiceFactory brokerFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.TradingModuleWrapper.Run(String filename, ServiceAppDomainFactory brokerFactoryFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.TradingModuleWrapper.RunSystem(SharedSystemRunData systemRunData, ServiceAppDomainFactory brokerFactoryFactory, Func`2 dataStoreFactory)
at RightEdge.SystemProgress.InitAndRunSystem()
Posted 2/22/2010 02:46:50 Post #10923
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
make sure you have enough bars to use lookback 1.

RSI.Count > 1 or Bars.Count > 1


Posted 2/22/2010 07:02:20 Post #10925
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
Ok, that gets me around the error, but it seems RSI lookback is never > 1, is there anyway to do an RSI lookback?
Posted 2/22/2010 08:46:58 Post #10933
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
It should be Count > 1. The situation is arising because you're telling RSI to lookback 1 bar on bar 0. Obviously, this is not possible, hence the exception.

So if you put a check RSI.Count > 1, you'll know there is at least one value you can lookback to.
Posted 2/22/2010 15:39:38 Post #10936
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
Thanks Bill, that makes sense
« 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

Permissions Expand / Collapse

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

2005-2007 © RightEdge Systems