I have the following code in a strategy I'm developing:
if(myLine == null && State != State.Historical) //Initial set of Ray { myLine = Draw.Ray(this, "MyLine", true, 10, High[10], 5, High[10], Brushes.Blue, DashStyleHelper.Solid, 2); myLine.IsLocked = false; } if(myLine != null && State != State.Historical) { Print(DateTime.Now+" Last BarsAgo= "+myLine.EndAnchor.BarsAgo+" First BarsAgo= "+myLine.StartAnchor.BarsAgo); }
Before I manually move the Ray on the chart, the following info is printed, which is correct:
10/22/2019 4:32:51 PM Last BarsAgo= 5 First BarsAgo= 10
But, after I manually move the Ray on the chart, I get the following output:
10/22/2019 4:32:52 PM Last BarsAgo= -2147483648 First BarsAgo= 10
I'm trying to ascertain why the BarsAgo value for the EndAnchor appears to get corrupted or be incorrect.
Comment