Skip to content

Commit

Permalink
Fix bug with calculating indicator for advices
Browse files Browse the repository at this point in the history
  • Loading branch information
ant013 committed Aug 9, 2023
1 parent 39fd737 commit b017d07
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class TechnicalIndicatorService {
let chartData = ChartData(items: items, startWindow: startTimestamp, endWindow: endTimestamp)

for period in Self.maPeriods {
if let emaValues = try? IndicatorCalculator.ma(period: period, values: values) {
if let emaValues = try? IndicatorCalculator.ema(period: period, values: values) {
chartData.add(name: "ema_\(period)", values: emaValues)
}
if let smaValues = try? IndicatorCalculator.ma(period: period, values: values) {
Expand Down

0 comments on commit b017d07

Please sign in to comment.