QuantumLearner commited on
Commit
14a24a2
·
verified ·
1 Parent(s): d2765be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -183,9 +183,7 @@ def weighted_moving_average(data, periods):
183
  def hull_moving_average(data, periods):
184
  wma_half_period = weighted_moving_average(data, int(periods / 2))
185
  wma_full_period = weighted_moving_average(data, periods)
186
- hma = weighted_moving_average(2 * w
187
-
188
- ma_half_period - wma_full_period, int(np.sqrt(periods)))
189
  return hma
190
 
191
  # Function to calculate Harmonic Moving Average (HMA) to avoid conflict with Hull
 
183
  def hull_moving_average(data, periods):
184
  wma_half_period = weighted_moving_average(data, int(periods / 2))
185
  wma_full_period = weighted_moving_average(data, periods)
186
+ hma = weighted_moving_average(2 * wma_half_period - wma_full_period, int(np.sqrt(periods)))
 
 
187
  return hma
188
 
189
  # Function to calculate Harmonic Moving Average (HMA) to avoid conflict with Hull