import asyncio
import pytafast

async def SMA(*args, **kwargs):
    return await asyncio.to_thread(pytafast.SMA, *args, **kwargs)

async def EMA(*args, **kwargs):
    return await asyncio.to_thread(pytafast.EMA, *args, **kwargs)

async def RSI(*args, **kwargs):
    return await asyncio.to_thread(pytafast.RSI, *args, **kwargs)

async def MACD(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MACD, *args, **kwargs)

async def BBANDS(*args, **kwargs):
    return await asyncio.to_thread(pytafast.BBANDS, *args, **kwargs)

async def ATR(*args, **kwargs):
    return await asyncio.to_thread(pytafast.ATR, *args, **kwargs)

async def ADX(*args, **kwargs):
    return await asyncio.to_thread(pytafast.ADX, *args, **kwargs)

async def CCI(*args, **kwargs):
    return await asyncio.to_thread(pytafast.CCI, *args, **kwargs)

async def OBV(*args, **kwargs):
    return await asyncio.to_thread(pytafast.OBV, *args, **kwargs)

async def ROC(*args, **kwargs):
    return await asyncio.to_thread(pytafast.ROC, *args, **kwargs)

async def STOCH(*args, **kwargs):
    return await asyncio.to_thread(pytafast.STOCH, *args, **kwargs)

async def MOM(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MOM, *args, **kwargs)

async def STDDEV(*args, **kwargs):
    return await asyncio.to_thread(pytafast.STDDEV, *args, **kwargs)

async def WILLR(*args, **kwargs):
    return await asyncio.to_thread(pytafast.WILLR, *args, **kwargs)

async def NATR(*args, **kwargs):
    return await asyncio.to_thread(pytafast.NATR, *args, **kwargs)

async def MFI(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MFI, *args, **kwargs)

async def CMO(*args, **kwargs):
    return await asyncio.to_thread(pytafast.CMO, *args, **kwargs)

async def DX(*args, **kwargs):
    return await asyncio.to_thread(pytafast.DX, *args, **kwargs)

async def MINUS_DI(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MINUS_DI, *args, **kwargs)

async def MINUS_DM(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MINUS_DM, *args, **kwargs)

async def PLUS_DI(*args, **kwargs):
    return await asyncio.to_thread(pytafast.PLUS_DI, *args, **kwargs)

async def PLUS_DM(*args, **kwargs):
    return await asyncio.to_thread(pytafast.PLUS_DM, *args, **kwargs)

async def APO(*args, **kwargs):
    return await asyncio.to_thread(pytafast.APO, *args, **kwargs)

async def AROON(*args, **kwargs):
    return await asyncio.to_thread(pytafast.AROON, *args, **kwargs)

async def AROONOSC(*args, **kwargs):
    return await asyncio.to_thread(pytafast.AROONOSC, *args, **kwargs)

async def PPO(*args, **kwargs):
    return await asyncio.to_thread(pytafast.PPO, *args, **kwargs)

async def TRIX(*args, **kwargs):
    return await asyncio.to_thread(pytafast.TRIX, *args, **kwargs)

async def ULTOSC(*args, **kwargs):
    return await asyncio.to_thread(pytafast.ULTOSC, *args, **kwargs)

async def DEMA(*args, **kwargs):
    return await asyncio.to_thread(pytafast.DEMA, *args, **kwargs)

async def KAMA(*args, **kwargs):
    return await asyncio.to_thread(pytafast.KAMA, *args, **kwargs)

async def MA(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MA, *args, **kwargs)

async def T3(*args, **kwargs):
    return await asyncio.to_thread(pytafast.T3, *args, **kwargs)

async def TEMA(*args, **kwargs):
    return await asyncio.to_thread(pytafast.TEMA, *args, **kwargs)

async def TRIMA(*args, **kwargs):
    return await asyncio.to_thread(pytafast.TRIMA, *args, **kwargs)

async def WMA(*args, **kwargs):
    return await asyncio.to_thread(pytafast.WMA, *args, **kwargs)

async def SAR(*args, **kwargs):
    return await asyncio.to_thread(pytafast.SAR, *args, **kwargs)

async def TRANGE(*args, **kwargs):
    return await asyncio.to_thread(pytafast.TRANGE, *args, **kwargs)

async def AVGPRICE(*args, **kwargs):
    return await asyncio.to_thread(pytafast.AVGPRICE, *args, **kwargs)

async def MEDPRICE(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MEDPRICE, *args, **kwargs)

async def TYPPRICE(*args, **kwargs):
    return await asyncio.to_thread(pytafast.TYPPRICE, *args, **kwargs)

async def WCLPRICE(*args, **kwargs):
    return await asyncio.to_thread(pytafast.WCLPRICE, *args, **kwargs)

async def MIDPOINT(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MIDPOINT, *args, **kwargs)

async def MIDPRICE(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MIDPRICE, *args, **kwargs)

async def ADXR(*args, **kwargs):
    return await asyncio.to_thread(pytafast.ADXR, *args, **kwargs)

async def BOP(*args, **kwargs):
    return await asyncio.to_thread(pytafast.BOP, *args, **kwargs)

async def MACDEXT(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MACDEXT, *args, **kwargs)

async def MACDFIX(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MACDFIX, *args, **kwargs)

async def STOCHF(*args, **kwargs):
    return await asyncio.to_thread(pytafast.STOCHF, *args, **kwargs)

async def STOCHRSI(*args, **kwargs):
    return await asyncio.to_thread(pytafast.STOCHRSI, *args, **kwargs)

async def ROCP(*args, **kwargs):
    return await asyncio.to_thread(pytafast.ROCP, *args, **kwargs)

