Adjust corresponding fast/slow chart line level on edits
parent
a07367fae2
commit
ceac3f2ee4
|
@ -384,7 +384,7 @@ class OrderMode:
|
||||||
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
print(f'Line modify: {line}')
|
log.info(f'Order modify: {line}')
|
||||||
# cancel original order until new position is found?
|
# cancel original order until new position is found?
|
||||||
# TODO: make a config option for this behaviour..
|
# TODO: make a config option for this behaviour..
|
||||||
|
|
||||||
|
@ -396,7 +396,8 @@ class OrderMode:
|
||||||
|
|
||||||
level = line.value()
|
level = line.value()
|
||||||
# updateb by level change callback set in ``.line_from_order()``
|
# updateb by level change callback set in ``.line_from_order()``
|
||||||
size = line.dialog.order.size
|
dialog = line.dialog
|
||||||
|
size = dialog.order.size
|
||||||
|
|
||||||
self.book.update(
|
self.book.update(
|
||||||
uuid=line.dialog.uuid,
|
uuid=line.dialog.uuid,
|
||||||
|
@ -404,8 +405,13 @@ class OrderMode:
|
||||||
size=size,
|
size=size,
|
||||||
)
|
)
|
||||||
|
|
||||||
# ems response loop handlers
|
# adjust corresponding slow/fast chart line
|
||||||
|
# to match level
|
||||||
|
for ln in dialog.lines:
|
||||||
|
if ln is not line:
|
||||||
|
ln.set_level(line.value())
|
||||||
|
|
||||||
|
# EMS response msg handlers
|
||||||
def on_submit(
|
def on_submit(
|
||||||
self,
|
self,
|
||||||
uuid: str
|
uuid: str
|
||||||
|
|
Loading…
Reference in New Issue