Forum Replies Created

  • hoffmanroni

    Member
    August 6, 2024 at 5:03 pm in reply to: Check password col is updated

    sorry got it now, thanks, pls disregard

  • hoffmanroni

    Member
    August 5, 2024 at 2:30 pm in reply to: Missing sensor table

    Seems to be ok now. I’m not sure what happened but when I tried a few days ago it was missing but now its there, all good thanks.

  • hoffmanroni

    Member
    June 29, 2021 at 12:00 am in reply to: Technical Analysis using embedPy

    FYI if anyone is interested I was able to get this working now

    py script

    import pandas as pd from ta.utils 
    import dropna from ta.volatility 
    import BollingerBands 
    def returnBB(df, window=20, window_dev=2): 
        indicator_bb = BollingerBands(close=df["close"], window=20, window_dev=2) 
        # Add Bollinger Bands features 
        df['bb_bbm'] = indicator_bb.bollinger_mavg() 
        df['bb_bbh'] = indicator_bb.bollinger_hband() 
        df['bb_bbl'] = indicator_bb.bollinger_lband() 
        # Add Bollinger Band high indicator 
        df['bb_bbhi'] = indicator_bb.bollinger_hband_indicator() 
        # Add Bollinger Band low indicator 
        df['bb_bbli'] = indicator_bb.bollinger_lband_indicator() 
    return df

    and then q script

    //load above .p script l bb.p

    //make returnBB py func callable in q

    func:.p.get`returnBB

    //conv t to dataframe, pass to the py func and then conv back to qtable .ml.df2tab[func[.ml.tab2df[t]]]