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);
    }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (AccountId.Length != 0)
            {
                hash ^= AccountId.GetHashCode();
            }
            if (AgentId.Length != 0)
            {
                hash ^= AgentId.GetHashCode();
            }
            if (InstrumentId.Length != 0)
            {
                hash ^= InstrumentId.GetHashCode();
            }
            if (Price != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Price);
            }
            if (Lots != 0)
            {
                hash ^= Lots.GetHashCode();
            }
            if (TraderId.Length != 0)
            {
                hash ^= TraderId.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }