Trigger order allocation at stage/creation time
parent
d9d65bd71a
commit
5103204853
|
@ -115,12 +115,13 @@ class OrderMode:
|
||||||
|
|
||||||
) -> LevelLine:
|
) -> LevelLine:
|
||||||
|
|
||||||
|
level = order.price
|
||||||
line = order_line(
|
line = order_line(
|
||||||
|
|
||||||
self.chart,
|
self.chart,
|
||||||
# TODO: convert these values into human-readable form
|
# TODO: convert these values into human-readable form
|
||||||
# (i.e. with k, m, M, B) type embedded suffixes
|
# (i.e. with k, m, M, B) type embedded suffixes
|
||||||
level=order.price,
|
level=level,
|
||||||
action=order.action,
|
action=order.action,
|
||||||
|
|
||||||
size=order.size,
|
size=order.size,
|
||||||
|
@ -152,6 +153,8 @@ class OrderMode:
|
||||||
|
|
||||||
line._on_level_change = update_order_price
|
line._on_level_change = update_order_price
|
||||||
|
|
||||||
|
line.set_level(level)
|
||||||
|
|
||||||
return line
|
return line
|
||||||
|
|
||||||
def stage_order(
|
def stage_order(
|
||||||
|
|
Loading…
Reference in New Issue