Explorar o código

make pseudocode more clear

Eren Yilmaz %!s(int64=6) %!d(string=hai) anos
pai
achega
49edbb5898
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  1. 5 3
      assets/follower.py

+ 5 - 3
assets/follower.py

@@ -1,7 +1,9 @@
+# DO NOT COPY: TOP SECRET
 from math import ceil
 from random import uniform
-from secret_trading_tools import tradables_except_kollar, flip_a_coin, cheapest_buy_order, best_sell_order, place_order, \
-    some_orders_on, buy, sell, old_order_is_expired, delete_order_on, transactions_size_since_last_order_on, order_on
+from secret_trading_tools import tradables_except_kollar, flip_a_coin, cheapest_buy_order, best_sell_order, \
+    place_order, some_orders_on, buy, sell, old_order_is_expired, delete_order_on, \
+    transactions_size_since_last_order_on, order_on
 
 
 def create_order_on(tradable):
@@ -12,7 +14,7 @@ def create_order_on(tradable):
 
     duration = 43200
 
-    some_orders = some_orders_on(tradable)
+    some_orders = some_orders_on(tradable)  # returns us roughly math.log2(x) orders where x is the total # of orders
     some_amounts = [tradable.amount for tradable in some_orders]
     amount = ceil(sum(some_amounts) / len(some_amounts))