Stop pulling lot size precision from symbol for now in the UI

fsp_feeds
Tyler Goodlet 2021-07-21 20:09:36 -04:00
parent d3457cd423
commit 826c4408ea
1 changed files with 8 additions and 2 deletions

View File

@ -105,6 +105,7 @@ class LineEditor:
# fields settings # fields settings
size: Optional[int] = None, size: Optional[int] = None,
) -> LevelLine: ) -> LevelLine:
"""Stage a line at the current chart's cursor position """Stage a line at the current chart's cursor position
and return it. and return it.
@ -128,10 +129,14 @@ class LineEditor:
line = order_line( line = order_line(
chart, chart,
# TODO: convert these values into human-readable form
# (i.e. with k, m, M, B) type embedded suffixes
level=y, level=y,
level_digits=symbol.digits(), level_digits=symbol.digits(),
size=size, size=size,
size_digits=symbol.lot_digits(), # TODO: we need truncation checks in the EMS for this?
# size_digits=min(symbol.lot_digits(), 3),
# just for the stage line to avoid # just for the stage line to avoid
# flickering while moving the cursor # flickering while moving the cursor
@ -204,7 +209,8 @@ class LineEditor:
level_digits=sym.digits(), level_digits=sym.digits(),
size=size, size=size,
size_digits=sym.lot_digits(), # TODO: we need truncation checks in the EMS for this?
# size_digits=sym.lot_digits(),
# LevelLine kwargs # LevelLine kwargs
color=line.color, color=line.color,