I have the following code snippet where I want to find the 23 period lookback LinearRegSlope of the lastbar on the chart. If I generate a series and ask for the lastbar I get a different result than asking to calculate the value for the lastbar on the chart.
What am I doing wrong? Shouldn't both LRSlope and LRSeries[Bars.Count-1] calculate the the same value?
CODE:
Please log in to see this code.
Size:
Color:
It's a bug. Thanks for the heads up.
Size:
Color:
Any idea which is giving me the correct answer? I suspect that the .Series is correct, but I don't want to do the math by hand :)
Size:
Color:
Yes, the .Series is OK and the .Value is broken.
Size:
Color: