Skip to content

Commit

Permalink
Fix MovingAverageType in KeltnerChannels Indicator (QuantConnect#5954)
Browse files Browse the repository at this point in the history
The Simple Moving Average was always used instead of the one passed to
the KeltnerChannels constructor.
  • Loading branch information
emilianork authored Sep 29, 2021
1 parent d3280c5 commit 8b7da68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Indicators/KeltnerChannels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public KeltnerChannels(string name, int period, decimal k, MovingAverageType mov
WarmUpPeriod = period;

//Initialise ATR and SMA
AverageTrueRange = new AverageTrueRange(name + "_AverageTrueRange", period, MovingAverageType.Simple);
AverageTrueRange = new AverageTrueRange(name + "_AverageTrueRange", period, movingAverageType);
MiddleBand = movingAverageType.AsIndicator(name + "_MiddleBand", period);

//Compute Lower Band
Expand Down

0 comments on commit 8b7da68

Please sign in to comment.