Ejemplo n.º 1
0
def _1001():
    if request.values.get('action') == 'query':
        match_ls = []
        tag = request.values.get('tag')  #
        ybts = int(request.values.get('ybts'))  #放量天数
        ls = LISTS.query.all()  #统计所有股票个数

        tp = ThreadPool(10)  #30个线程处理
        for stock in ls:
            thread = tp.get_thread()
            t = thread(target=filter_rule_1001,
                       args=(stock, tag, ybts, match_ls, (tp)))
            t.start()
        return render_template('result.html', matchs=match_ls)

    return render_template('1001.html')
Ejemplo n.º 2
0
def _3003():
    if request.values.get('action') == 'query':
        match_ls = []
        day = request.values.getlist('optionsRadios')  #occurtime

        ls = LISTS.query.all()  # 统计所有股票个数

        tp = ThreadPool(10)  # 30个线程处理
        for stock in ls:
            thread = tp.get_thread()
            t = thread(target=filter_rule_3003,
                       args=(stock, day, match_ls, (tp)))
            t.start()
        return render_template('result.html', matchs=match_ls)

    return render_template('3003.html')
Ejemplo n.º 3
0
def _1004():
    if request.values.get('action') == 'query':
        match_ls = []
        ybts = int(request.values.get('ybts'))  #样本天数
        changehand = float(request.values.get('_changehand'))  #总换手率
        ls = LISTS.query.all()  # 统计所有股票个数

        tp = ThreadPool(10)  # 30个线程处理
        for stock in ls:
            thread = tp.get_thread()
            t = thread(target=filter_rule_1004,
                       args=(stock, ybts, changehand, match_ls, (tp)))
            t.start()
        return render_template('result.html', matchs=match_ls)

    return render_template('1004.html')
Ejemplo n.º 4
0
def _1003():
    if request.values.get('action') == 'query':
        match_ls = []
        slts = int(request.values.get('_slts'))  #缩量天数
        multiple = int(request.values.get('multiple'))  #放大倍数
        turnover = float(request.values.get('turnover'))
        ls = LISTS.query.all()  # 统计所有股票个数

        tp = ThreadPool(10)  # 30个线程处理
        for stock in ls:
            thread = tp.get_thread()
            t = thread(target=filter_rule_1003,
                       args=(stock, slts, multiple, turnover, match_ls, (tp)))
            t.start()
        return render_template('result.html', matchs=match_ls)

    return render_template('1003.html')
Ejemplo n.º 5
0
def _2003():
    if request.values.get('action') == 'query':
        match_ls = []
        tag = request.values.get('tag')  # 哪天出现锤子
        no_head = request.values.get('no_head')  #必须光头

        ls = LISTS.query.all()  # 统计所有股票个数

        tp = ThreadPool(10)  # 30个线程处理
        for stock in ls:
            thread = tp.get_thread()
            t = thread(target=filter_rule_2003,
                       args=(stock, tag, no_head, match_ls, (tp)))
            t.start()
        return render_template('result.html', matchs=match_ls)

    return render_template('2003.html')
Ejemplo n.º 6
0
def _2001():
    if request.values.get('action') == 'query':
        match_ls = []
        tag = request.values.get('tag')  # 哪天出现十字星
        throwBaby = request.values.get('throwBaby')  #必须是"弃婴"形态
        k3up = request.values.get('k3up')  #K3日股价大涨(相较K1形成刺透或吞没形态)
        vol_increase = request.values.get(
            'vol_increase')  #成交量显著放大(K3与之前K2、K1相比)

        ls = LISTS.query.all()  # 统计所有股票个数

        tp = ThreadPool(10)  # 30个线程处理
        for stock in ls:
            thread = tp.get_thread()
            t = thread(target=filter_rule_2001,
                       args=(stock, tag, throwBaby, k3up, vol_increase,
                             match_ls, (tp)))
            t.start()
        return render_template('result.html', matchs=match_ls)

    return render_template('2001.html')