public static TrendHit FromDto(TrendHitDto dto) { var trendHit = new TrendHit { TrendHitId = dto.TrendHitId, TrendlineId = dto.TrendlineId, ExtremumGroupId = dto.ExtremumGroupId, Value = dto.Value, PointsForDistance = dto.PointsForDistance, PointsForValue = dto.PointsForValue, Gap = dto.Gap, RelativeGap = dto.RelativeGap }; return(trendHit); }
private void Reset() { this.trendBreak = null; this.trendHit = null; }
public TrendBounce(Trendline trendline, TrendHit startHit) { this.Trendline = trendline; this.StartHit = startHit; this.breaks = new List<TrendBreak>(); }
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 void AddHit(TrendHit hit) { this.Hits.Add(hit); this.RecalculateScore(); }
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; }