Esempio n. 1
0
def doservice(num, df, servicename):
    # df = df[::-1]
    df = df.head(250)
    C = np.array(df.close).tolist()
    M = np.array(df.high).tolist()
    N = np.array(df.low).tolist()
    a = gongshi.gongshi(C, M, N)
    b = getattr(a, servicename)()
    print(b)
    if float(b) >= 2.5:
        print("----------------", b, num)
        with open('test.txt', 'a') as fp:
            fp.write("----------------", b, num)
    row = [b, str(num)]
    return row
Esempio n. 2
0
def jiaolongmairu(num, df):
    # df = df[::-1]
    df = df.head(250)
    C = np.array(df.close).tolist()
    M = np.array(df.high).tolist()
    N = np.array(df.low).tolist()
    a = gongshi.gongshi(C, M, N)
    b = a.jiaolongmairu()

    if float(b) >= 2.5:
        print("----------------", b, num)
        with open('test.txt', 'a') as fp:
            fp.write("----------------", b, num)
    row = [b, str(num)]
    return row