trading view pine to python
Budget: $10 – $30 USD
I have a code in Pine:
float ph = pivothigh(2, 2)
float pl = pivotlow(2, 2)
// calculate the Center line using pivot points
var float center = na
float lastpp = ph ? ph : pl ? pl : na
if lastpp
if na(center)
center := lastpp
else
center := (center * 2 + lastpp) / 3
I need to transfer it to python code using pandas dataframe.
float ph = pivothigh(2, 2)
float pl = pivotlow(2, 2)
// calculate the Center line using pivot points
var float center = na
float lastpp = ph ? ph : pl ? pl : na
if lastpp
if na(center)
center := lastpp
else
center := (center * 2 + lastpp) / 3
I need to transfer it to python code using pandas dataframe.