The line studies anchors have been removed. Instead you can now attach a line study to an arbitrary scale coordinate. Code that previously looked like:
C# |
Copy Code
|
---|---|
lineStudy.Anchor.FirstDataPointIndex = firstDataPointIndex; lineStudy.Anchor.FirstDataPointValue = DataPointValue.StockLow; lineStudy.Anchor.SecondDataPointIndex = secondDataPointIndex; lineStudy.Anchor.SecondDataPointValue = DataPointValue.StockHigh; |
translates to:
C# |
Copy Code
|
---|---|
private NPointD GetHighPointFromStock(NStockSeries stock, int dataPointIndex) result.X = (double)stock.XValues[dataPointIndex]; return result; private NPointD GetLowPointFromStock(NStockSeries stock, int dataPointIndex) result.X = (double)stock.XValues[dataPointIndex]; return result; lineStudy.BeginPoint = GetLowPointFromStock(stock, firstDataPointIndex); |