Visualizzazione post con etichetta pivot point. Mostra tutti i post
Visualizzazione post con etichetta pivot point. Mostra tutti i post

domenica 30 luglio 2023

Calcolo pivot point in automatico

Questa funzione Python trova la candela
 importante nel dataframe DF e ne 
calcola il Pivot Point e le due
 resistenze e due supporti.

def pivot_point(df):
        pp=0
        r1=0
        r2=0
        s1=0
        s2=0
        ppa=[]
        r1a=[]
        r2a=[]
        s1a=[]
        s2a=[]
        dd=30
        c=0
        important_cand=0
        for i in range(len(df)):
            comp_cand=abs(df['open'][i]-df['close'][i])
            if comp_cand>important_cand:
                important_cand=comp_cand
                nci=i
            pp=(df['high'][nci]+df['low'][nci]+df['close'][nci])/3
            ppa.append(pp)
            r1=(pp*2)-df['low'][nci]
            r1a.append(r1)
            r2=pp+(df['high'][nci]-df['low'][nci])
            r2a.append(r2)
            s1=(pp*2)-df['high'][nci]
            s1a.append(s1)
            s2=pp-(df['high'][nci]-df['low'][nci])
            s2a.append(s2)
            c+=1
            if (df['close'][i]>r2) | (df['close'][i]<s2) | (df['open'][i]>r2) | (df['open'][i]<s2): #il prezzo è fuori dai dati pp azzera la candela importante
                important_cand=0
        df['pp']=ppa
        df['r1']=r1a
        df['r2']=r2a
        df['s1']=s1a
        df['s2']=s2a
        return df
DF deve contenere i campi open, close,
 high, low

domenica 19 aprile 2020

PYTHON IA BINANCE API PIVOT CALCULATOR V.2

In this new version there is the possibility to automatically calculate the Fibonacci levels between the levels where the price is located. 


If you like you can help me continue the research on my AI written in Python by donating crypto currencies or by donating here

You can download the software from this link: PivotCalculator. If you are interested in the sources contact me.