BBP is a tradingview indicator created by Nico.Muselle in pinescript, this indicator is quite good for scalping and I have taken the trouble to adapt the code to python
BBP is based on the Bull and Bear Power indicator, therefore it's a good indicator to detect microtrends in the asset's price, it can be a good complement to a scalping strategy in short timeframes.
- sklearn.
- talib.
- pandas.
- numpy.
# import the package
from Linear_regresion_BBP import makeBBP #this function returns a pandas series with the indicator values and the raw dataset
df = pd.read_csv("dataframe.csv")
bbp,sl = makeBBP(df,10) #(df,period)
print(bbp)