Adjust corresponding fast/slow chart line level on edits

history_view
Tyler Goodlet 2022-09-07 10:42:12 -04:00
parent a07367fae2
commit ceac3f2ee4
1 changed files with 9 additions and 3 deletions

View File

@ -384,7 +384,7 @@ class OrderMode:
) -> None:
print(f'Line modify: {line}')
log.info(f'Order modify: {line}')
# cancel original order until new position is found?
# TODO: make a config option for this behaviour..
@ -396,7 +396,8 @@ class OrderMode:
level = line.value()
# 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(
uuid=line.dialog.uuid,
@ -404,8 +405,13 @@ class OrderMode:
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(
self,
uuid: str