private void assignProperties(AssetTimeframe atf, ValuePoint initial, ValuePoint bound) { this.AssetTimeframe = atf; this.InitialPoint = initial; this.BoundPoint = bound; this.Slope = (bound.value - initial.value) / (BoundPoint.index() - InitialPoint.index()); this.CurrentType = (initial.dataItem.Price.IsPeak() ? TrendlineType.Resistance : TrendlineType.Support); }
public Trendline(AssetTimeframe atf, ValuePoint initial, ValuePoint bound) { initialize(); assignProperties(atf, initial, bound); }