コード例 #1
0
    public void MergeFrom(pb::CodedInputStream input)
    {
        uint tag;

        while ((tag = input.ReadTag()) != 0)
        {
            switch (tag)
            {
            default:
                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                break;

            case 10: {
                if (lots_ == null)
                {
                    Lots = new global::Lots();
                }
                input.ReadMessage(Lots);
                break;
            }

            case 18: {
                if (takeProfit_ == null)
                {
                    TakeProfit = new global::TakeProfit();
                }
                input.ReadMessage(TakeProfit);
                break;
            }

            case 26: {
                if (trailingStop_ == null)
                {
                    TrailingStop = new global::TrailingStop();
                }
                input.ReadMessage(TrailingStop);
                break;
            }

            case 34: {
                if (mACDOpenLevel_ == null)
                {
                    MACDOpenLevel = new global::MACDOpenLevel();
                }
                input.ReadMessage(MACDOpenLevel);
                break;
            }

            case 42: {
                if (mATTrendPeriod_ == null)
                {
                    MATTrendPeriod = new global::MATrendPeriod();
                }
                input.ReadMessage(MATTrendPeriod);
                break;
            }

            case 50: {
                if (maximumRisk_ == null)
                {
                    MaximumRisk = new global::MaximumRisk();
                }
                input.ReadMessage(MaximumRisk);
                break;
            }

            case 58: {
                if (decreaseFactor_ == null)
                {
                    DecreaseFactor = new global::DecreaseFactor();
                }
                input.ReadMessage(DecreaseFactor);
                break;
            }

            case 66: {
                if (movingPeriod_ == null)
                {
                    MovingPeriod = new global::MovingPeriod();
                }
                input.ReadMessage(MovingPeriod);
                break;
            }

            case 74: {
                if (movingShift_ == null)
                {
                    MovingShift = new global::MovingShift();
                }
                input.ReadMessage(MovingShift);
                break;
            }
            }
        }
    }
コード例 #2
0
 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);
 }