public override int GetHashCode() { int hash = 1; if (lots_ != null) { hash ^= Lots.GetHashCode(); } if (takeProfit_ != null) { hash ^= TakeProfit.GetHashCode(); } if (trailingStop_ != null) { hash ^= TrailingStop.GetHashCode(); } if (mACDOpenLevel_ != null) { hash ^= MACDOpenLevel.GetHashCode(); } if (mATTrendPeriod_ != null) { hash ^= MATTrendPeriod.GetHashCode(); } if (maximumRisk_ != null) { hash ^= MaximumRisk.GetHashCode(); } if (decreaseFactor_ != null) { hash ^= DecreaseFactor.GetHashCode(); } if (movingPeriod_ != null) { hash ^= MovingPeriod.GetHashCode(); } if (movingShift_ != null) { hash ^= MovingShift.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public void MergeFrom(AlgorithmParameters other) { if (other == null) { return; } if (other.lots_ != null) { if (lots_ == null) { Lots = new global::Lots(); } Lots.MergeFrom(other.Lots); } if (other.takeProfit_ != null) { if (takeProfit_ == null) { TakeProfit = new global::TakeProfit(); } TakeProfit.MergeFrom(other.TakeProfit); } if (other.trailingStop_ != null) { if (trailingStop_ == null) { TrailingStop = new global::TrailingStop(); } TrailingStop.MergeFrom(other.TrailingStop); } if (other.mACDOpenLevel_ != null) { if (mACDOpenLevel_ == null) { MACDOpenLevel = new global::MACDOpenLevel(); } MACDOpenLevel.MergeFrom(other.MACDOpenLevel); } if (other.mATTrendPeriod_ != null) { if (mATTrendPeriod_ == null) { MATTrendPeriod = new global::MATrendPeriod(); } MATTrendPeriod.MergeFrom(other.MATTrendPeriod); } if (other.maximumRisk_ != null) { if (maximumRisk_ == null) { MaximumRisk = new global::MaximumRisk(); } MaximumRisk.MergeFrom(other.MaximumRisk); } if (other.decreaseFactor_ != null) { if (decreaseFactor_ == null) { DecreaseFactor = new global::DecreaseFactor(); } DecreaseFactor.MergeFrom(other.DecreaseFactor); } if (other.movingPeriod_ != null) { if (movingPeriod_ == null) { MovingPeriod = new global::MovingPeriod(); } MovingPeriod.MergeFrom(other.MovingPeriod); } if (other.movingShift_ != null) { if (movingShift_ == null) { MovingShift = new global::MovingShift(); } MovingShift.MergeFrom(other.MovingShift); } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }