| | |
| | | from code_attribute import code_nature_analyse |
| | | from utils import init_data_util |
| | | from utils import init_data_util, tool |
| | | |
| | | |
| | | def is_too_high(datas): |
| | | limit_up_price = round(datas[0]["close"] * 1.1, 2) |
| | | datas.reverse() |
| | | is_new_high = code_nature_analyse.is_price_too_high_in_days(datas, limit_up_price) |
| | | is_new_high = code_nature_analyse.is_up_too_high_from_latest_limit_up(datas) |
| | | return is_new_high |
| | | |
| | | |
| | | def __get_refer_volume_info(): |
| | | code = "001239" |
| | | limit_up_price = 22.80 |
| | | volumes_data = init_data_util.get_volumns_by_code(code, 150) |
| | | volumes = init_data_util.parse_max_volume(volumes_data[:90], |
| | | code_nature_analyse.is_new_top( |
| | | limit_up_price, |
| | | volumes_data[:90]) or code_nature_analyse.is_near_top( |
| | | limit_up_price, |
| | | volumes_data[:90])) |
| | | print(volumes) |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | code_str = "000536,000625,000628,000670,000766,000829,001311,001331,002189,002275,002331,002341,002363,002406,002416,002655,002691,002848,002861,002885,002906,002917,002962,300217,300462,300552,301111,301215,301372,600107,600178,600222,600288,600513,600698,600960,601777,603029,603286,603297,603569,605020,688314,688789" |
| | | codes = code_str.split(",") |
| | | for code in codes: |
| | | if code.find("00") != 0 and code.find("60") != 0: |
| | | continue |
| | | try: |
| | | datas = init_data_util.get_volumns_by_code(code, 120) |
| | | datas = datas[3:] |
| | | result = is_too_high(datas) |
| | | if result: |
| | | print(code, result) |
| | | except: |
| | | print(code, "出错") |
| | | __get_refer_volume_info() |
| | | # code = "601022" |
| | | # volumes_data = init_data_util.get_volumns_by_code(code, 150) |
| | | # volumes_data = volumes_data[0:] |
| | | # print( code_nature_analyse.is_special(volumes_data)) |