Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Formatting And general questions.

Can someone show me the parameters for the following talib functions. Is there a Rsquared talib function im just not seeing? And does anyone have any suggestions on a overbought/oversold oscillator that is pretty good? I am thinking about trying to recreate the fisher transformer but i don't know what its based on. But it worked very well in thinkorswim.

ADX
DIPlus
DIMinus
ATR
STDDev

Thanks,
Dylan

1 response

This may help.

# ADX, PLUS_DI, MINUS_DI, ATR, STDDEV  
import talib  
# -------------------------------  
stock, period = symbol('SPY'), 10  
# -------------------------------  
def initialize(context):  
    schedule_function(trade, date_rules.every_day(), time_rules.market_close(minutes = 1)) 

def trade (context, data):  
    bars = period * 2

    H = data.history(stock,'high', bars, '1d')  
    L = data.history(stock,'low', bars, '1d')  
    C = data.history(stock,'close', bars, '1d')

    adx = talib.ADX(H, L, C, period)  
    DIPlus = talib.MINUS_DI(H, L, C, period)  
    DIMinus = talib.PLUS_DI(H, L, C, period)  
    atr = talib.ATR(H, L, C, period)  
    stdev = talib.STDDEV (C, period, 2.0)     

    record(adx = adx[-1], DIPlus = DIPlus[-1],  DIMinus = DIMinus[-1], atr = atr[-1], stdev = stdev[-1])