Exemplo n.º 1
0
        public override BaseRobot MakeCopy()
        {
            var res = new AtracotesRobot {
                indexList = new List <IndexDivergencyInfo>()
            };

            foreach (var ind in indexList)
            {
                var indi = new IndexDivergencyInfo
                {
                    IndexFormulaL   = ind.IndexFormulaL,
                    IndexMarginUp   = ind.IndexMarginUp,
                    IndexMarginDn   = ind.IndexMarginDn,
                    IsNaN           = ind.IsNaN,
                    DiverType       = ind.DiverType,
                    PeriodExtremum  = ind.PeriodExtremum,
                    MaxPastExtremum = ind.MaxPastExtremum
                };
                res.indexList.Add(indi);
            }
            res.ThresholdPercent      = ThresholdPercent;
            res.FiboLevels            = FiboLevels;
            res.BarsCount             = BarsCount;
            res.DeltaLevel            = DeltaLevel;
            res.CandlesInIndexHistory = CandlesInIndexHistory;
            res.Volume                  = Volume;
            res.CountTrades             = CountTrades;
            res.UseProtectPositionsFlag = UseProtectPositionsFlag;
            res.stopsOnPositions        = stopsOnPositions;
            res.DeltaProtect            = DeltaProtect;
            res.RobotTradeState         = RobotTradeState;
            res.Leverage                = Leverage;
            res.ZigZagSourceType        = ZigZagSourceType;
            CopyBaseSettings(res);
            return(res);
        }
Exemplo n.º 2
0
 public override BaseRobot MakeCopy()
 {
     var res = new AtracotesRobot { indexList = new List<IndexDivergencyInfo>() };
     foreach (var ind in indexList)
     {
         var indi = new IndexDivergencyInfo
         {
             IndexFormulaL = ind.IndexFormulaL,
             IndexMarginUp = ind.IndexMarginUp,
             IndexMarginDn = ind.IndexMarginDn,
             IsNaN = ind.IsNaN,
             DiverType = ind.DiverType,
             PeriodExtremum = ind.PeriodExtremum,
             MaxPastExtremum = ind.MaxPastExtremum
         };
         res.indexList.Add(indi);
     }
     res.ThresholdPercent = ThresholdPercent;
     res.FiboLevels = FiboLevels;
     res.BarsCount = BarsCount;
     res.DeltaLevel = DeltaLevel;
     res.CandlesInIndexHistory = CandlesInIndexHistory;
     res.Volume = Volume;
     res.CountTrades = CountTrades;
     res.UseProtectPositionsFlag = UseProtectPositionsFlag;
     res.stopsOnPositions = stopsOnPositions;
     res.DeltaProtect = DeltaProtect;
     res.RobotTradeState = RobotTradeState;
     res.Leverage = Leverage;
     res.ZigZagSourceType = ZigZagSourceType;
     CopyBaseSettings(res);
     return res;
 }