| | |
| | | from utils import tool |
| | | |
| | | |
| | | # 卖单统计 |
| | | def statistic_sell_order(): |
| | | code = "000888" |
| | | data_map = log_export.load_huaxin_transaction_map(date=tool.get_now_date_str()) |
| | | datas = data_map.get(code) |
| | | __latest_sell_order_dict = {} |
| | | |
| | | for data in datas: |
| | | for d in data: |
| | | if code not in __latest_sell_order_dict: |
| | | __latest_sell_order_dict[code] = [d[7], d[2], d[1], (d[3], d[6]), (d[3], d[6])] |
| | | else: |
| | | if __latest_sell_order_dict[code][0] == d[7]: |
| | | __latest_sell_order_dict[code][1] += d[2] |
| | | __latest_sell_order_dict[code][2] = d[1] |
| | | __latest_sell_order_dict[code][4] = (d[3], d[6]) |
| | | else: |
| | | info = __latest_sell_order_dict[code] |
| | | |
| | | # 上个卖单成交完成 |
| | | # 封存数据,计算新起点 |
| | | # 大于50w的卖单才会保存 |
| | | # 大于50w加入卖单 |
| | | money = info[1] * info[2] |
| | | if 101328000 > info[3][0] > 101324000 and info[0] > 12265084: |
| | | print(money, info) |
| | | if money >= 500000: |
| | | pass |
| | | __latest_sell_order_dict[code] = [d[7], d[2], d[1], (d[3], d[6]), (d[3], d[6])] |
| | | |
| | | |
| | | def load_sell_info(): |
| | | date = tool.get_now_date_str() |
| | | data_map = log_export.load_huaxin_transaction_map(date=date) |
| | |
| | | d = datas[i] |
| | | big_sell_order_info = HuaXinSellOrderStatisticManager.add_transaction_datas(code, d) |
| | | if d[-1][7] >= 3911165: |
| | | sell_infos = HuaXinSellOrderStatisticManager.get_latest_transaction_datas(code, 3910694,"09:35:27") |
| | | print( sum([x[1]*x[2] for x in sell_infos])) |
| | | sell_infos = HuaXinSellOrderStatisticManager.get_latest_transaction_datas(code, 3910694, "09:35:27") |
| | | print(sum([x[1] * x[2] for x in sell_infos])) |
| | | if big_sell_order_info[0] < 50 * 10000: |
| | | continue |
| | | print(i, sum([x[1] * x[2] for x in big_sell_order_info[1]]), big_sell_order_info) |
| | | |
| | | |
| | | if __name__ == '__main__': |
| | | test_sell_order_info() |
| | | statistic_sell_order() |
| | |
| | | def get_zyltgb_threshold(market_sitation: int): |
| | | if market_sitation == MarketSituationManager.SITUATION_GOOD: |
| | | return 31, 100, 40, 100, 40, 80, 100 |
| | | return 5.9, 41, 8.9, 25, 8.9, 19, 80 |
| | | # return 5.9, 41, 8.9, 25, 8.9, 19, 80 |
| | | # TODO 大规模测试 |
| | | return 5.9, 2000, 8.9, 25, 8.9, 19, 2000 |
| | | |
| | | |
| | | # 获取量比的等级获取量 |