public void AddBounce(TrendBounce TrendBounce) { this.Bounces.Add(TrendBounce); this.RecalculateScore(); }
public void setNewHit(DataItem item, double level, TrendlineType type) { TrendHit hit = new TrendHit(this, item, level, type, currentHit, currentBounce); TrendBounce bounce = new TrendBounce(this, hit); hit.BounceToNextHit = bounce; //Close current hit and bounce. if (currentHit != null) { currentHit.NextHit = hit; this.Hits.Add(currentHit); } if (currentBounce != null) { currentBounce.EndHit = hit; this.Bounces.Add(currentBounce); } currentHit = hit; currentBounce = bounce; //Calculate points. //hit.Calculate(); //bounce.Calculate(); }
public TrendHit(Trendline trendline, DataItem item, double crossPoint, TrendlineType type, TrendHit prevHit, TrendBounce prevBounce) : this(trendline, item, crossPoint, type) { this.PreviousHit = prevHit; this.BounceFromPreviousHit = prevBounce; }