We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb2a8e1 commit a2df8d2Copy full SHA for a2df8d2
1 file changed
quantpits/scripts/order_gen.py
@@ -788,8 +788,13 @@ def main():
788
print(f"📤 卖出 : {len(sell_orders)}")
789
print(f"📥 买入 : {len(buy_orders)}")
790
if buy_orders:
791
- total_buy = sum(o['estimated_amount'] for o in buy_orders)
792
- print(f"💰 预估支出 : {total_buy:,.2f}")
+ amounts = sorted([o['estimated_amount'] for o in buy_orders])
+ min_total = sum(amounts[:buy_count])
793
+ max_total = sum(amounts[-buy_count:]) if len(amounts) >= buy_count else sum(amounts)
794
+ if min_total == max_total:
795
+ print(f"💰 预估支出 : {min_total:,.2f}")
796
+ else:
797
+ print(f"💰 预估支出 : {min_total:,.2f} ~ {max_total:,.2f}")
798
if sell_orders:
799
print(f"💰 预估回收 : {sell_amount:,.2f}")
800
0 commit comments