(df, n)
return out(SETTINGS, df, result)
Accumulation/Distribution
Accumulation/Distribution
Accumulation / Distribution
def ACCDIST(df, n):
    """
    Accumulation/Distribution
    """
    ad = (2 * df['Close'] - df['High'] - df['Low']) / (df['High'] - df['Low']) * df['Volume']
    M = ad.diff(n - 1)
    N = ad.shift(n - 1)
    ROC = M / N
    result = pd.Series(ROC, name='Acc/Dist_ROC_' + str(n))
    return out(SETTINGS, df, result)
def ACCDIST ( df , n ) : ad = ( 2 * df [ 'Close' ] - df [ 'High' ] - df [ 'Low' ] ) / ( df [ 'High' ] - df [ 'Low' ] ) * df [ 'Volume' ] M = ad . diff ( n - 1 ) N = ad . shift ( n - 1 ) ROC = M / N result = pd . Series ( ROC , name = 'Acc/Dist_ROC_' + str ( n ) ) return out ( SETTINGS , df , result )