@@ -394,7 +394,8 @@ public static class MongoMappers
|
||||
Multiplier = strategyDto.Multiplier,
|
||||
SmoothPeriods = strategyDto.SmoothPeriods,
|
||||
StochPeriods = strategyDto.StochPeriods,
|
||||
CyclePeriods = strategyDto.CyclePeriods
|
||||
CyclePeriods = strategyDto.CyclePeriods,
|
||||
SignalType = strategyDto.SignalType
|
||||
};
|
||||
}
|
||||
|
||||
@@ -404,44 +405,52 @@ public static class MongoMappers
|
||||
{
|
||||
Type = strategy.Type,
|
||||
Name = strategy.Name,
|
||||
SignalType = strategy.SignalType
|
||||
SignalType = strategy.SignalType,
|
||||
CyclePeriods = strategy.CyclePeriods,
|
||||
FastPeriods = strategy.FastPeriods,
|
||||
Multiplier = strategy.Multiplier,
|
||||
Period = strategy.Period,
|
||||
SignalPeriods = strategy.SignalPeriods,
|
||||
SlowPeriods = strategy.SlowPeriods,
|
||||
SmoothPeriods = strategy.SmoothPeriods,
|
||||
StochPeriods = strategy.StochPeriods
|
||||
};
|
||||
|
||||
switch (strategy.Type)
|
||||
{
|
||||
case StrategyType.RsiDivergenceConfirm:
|
||||
case StrategyType.RsiDivergence:
|
||||
case StrategyType.EmaCross:
|
||||
case StrategyType.EmaTrend:
|
||||
case StrategyType.StDev:
|
||||
dto.Period = strategy.Period;
|
||||
break;
|
||||
case StrategyType.MacdCross:
|
||||
dto.SlowPeriods = strategy.SlowPeriods;
|
||||
dto.FastPeriods = strategy.FastPeriods;
|
||||
dto.SignalPeriods = strategy.SignalPeriods;
|
||||
break;
|
||||
case StrategyType.ThreeWhiteSoldiers:
|
||||
break;
|
||||
case StrategyType.ChandelierExit:
|
||||
case StrategyType.SuperTrend:
|
||||
dto.Period = strategy.Period;
|
||||
dto.Multiplier = strategy.Multiplier;
|
||||
break;
|
||||
case StrategyType.StochRsiTrend:
|
||||
dto.Period = strategy.Period;
|
||||
dto.StochPeriods = strategy.StochPeriods;
|
||||
dto.SignalPeriods = strategy.SignalPeriods;
|
||||
dto.SmoothPeriods = strategy.SmoothPeriods;
|
||||
break;
|
||||
case StrategyType.Stc:
|
||||
dto.SlowPeriods = strategy.SlowPeriods;
|
||||
dto.FastPeriods = strategy.FastPeriods;
|
||||
dto.CyclePeriods = strategy.CyclePeriods;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// switch (strategy.Type)
|
||||
// {
|
||||
// case StrategyType.RsiDivergenceConfirm:
|
||||
// case StrategyType.RsiDivergence:
|
||||
// case StrategyType.EmaCross:
|
||||
// case StrategyType.EmaTrend:
|
||||
// case StrategyType.StDev:
|
||||
// dto.Period = strategy.Period;
|
||||
// break;
|
||||
// case StrategyType.MacdCross:
|
||||
// dto.SlowPeriods = strategy.SlowPeriods;
|
||||
// dto.FastPeriods = strategy.FastPeriods;
|
||||
// dto.SignalPeriods = strategy.SignalPeriods;
|
||||
// break;
|
||||
// case StrategyType.ThreeWhiteSoldiers:
|
||||
// break;
|
||||
// case StrategyType.ChandelierExit:
|
||||
// case StrategyType.SuperTrend:
|
||||
// dto.Period = strategy.Period;
|
||||
// dto.Multiplier = strategy.Multiplier;
|
||||
// break;
|
||||
// case StrategyType.StochRsiTrend:
|
||||
// dto.Period = strategy.Period;
|
||||
// dto.StochPeriods = strategy.StochPeriods;
|
||||
// dto.SignalPeriods = strategy.SignalPeriods;
|
||||
// dto.SmoothPeriods = strategy.SmoothPeriods;
|
||||
// break;
|
||||
// case StrategyType.Stc:
|
||||
// dto.SlowPeriods = strategy.SlowPeriods;
|
||||
// dto.FastPeriods = strategy.FastPeriods;
|
||||
// dto.CyclePeriods = strategy.CyclePeriods;
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
|
||||
return dto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user