/// <summary> /// Returns a copy /// </summary> public IndicatorSlot Clone() { var slot = new IndicatorSlot { SlotNumber = SlotNumber, SlotType = SlotType, SlotStatus = SlotStatus, LogicalGroup = LogicalGroup, IsDefined = IsDefined, IndicatorName = IndicatorName, SeparatedChart = SeparatedChart, MinValue = MinValue, MaxValue = MaxValue, IndParam = IndParam.Clone(), SpecValue = new double[SpecValue.Length] }; SpecValue.CopyTo(slot.SpecValue, 0); slot.Component = new IndicatorComp[Component.Length]; for (int i = 0; i < Component.Length; i++) { slot.Component[i] = Component[i].Clone(); } return(slot); }
/// <summary> /// Returns a shallow copy. /// </summary> public IndicatorSlot ShallowCopy() { var slot = new IndicatorSlot { SlotNumber = SlotNumber, SlotType = SlotType, LogicalGroup = LogicalGroup, IsDefined = IsDefined, IsCalculated = IsCalculated, IndicatorName = IndicatorName, SeparatedChart = SeparatedChart, MinValue = MinValue, MaxValue = MaxValue, IndParam = IndParam.Clone(), SpecValue = new double[SpecValue.Length], SignalShiftType = SignalShiftType, SignalShift = SignalShift, IndicatorSymbol = IndicatorSymbol, IndicatorPeriod = IndicatorPeriod, }; SpecValue.CopyTo(slot.SpecValue, 0); return(slot); }