Strictly drop `LinkedSplits.symbol` B)
parent
1b577eebf6
commit
7381c361cd
|
@ -70,7 +70,6 @@ from ..data.feed import (
|
||||||
)
|
)
|
||||||
from ..accounting import (
|
from ..accounting import (
|
||||||
MktPair,
|
MktPair,
|
||||||
Symbol,
|
|
||||||
)
|
)
|
||||||
from ..log import get_logger
|
from ..log import get_logger
|
||||||
from ._interaction import ChartView
|
from ._interaction import ChartView
|
||||||
|
@ -455,7 +454,7 @@ class LinkedSplits(QWidget):
|
||||||
# update the UI for a given "chart instance".
|
# update the UI for a given "chart instance".
|
||||||
self.display_state: DisplayState | None = None
|
self.display_state: DisplayState | None = None
|
||||||
|
|
||||||
self._mkt: MktPair | Symbol = None
|
self._mkt: MktPair = None
|
||||||
|
|
||||||
def on_splitter_adjust(
|
def on_splitter_adjust(
|
||||||
self,
|
self,
|
||||||
|
@ -487,11 +486,6 @@ class LinkedSplits(QWidget):
|
||||||
def mkt(self) -> MktPair:
|
def mkt(self) -> MktPair:
|
||||||
return self._mkt
|
return self._mkt
|
||||||
|
|
||||||
@property
|
|
||||||
def symbol(self) -> Symbol | MktPair:
|
|
||||||
log.warning(f'{type(self)}.symbol is now deprecated use .mkt!')
|
|
||||||
return self.mkt
|
|
||||||
|
|
||||||
def set_split_sizes(
|
def set_split_sizes(
|
||||||
self,
|
self,
|
||||||
prop: float | None = None,
|
prop: float | None = None,
|
||||||
|
@ -1236,7 +1230,7 @@ class ChartPlotWidget(pg.PlotWidget):
|
||||||
|
|
||||||
# TODO: UGH! just make this not here! we should
|
# TODO: UGH! just make this not here! we should
|
||||||
# be making the sticky from code which has access
|
# be making the sticky from code which has access
|
||||||
# to the ``Symbol`` instance..
|
# to the ``MktPair`` instance..
|
||||||
|
|
||||||
# if the sticky is for our symbol
|
# if the sticky is for our symbol
|
||||||
# use the tick size precision for display
|
# use the tick size precision for display
|
||||||
|
|
|
@ -126,7 +126,7 @@ class LevelLine(pg.InfiniteLine):
|
||||||
self._on_drag_start = lambda l: None
|
self._on_drag_start = lambda l: None
|
||||||
self._on_drag_end = lambda l: None
|
self._on_drag_end = lambda l: None
|
||||||
|
|
||||||
self._y_incr_mult = float(1 / chart.linked.symbol.size_tick)
|
self._y_incr_mult = float(1 / chart.linked.mkt.size_tick)
|
||||||
self._right_end_sc: float = 0
|
self._right_end_sc: float = 0
|
||||||
|
|
||||||
# use px caching
|
# use px caching
|
||||||
|
|
|
@ -996,7 +996,7 @@ async def process_trade_msg(
|
||||||
if name in (
|
if name in (
|
||||||
'position',
|
'position',
|
||||||
):
|
):
|
||||||
sym = mode.chart.linked.symbol
|
sym: MktPair = mode.chart.linked.mkt
|
||||||
pp_msg_symbol = msg['symbol'].lower()
|
pp_msg_symbol = msg['symbol'].lower()
|
||||||
fqme = sym.fqme
|
fqme = sym.fqme
|
||||||
broker = sym.broker
|
broker = sym.broker
|
||||||
|
@ -1052,7 +1052,7 @@ async def process_trade_msg(
|
||||||
)
|
)
|
||||||
assert msg.resp in ('open', 'dark_open'), f'Unknown msg: {msg}'
|
assert msg.resp in ('open', 'dark_open'), f'Unknown msg: {msg}'
|
||||||
|
|
||||||
sym = mode.chart.linked.symbol
|
sym: MktPair = mode.chart.linked.mkt
|
||||||
fqme = sym.fqme
|
fqme = sym.fqme
|
||||||
if (
|
if (
|
||||||
((order.symbol + f'.{msg.src}') == fqme)
|
((order.symbol + f'.{msg.src}') == fqme)
|
||||||
|
|
Loading…
Reference in New Issue