async def ROCR(*args, **kwargs):
    return await asyncio.to_thread(pytafast.ROCR, *args, **kwargs)

async def ROCR100(*args, **kwargs):
    return await asyncio.to_thread(pytafast.ROCR100, *args, **kwargs)

async def AD(*args, **kwargs):
    return await asyncio.to_thread(pytafast.AD, *args, **kwargs)

async def ADOSC(*args, **kwargs):
    return await asyncio.to_thread(pytafast.ADOSC, *args, **kwargs)

async def BETA(*args, **kwargs):
    return await asyncio.to_thread(pytafast.BETA, *args, **kwargs)

async def CORREL(*args, **kwargs):
    return await asyncio.to_thread(pytafast.CORREL, *args, **kwargs)

async def LINEARREG(*args, **kwargs):
    return await asyncio.to_thread(pytafast.LINEARREG, *args, **kwargs)

async def LINEARREG_ANGLE(*args, **kwargs):
    return await asyncio.to_thread(pytafast.LINEARREG_ANGLE, *args, **kwargs)

async def LINEARREG_INTERCEPT(*args, **kwargs):
    return await asyncio.to_thread(pytafast.LINEARREG_INTERCEPT, *args, **kwargs)

async def LINEARREG_SLOPE(*args, **kwargs):
    return await asyncio.to_thread(pytafast.LINEARREG_SLOPE, *args, **kwargs)

async def TSF(*args, **kwargs):
    return await asyncio.to_thread(pytafast.TSF, *args, **kwargs)

async def VAR(*args, **kwargs):
    return await asyncio.to_thread(pytafast.VAR, *args, **kwargs)

async def AVGDEV(*args, **kwargs):
    return await asyncio.to_thread(pytafast.AVGDEV, *args, **kwargs)

async def ADD(*args, **kwargs):
    return await asyncio.to_thread(pytafast.ADD, *args, **kwargs)

async def SUB(*args, **kwargs):
    return await asyncio.to_thread(pytafast.SUB, *args, **kwargs)

async def MULT(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MULT, *args, **kwargs)

async def DIV(*args, **kwargs):
    return await asyncio.to_thread(pytafast.DIV, *args, **kwargs)

async def ACOS(*args, **kwargs):
    return await asyncio.to_thread(pytafast.ACOS, *args, **kwargs)

async def ASIN(*args, **kwargs):
    return await asyncio.to_thread(pytafast.ASIN, *args, **kwargs)

async def ATAN(*args, **kwargs):
    return await asyncio.to_thread(pytafast.ATAN, *args, **kwargs)

async def CEIL(*args, **kwargs):
    return await asyncio.to_thread(pytafast.CEIL, *args, **kwargs)

async def COS(*args, **kwargs):
    return await asyncio.to_thread(pytafast.COS, *args, **kwargs)

async def COSH(*args, **kwargs):
    return await asyncio.to_thread(pytafast.COSH, *args, **kwargs)

async def EXP(*args, **kwargs):
    return await asyncio.to_thread(pytafast.EXP, *args, **kwargs)

async def FLOOR(*args, **kwargs):
    return await asyncio.to_thread(pytafast.FLOOR, *args, **kwargs)

async def LN(*args, **kwargs):
    return await asyncio.to_thread(pytafast.LN, *args, **kwargs)

async def LOG10(*args, **kwargs):
    return await asyncio.to_thread(pytafast.LOG10, *args, **kwargs)

async def SIN(*args, **kwargs):
    return await asyncio.to_thread(pytafast.SIN, *args, **kwargs)

async def SINH(*args, **kwargs):
    return await asyncio.to_thread(pytafast.SINH, *args, **kwargs)

async def SQRT(*args, **kwargs):
    return await asyncio.to_thread(pytafast.SQRT, *args, **kwargs)

async def TAN(*args, **kwargs):
    return await asyncio.to_thread(pytafast.TAN, *args, **kwargs)

async def TANH(*args, **kwargs):
    return await asyncio.to_thread(pytafast.TANH, *args, **kwargs)

async def MAX(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MAX, *args, **kwargs)

async def MIN(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MIN, *args, **kwargs)

async def SUM(*args, **kwargs):
    return await asyncio.to_thread(pytafast.SUM, *args, **kwargs)

async def MINMAX(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MINMAX, *args, **kwargs)

async def MINMAXINDEX(*args, **kwargs):
    return await asyncio.to_thread(pytafast.MINMAXINDEX, *args, **kwargs)

async def HT_DCPERIOD(*args, **kwargs):
    return await asyncio.to_thread(pytafast.HT_DCPERIOD, *args, **kwargs)

async def HT_DCPHASE(*args, **kwargs):
    return await asyncio.to_thread(pytafast.HT_DCPHASE, *args, **kwargs)

async def HT_PHASOR(*args, **kwargs):
    return await asyncio.to_thread(pytafast.HT_PHASOR, *args, **kwargs)

async def HT_SINE(*args, **kwargs):
    return await asyncio.to_thread(pytafast.HT_SINE, *args, **kwargs)

async def HT_TRENDLINE(*args, **kwargs):
    return await asyncio.to_thread(pytafast.HT_TRENDLINE, *args, **kwargs)

async def HT_TRENDMODE(*args, **kwargs):
    return await asyncio.to_thread(pytafast.HT_TRENDMODE, *args, **kwargs)

# Generate async wrappers for all candlestick patterns
def _make_async_cdl(name):
    async def wrapper(*args, **kwargs):
        return await asyncio.to_thread(getattr(pytafast, name), *args, **kwargs)
    wrapper.__name__ = name
    return wrapper

for _name in pytafast._CDL_STANDARD + list(pytafast._CDL_PENETRATION.keys()):
    globals()[_name] = _make_async_cdl(_name)
