Pass in fqsn from chart UI components
							parent
							
								
									6d9ffc532e
								
							
						
					
					
						commit
						4378974b59
					
				| 
						 | 
					@ -260,9 +260,7 @@ async def graphics_update_loop(
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # main loop
 | 
					    # main loop
 | 
				
			||||||
    async for quotes in stream:
 | 
					    async for quotes in stream:
 | 
				
			||||||
 | 
					 | 
				
			||||||
        ds.quotes = quotes
 | 
					        ds.quotes = quotes
 | 
				
			||||||
 | 
					 | 
				
			||||||
        quote_period = time.time() - last_quote
 | 
					        quote_period = time.time() - last_quote
 | 
				
			||||||
        quote_rate = round(
 | 
					        quote_rate = round(
 | 
				
			||||||
            1/quote_period, 1) if quote_period > 0 else float('inf')
 | 
					            1/quote_period, 1) if quote_period > 0 else float('inf')
 | 
				
			||||||
| 
						 | 
					@ -572,24 +570,25 @@ async def display_symbol_data(
 | 
				
			||||||
    #     clear_on_next=True,
 | 
					    #     clear_on_next=True,
 | 
				
			||||||
    #     group_key=loading_sym_key,
 | 
					    #     group_key=loading_sym_key,
 | 
				
			||||||
    # )
 | 
					    # )
 | 
				
			||||||
 | 
					    fqsn = '.'.join((sym, provider))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async with open_feed(
 | 
					    async with open_feed(
 | 
				
			||||||
            provider,
 | 
					        [fqsn],
 | 
				
			||||||
            [sym],
 | 
					        loglevel=loglevel,
 | 
				
			||||||
            loglevel=loglevel,
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # limit to at least display's FPS
 | 
					        # limit to at least display's FPS
 | 
				
			||||||
            # avoiding needless Qt-in-guest-mode context switches
 | 
					        # avoiding needless Qt-in-guest-mode context switches
 | 
				
			||||||
            tick_throttle=_quote_throttle_rate,
 | 
					        tick_throttle=_quote_throttle_rate,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ) as feed:
 | 
					    ) as feed:
 | 
				
			||||||
        ohlcv: ShmArray = feed.shm
 | 
					        ohlcv: ShmArray = feed.shm
 | 
				
			||||||
        bars = ohlcv.array
 | 
					        bars = ohlcv.array
 | 
				
			||||||
        symbol = feed.symbols[sym]
 | 
					        symbol = feed.symbols[sym]
 | 
				
			||||||
 | 
					        fqsn = symbol.front_fqsn()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # load in symbol's ohlc data
 | 
					        # load in symbol's ohlc data
 | 
				
			||||||
        godwidget.window.setWindowTitle(
 | 
					        godwidget.window.setWindowTitle(
 | 
				
			||||||
            f'{symbol.key}@{symbol.brokers} '
 | 
					            f'{fqsn} '
 | 
				
			||||||
            f'tick:{symbol.tick_size} '
 | 
					            f'tick:{symbol.tick_size} '
 | 
				
			||||||
            f'step:1s '
 | 
					            f'step:1s '
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
| 
						 | 
					@ -674,8 +673,7 @@ async def display_symbol_data(
 | 
				
			||||||
                open_order_mode(
 | 
					                open_order_mode(
 | 
				
			||||||
                    feed,
 | 
					                    feed,
 | 
				
			||||||
                    chart,
 | 
					                    chart,
 | 
				
			||||||
                    symbol,
 | 
					                    fqsn,
 | 
				
			||||||
                    provider,
 | 
					 | 
				
			||||||
                    order_mode_started
 | 
					                    order_mode_started
 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
            ):
 | 
					            ):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue