(df)
return out(SETTINGS, df, result)
Pivot Points, Supports and Resistances
Pivot Points, Supports and Resistances
Pivot Points Supports and Resistances
def PPSR(df):
    """
    Pivot Points, Supports and Resistances
    """
    PP = pd.Series((df['High'] + df['Low'] + df['Close']) / 3)
    R1 = pd.Series(2 * PP - df['Low'])
    S1 = pd.Series(2 * PP - df['High'])
    R2 = pd.Series(PP + df['High'] - df['Low'])
    S2 = pd.Series(PP - df['High'] + df['Low'])
    R3 = pd.Series(df['High'] + 2 * (PP - df['Low']))
    S3 = pd.Series(df['Low'] - 2 * (df['High'] - PP))
    result = pd.DataFrame([PP, R1, S1, R2, S2, R3, S3]).transpose()
    return out(SETTINGS, df, result)
def PPSR ( df ) : PP = pd . Series ( ( df [ 'High' ] + df [ 'Low' ] + df [ 'Close' ] ) / 3 ) R1 = pd . Series ( 2 * PP - df [ 'Low' ] ) S1 = pd . Series ( 2 * PP - df [ 'High' ] ) R2 = pd . Series ( PP + df [ 'High' ] - df [ 'Low' ] ) S2 = pd . Series ( PP - df [ 'High' ] + df [ 'Low' ] ) R3 = pd . Series ( df [ 'High' ] + 2 * ( PP - df [ 'Low' ] ) ) S3 = pd . Series ( df [ 'Low' ] - 2 * ( df [ 'High' ] - PP ) ) result = pd . DataFrame ( [ PP , R1 , S1 , R2 , S2 , R3 , S3 ] ) . transpose ( ) return out ( SETTINGS , df , result )