Exemple #1
0
def Run(codes, task_id=0):
    from pypublish import publish
    pl = publish.Publish()
    df_year = stock.THS().df_year
    df_jll = stock.THS().df_jll
    #myredis.delKeys(myredis.enum.KEY_HISDAT_NO_FUQUAN)
    for code in codes:
        df = df_year[df_year['code'] == code]
        df_hisdat = stock.getHisdatDfRedis(code)
        history_syl = calc_history_syl(df, df_hisdat, 'year')
        ui.DrawTs(pl, history_syl, title=stock.GetCodeName(code).decode('utf8'))
        df = df_jll[df_jll['code'] == code]
        history_syl = calc_history_syl(df, df_hisdat, period='quarter')
        ui.DrawTs(pl, history_syl, title=stock.GetCodeName(code).decode('utf8'))
Exemple #2
0
def showBoll(closes):
    """显示布林线"""
    upper, middle, lower = stock.BOLL(closes)
    ui.DrawTs(pl, closes, high=upper, low=lower)