if cct.get_now_time_int() > 915 and cct.get_now_time_int() < 935:
                        # top_temp = top_temp[ (top_temp['ma5d'] > top_temp['ma10d']) & (top_temp['buy'] > top_temp['ma10d']) ][:10]

                        top_dd = cct.combine_dataFrame(top_temp[:10], top_end,append=True, clean=True)
                        # top_dd = top_dd.drop_duplicates()
                        ct_Duration_format_Values = ct.get_Duration_format_Values(ct.Duration_format_buy, market_sort_value[:])
                        top_dd = top_dd.loc[:, ct_Duration_format_Values]
                    else:
                        # top_temp = top_temp[ (top_temp['ma5d'] > top_temp['ma10d']) & (top_temp['trade'] > top_temp['ma10d']) ][:10]
                        # top_temp = top_temp[top_temp['trade'] > top_temp['ma10d']]

                        top_dd = cct.combine_dataFrame(top_temp[:10], top_end,append=True, clean=True)
                        # top_dd = top_dd.drop_duplicates()
                        ct_Duration_format_Values = ct.get_Duration_format_Values(ct.Duration_format_trade, market_sort_value[:])
                        top_dd = top_dd.loc[:, ct_Duration_format_Values]
                    print cct.format_for_print(top_dd)
                    # dfgui.show(top_dif)
                # if cct.get_now_time_int() < 930 or cct.get_now_time_int() > 1505 or (cct.get_now_time_int() > 1125 and cct.get_now_time_int() < 1505):
                # print cct.format_for_print(top_dif[-10:])
                # print top_all.loc['000025',:]
                # print "staus",status

                if status:
                    for code in top_dd[:10].index:
                        code = re.findall('(\d+)', code)
                        if len(code) > 0:
                            code = code[0]
                            kind = sl.get_multiday_ave_compare_silent(code)
                            # print top_all[top_all.low.values==0]

                            # else:
Beispiel #2
0

                    if 'nhigh' in top_all.columns:
                        ct_Duration_format_Values = ct.get_Duration_format_Values(
                            ct_Duration_format_Values, replace='df2', dest='nhigh')
                        # ct_MonitorMarket_Values2 = ct.get_Duration_format_Values(
                        #             ct_MonitorMarket_Values2, replace='df2', dest='nhigh')
                    else:
                        ct_Duration_format_Values = ct.get_Duration_format_Values(
                            ct_Duration_format_Values, replace='df2', dest='high')


                    top_dd = top_dd.loc[:, ct_Duration_format_Values]
                    # ct_Duration_format_Values = ct.get_Duration_format_Values(ct_Duration_format_Values,replace='op',dest='upper')
                    # top_dd[col for col in top_dd.index if col in top_temp[:10].index]
                    table,widths = cct.format_for_print(top_dd.loc[[col for col in top_dd[:9].index if col in top_temp[:10].index]],widths=True)
                    print(table)
                    # cct.counterCategory(top_temp)
                    print(cct.format_for_print(top_dd[-4:],header=False,widths=widths))
                    # print cct.format_for_print(top_dd)
                # if cct.get_now_time_int() < 930 or cct.get_now_time_int() > 1505 or (cct.get_now_time_int() > 1125 and cct.get_now_time_int() < 1505):
                # print cct.format_for_print(top_dif[-10:])
                # print top_all.loc['000025',:]
                # print "staus",status

                if status:
                    for code in top_dd[:10].index:
                        code = re.findall('(\d+)', code)
                        if len(code) > 0:
                            code = code[0]
                            kind = sl.get_multiday_ave_compare_silent(code)
