public override void CopyFrom(StrategySetting settings) { ASCTrendStrategySettings otherSettings = (ASCTrendStrategySettings)settings; Risk = otherSettings.Risk; AvergatePeriod = otherSettings.AvergatePeriod; BreakoutLength = otherSettings.BreakoutLength; Period = otherSettings.Period; }
public static StrategySetting Create(string name) { StrategySetting setting = null; switch (name) { case ArbitrageStrategyName: setting = new ArbitrageStrategySetting(); break; case ChangePositionStrategyName: setting = new ChangePositionSetting(); break; case ScalperStrategyName: setting = new ScalperSetting(); break; case MACDHistSlopeStrategyName: setting = new MACDHistSlopeStrategySetting(); break; case WMATrendStrategyName: setting = new WMATrendStrategySettings(); break; case LinerRegressionStrategyName: setting = new LinerRegStrategySettings(); break; case ASCTrendStrategyName: setting = new ASCTrendStrategySettings(); break; case RangeTrendStrategyName: setting = new RangeTrendStrategySettings(); break; case ManualStrategyName: setting = new ManualStrategySetting(); break; default: throw new ArgumentException(string.Format("Unexpected strategy setting ({0})", name)); } return(setting); }