- ago
I have a coded strategy that I'm working on, but whenever I click "Save these Parameters as the Strategy's Defaults", I get a "Wealth-Lab 7 Exception" stating the following:

CODE:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'startIndex') at System.String.IndexOf(String value, Int32 startIndex, Int32 count, StringComparison comparisonType) at System.String.IndexOf(String value, Int32 startIndex) at RepositorySingleton.CalculateReg(Object , String , Int32 , RepositorySingleton ) at WealthLab.Backtest.Strategy.AssignParameterDefaults(List`1 values) at ComposerAttribute.CountAdvisor(Object , List`1 , ComposerAttribute ) at WealthLab7.cwStrategy.SaveParameterDefaults(List`1 paramValues) at WealthLab7.cwStrategy.ManageModel(Object value, RoutedEventArgs visitor)


Does anyone have a guess as to what might be causing this exception?
0
358
Solved
2 Replies

Reply

Bookmark

Sort
- ago
#1
Could you show your AddParameter() call?

minValue is greater than maxValue or something, I think.
2
Best Answer
- ago
#2
Thank you for the hint! For some reason I couldn't see it until I went through and commented every AddParameter(...) line one by one.
0

Reply

Bookmark

Sort