Fix graph
This commit is contained in:
@@ -71,40 +71,40 @@ public static class ScenarioHelpers
|
||||
{
|
||||
IIndicator result = indicator.Type switch
|
||||
{
|
||||
IndicatorType.StDev => new StDevContext(indicator.Name, indicator.Period.Value),
|
||||
IndicatorType.StDev => new StDevContext(indicator.Name, indicator.Period ?? 14),
|
||||
IndicatorType.RsiDivergence => new RsiDivergenceIndicatorBase(indicator.Name,
|
||||
indicator.Period.Value),
|
||||
indicator.Period ?? 14),
|
||||
IndicatorType.RsiDivergenceConfirm => new RsiDivergenceConfirmIndicatorBase(indicator.Name,
|
||||
indicator.Period.Value),
|
||||
indicator.Period ?? 14),
|
||||
IndicatorType.MacdCross => new MacdCrossIndicatorBase(indicator.Name,
|
||||
indicator.FastPeriods.Value, indicator.SlowPeriods.Value, indicator.SignalPeriods.Value),
|
||||
IndicatorType.EmaCross => new EmaCrossIndicatorBase(indicator.Name, indicator.Period.Value),
|
||||
indicator.FastPeriods ?? 12, indicator.SlowPeriods ?? 26, indicator.SignalPeriods ?? 9),
|
||||
IndicatorType.EmaCross => new EmaCrossIndicatorBase(indicator.Name, indicator.Period ?? 14),
|
||||
IndicatorType.DualEmaCross => new DualEmaCrossIndicatorBase(indicator.Name,
|
||||
indicator.FastPeriods.Value, indicator.SlowPeriods.Value),
|
||||
indicator.FastPeriods ?? 12, indicator.SlowPeriods ?? 26),
|
||||
IndicatorType.ThreeWhiteSoldiers => new ThreeWhiteSoldiersIndicatorBase(indicator.Name,
|
||||
indicator.Period.Value),
|
||||
indicator.Period ?? 14),
|
||||
IndicatorType.SuperTrend => new SuperTrendIndicatorBase(indicator.Name,
|
||||
indicator.Period.Value, indicator.Multiplier.Value),
|
||||
indicator.Period ?? 14, indicator.Multiplier ?? 3.0),
|
||||
IndicatorType.ChandelierExit => new ChandelierExitIndicatorBase(indicator.Name,
|
||||
indicator.Period.Value, indicator.Multiplier.Value),
|
||||
IndicatorType.EmaTrend => new EmaTrendIndicatorBase(indicator.Name, indicator.Period.Value),
|
||||
indicator.Period ?? 14, indicator.Multiplier ?? 3.0),
|
||||
IndicatorType.EmaTrend => new EmaTrendIndicatorBase(indicator.Name, indicator.Period ?? 14),
|
||||
IndicatorType.StochRsiTrend => new StochRsiTrendIndicatorBase(indicator.Name,
|
||||
indicator.Period.Value, indicator.StochPeriods.Value, indicator.SignalPeriods.Value,
|
||||
indicator.SmoothPeriods.Value),
|
||||
indicator.Period ?? 14, indicator.StochPeriods ?? 14, indicator.SignalPeriods ?? 9,
|
||||
indicator.SmoothPeriods ?? 3),
|
||||
IndicatorType.StochasticCross => new StochasticCrossIndicator(indicator.Name,
|
||||
indicator.StochPeriods.Value, indicator.SignalPeriods.Value, indicator.SmoothPeriods.Value,
|
||||
indicator.StochPeriods ?? 14, indicator.SignalPeriods ?? 3, indicator.SmoothPeriods ?? 3,
|
||||
indicator.KFactor ?? 3.0, indicator.DFactor ?? 2.0),
|
||||
IndicatorType.Stc => new StcIndicatorBase(indicator.Name, indicator.CyclePeriods.Value,
|
||||
indicator.FastPeriods.Value, indicator.SlowPeriods.Value),
|
||||
IndicatorType.LaggingStc => new LaggingSTC(indicator.Name, indicator.CyclePeriods.Value,
|
||||
indicator.FastPeriods.Value, indicator.SlowPeriods.Value),
|
||||
IndicatorType.Stc => new StcIndicatorBase(indicator.Name, indicator.CyclePeriods ?? 10,
|
||||
indicator.FastPeriods ?? 12, indicator.SlowPeriods ?? 26),
|
||||
IndicatorType.LaggingStc => new LaggingSTC(indicator.Name, indicator.CyclePeriods ?? 10,
|
||||
indicator.FastPeriods ?? 12, indicator.SlowPeriods ?? 26),
|
||||
IndicatorType.SuperTrendCrossEma => new SuperTrendCrossEma(indicator.Name,
|
||||
indicator.Period.Value, indicator.Multiplier.Value),
|
||||
indicator.Period ?? 14, indicator.Multiplier ?? 3.0),
|
||||
IndicatorType.BollingerBandsPercentBMomentumBreakout => new BollingerBandsPercentBMomentumBreakout(
|
||||
indicator.Name,
|
||||
indicator.Period.Value, indicator.StDev.Value),
|
||||
indicator.Period ?? 20, indicator.StDev ?? 2.0),
|
||||
IndicatorType.BollingerBandsVolatilityProtection => new BollingerBandsVolatilityProtection(indicator.Name,
|
||||
indicator.Period.Value, indicator.StDev.Value),
|
||||
indicator.Period ?? 20, indicator.StDev ?? 2.0),
|
||||
IndicatorType.IchimokuKumoTrend => new IchimokuKumoTrend(indicator.Name,
|
||||
indicator.TenkanPeriods ?? 9,
|
||||
indicator.KijunPeriods ?? 26,
|
||||
|
||||
Reference in New Issue
Block a user