DataSeries is getting a Runtime error
Author: mikesblack
Creation Date: 12/8/2009 6:38 PM
profile picture

mikesblack

#1
Runtime error:Index was out of range. Must be non-negative and less than the size of the collection.
at WealthLab.Straegies.MB3_2V2.Execute()
at Community.Indicators.PBBandWidth.Series(Bars bars, Int32 Period)
at Community.Indicators.PBBandWidth.ctor(Bars bars, Int32 Period, String description)
"" "" PBbands upper and lower
"" LinearRegSlope.Series(DataSeries ds, Int32 period)
""""... String description)
"" .get_item(Int32 index)
at System. ThrowHelper.ThrowArgumentOutOfRangeException()

What am I missing? Thank you


profile picture

Eugene

#2
Knowledge Base > Errors | Strategy > (scroll down to) Index was out of range
profile picture

mikesblack

#3
Thanks, ; but found I can't apply what is there to this. Is there anything in particular I should be aware of when using Linear regression slope or PBBandWidth that would cause this error. Is there something that I might be overlooking. It performs with all other indicators used.
profile picture

Eugene

#4
Mike, this is like flying blind ;) when you don't have the stock symbols, bar scale, and a snippet of code enough to reproduce the error.
profile picture

Cone

#5
There's a bug in the LinearReg and LinearRegSlope indicators when the period is greater than the number of bars in the chart. Will be corrected in 5.6 (next weekish).
profile picture

mikesblack

#6
Thanks gentlemen. Someone was able to point out that I had this issue because I had been using 2 days /bars and that wasn't enough for the program to calculate on. Got it to work with 3 bars so it all was fairly basic. Yes Eugene, I did need to include more detail. We can't have the blind leading the blind. Cheers
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).