mirror of
https://github.com/wassname/pandas-ta.git
synced 2026-08-01 12:40:12 +08:00
Fix for ALMA based on its original implementation
Fixes #373 Original implementation by ALMA authors can be seen here: https://www.sierrachart.com/SupportBoard.php?PostID=231318#P231318
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from numpy import exp as npExp
|
||||
from numpy import nan as npNaN
|
||||
from math import floor
|
||||
from pandas import Series
|
||||
from pandas_ta.utils import get_offset, verify_series
|
||||
|
||||
@@ -17,7 +18,7 @@ def alma(close, length=None, sigma=None, distribution_offset=None, offset=None,
|
||||
if close is None: return
|
||||
|
||||
# Pre-Calculations
|
||||
m = distribution_offset * (length - 1)
|
||||
m = floor(distribution_offset * (length - 1))
|
||||
s = length / sigma
|
||||
wtd = list(range(length))
|
||||
for i in range(0, length):
|
||||
|
||||
Reference in New Issue
Block a user