Beispiel #3
0
                            ct_Duration_format_Values, replace='df2', dest='nhigh')
                        # ct_MonitorMarket_Values2 = ct.get_Duration_format_Values(
                        #             ct_MonitorMarket_Values2, replace='df2', dest='nhigh')
                    else:
                        ct_Duration_format_Values = ct.get_Duration_format_Values(
                            ct_Duration_format_Values, replace='df2', dest='high')




                    
                    top_dd = top_dd.loc[:, ct_Duration_format_Values]

                    # df[df.columns[(df.columns >= 'per1d') & (df.columns <= 'per9d')]][:100]
                    # table,widths = cct.format_for_print(top_dd[:10],widths=True)
                    table, widths = cct.format_for_print(top_dd.loc[[col for col in top_dd[:10].index if col in top_temp[:10].index]],
                                                         widths=True)  # pylint: disable=C0103,C0103,C0103,C0103,C0103,C0103,C0103,C0103,C0103,C0103,C0103,C0103,C0103,C0103,C0103,C0103,C0103,C0103

                    print table
                    cct.counterCategory(top_temp)
                    print cct.format_for_print(top_dd[-4:], header=False, widths=widths)  # pylint: disable=C0326,C0326,C0326,C0326,C0326,C0326,C0326,C0326,C0326,C0326,C0326,C0326,C0326,C0326,C0326,C0326,C0326
                    # print (cct.format_for_print(top_dd))
                # if cct.get_now_time_int() < 930 or cct.get_now_time_int() > 1505 or (cct.get_now_time_int() > 1125 and cct.get_now_time_int() < 1505):
                # print cct.format_for_print(top_dif[-10:])
                # print top_all.loc['000025',:]
                # print "staus",status

                if status:
                    for code in top_dd[:10].index:
                        code = re.findall('(\d+)', code)
                        if len(code) > 0:
                            code = code[0]
Beispiel #4
0
                    #                 ascending=ct.Duration_percent_op_key)
                    top_temp = top_temp.sort_values(
                        by=(market_sort_value),
                        ascending=market_sort_value_key)
                    # top_temp = top_temp.sort_values(by=['op','ra','dff', 'percent', 'ratio'], ascending=[0,0,0, 0, 1])
                # if cct.get_now_time_int() > 915 and cct.get_now_time_int() < 935:
                #     top_temp = top_temp.loc[:,ct.Monitor_format_trade]
                # else:
                #     top_temp = top_temp.loc[:,ct.Monitor_format_trade]

                if st_key_sort.split()[0] == 'x':
                    top_temp = top_temp[top_temp.topR != 0]

                ct_MonitorMarket_Values = ct.get_Duration_format_Values(
                    ct.Monitor_format_trade, market_sort_value[:2])
                print cct.format_for_print(
                    top_temp.loc[:, ct_MonitorMarket_Values][:10])

                # print cct.format_for_print(top_all[:10])
                if status:
                    for code in top_all[:10].index:
                        code = re.findall('(\d+)', code)
                        if len(code) > 0:
                            code = code[0]
                            kind = sl.get_multiday_ave_compare_silent(code)
            else:
                # print top_now[:10]
                print "\tNo data"
            int_time = cct.get_now_time_int()
            if cct.get_work_time():
                if int_time < 930:
                    while 1:
Beispiel #5
0
                    if cct.get_now_time_int() > 915 and cct.get_now_time_int() < 935:
                        # top_temp = top_temp[ (top_temp['ma5d'] > top_temp['ma10d']) & (top_temp['buy'] > top_temp['ma10d']) ][:10]

                        top_dd = cct.combine_dataFrame(top_temp[:10], top_end,append=True, clean=True)
                        # top_dd = top_dd.drop_duplicates()
                        ct_Duration_format_Values = ct.get_Duration_format_Values(ct.Duration_format_buy, market_sort_value[:])
                        top_dd = top_dd.loc[:, ct_Duration_format_Values]
                    else:
                        # top_temp = top_temp[ (top_temp['ma5d'] > top_temp['ma10d']) & (top_temp['trade'] > top_temp['ma10d']) ][:10]
                        # top_temp = top_temp[top_temp['trade'] > top_temp['ma10d']]

                        top_dd = cct.combine_dataFrame(top_temp[:10], top_end,append=True, clean=True)
                        # top_dd = top_dd.drop_duplicates()
                        ct_Duration_format_Values = ct.get_Duration_format_Values(ct.Duration_format_trade, market_sort_value[:])
                        top_dd = top_dd.loc[:, ct_Duration_format_Values]
                    print(cct.format_for_print(top_dd))
                    # dfgui.show(top_dif)
                # if cct.get_now_time_int() < 930 or cct.get_now_time_int() > 1505 or (cct.get_now_time_int() > 1125 and cct.get_now_time_int() < 1505):
                # print cct.format_for_print(top_dif[-10:])
                # print top_all.loc['000025',:]
                # print "staus",status

                if status:
                    for code in top_dd[:10].index:
                        code = re.findall('(\d+)', code)
                        if len(code) > 0:
                            code = code[0]
                            kind = sl.get_multiday_ave_compare_silent(code)
                            # print top_all[top_all.low.values==0]

                            # else: