Drop `wap_in_history` stuff from display loop

It's no longer part of the default OHLCV array-buffer schema and just
generally we should be processing and managing **any** non source data
in the FSP subsystem(s) despite it maybe being provided as a default by
some backends.
basic_buy_bot
Tyler Goodlet 2023-06-14 15:25:41 -04:00
parent 8947932289
commit 2a1835843f
1 changed files with 1 additions and 25 deletions

View File

@ -203,7 +203,6 @@ class DisplayState(Struct):
vlm_chart: ChartPlotWidget | None = None vlm_chart: ChartPlotWidget | None = None
vlm_sticky: YAxisLabel | None = None vlm_sticky: YAxisLabel | None = None
wap_in_history: bool = False
async def increment_history_view( async def increment_history_view(
@ -298,7 +297,6 @@ async def graphics_update_loop(
# min_istream: tractor.MsgStream, # min_istream: tractor.MsgStream,
pis: dict[str, list[pgo.PlotItem, pgo.PlotItem]] = {}, pis: dict[str, list[pgo.PlotItem, pgo.PlotItem]] = {},
wap_in_history: bool = False,
vlm_charts: dict[str, ChartPlotWidget] = {}, vlm_charts: dict[str, ChartPlotWidget] = {},
) -> None: ) -> None:
@ -452,7 +450,7 @@ async def graphics_update_loop(
await trio.sleep(0) await trio.sleep(0)
if ds.hist_vars['i_last'] < ds.hist_vars['i_last_append']: if ds.hist_vars['i_last'] < ds.hist_vars['i_last_append']:
breakpoint() await tractor.breakpoint()
# main real-time quotes update loop # main real-time quotes update loop
stream: tractor.MsgStream stream: tractor.MsgStream
@ -478,7 +476,6 @@ async def graphics_update_loop(
for fqme, quote in quotes.items(): for fqme, quote in quotes.items():
ds = dss[fqme] ds = dss[fqme]
ds.quotes = quote ds.quotes = quote
rt_pi, hist_pi = pis[fqme] rt_pi, hist_pi = pis[fqme]
# chart isn't active/shown so skip render cycle and # chart isn't active/shown so skip render cycle and
@ -509,7 +506,6 @@ def graphics_update_cycle(
ds: DisplayState, ds: DisplayState,
quote: dict, quote: dict,
wap_in_history: bool = False,
trigger_all: bool = False, # flag used by prepend history updates trigger_all: bool = False, # flag used by prepend history updates
prepend_update_index: int | None = None, prepend_update_index: int | None = None,
@ -674,10 +670,6 @@ def graphics_update_cycle(
ds.last_price_sticky.update_from_data(*end_ic) ds.last_price_sticky.update_from_data(*end_ic)
ds.hist_last_price_sticky.update_from_data(*end_ic) ds.hist_last_price_sticky.update_from_data(*end_ic)
# update vwap overlay line
# if wap_in_history:
# chart.get_viz('bar_wap').update_graphics()
# update OHLC chart last bars # update OHLC chart last bars
# TODO: fix the only last uppx stuff.... # TODO: fix the only last uppx stuff....
main_viz.draw_last() # only_last_uppx=True) main_viz.draw_last() # only_last_uppx=True)
@ -1378,21 +1370,6 @@ async def display_symbol_data(
loglevel, loglevel,
) )
# XXX: FOR SOME REASON THIS IS CAUSING HANGZ!?!
# plot historical vwap if available
wap_in_history = False
# if (
# brokermod._show_wap_in_history
# and 'bar_wap' in bars.dtype.fields
# ):
# wap_in_history = True
# rt_chart.draw_curve(
# name='bar_wap',
# shm=ohlcv,
# color='default_light',
# add_label=False,
# )
godwidget.resize_all() godwidget.resize_all()
await trio.sleep(0) await trio.sleep(0)
@ -1516,7 +1493,6 @@ async def display_symbol_data(
# min_istream, # min_istream,
pis, pis,
wap_in_history,
vlm_charts, vlm_charts,
) )