Right, do index lookup for int-index as well..
							parent
							
								
									e733afce5b
								
							
						
					
					
						commit
						d69a105e33
					
				| 
						 | 
					@ -528,15 +528,17 @@ class OrderMode:
 | 
				
			||||||
                viz = chart.get_viz(chart.name)
 | 
					                viz = chart.get_viz(chart.name)
 | 
				
			||||||
                index_field = viz.index_field
 | 
					                index_field = viz.index_field
 | 
				
			||||||
                arr = shm.array
 | 
					                arr = shm.array
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                # TODO: borked for int index based..
 | 
				
			||||||
                index = flume.get_index(time_s, arr)
 | 
					                index = flume.get_index(time_s, arr)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if index_field == 'time':
 | 
					                # get absolute index for arrow placement
 | 
				
			||||||
                    i = arr['time'][index]
 | 
					                arrow_index = arr[index_field][index]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                self.arrows.add(
 | 
					                self.arrows.add(
 | 
				
			||||||
                    chart.plotItem,
 | 
					                    chart.plotItem,
 | 
				
			||||||
                    uuid,
 | 
					                    uuid,
 | 
				
			||||||
                    i,
 | 
					                    arrow_index,
 | 
				
			||||||
                    price,
 | 
					                    price,
 | 
				
			||||||
                    pointing=pointing,
 | 
					                    pointing=pointing,
 | 
				
			||||||
                    color=lines[0].color
 | 
					                    color=lines[0].color
 | 
				
			||||||
| 
						 | 
					@ -941,8 +943,6 @@ async def process_trade_msg(
 | 
				
			||||||
    fmsg = pformat(msg)
 | 
					    fmsg = pformat(msg)
 | 
				
			||||||
    log.debug(f'Received order msg:\n{fmsg}')
 | 
					    log.debug(f'Received order msg:\n{fmsg}')
 | 
				
			||||||
    name = msg['name']
 | 
					    name = msg['name']
 | 
				
			||||||
    viz = mode.chart.get_viz(mode.chart.name)
 | 
					 | 
				
			||||||
    index_field = viz.index_field
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if name in (
 | 
					    if name in (
 | 
				
			||||||
        'position',
 | 
					        'position',
 | 
				
			||||||
| 
						 | 
					@ -976,7 +976,6 @@ async def process_trade_msg(
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if dialog:
 | 
					    if dialog:
 | 
				
			||||||
        fqsn = dialog.symbol
 | 
					        fqsn = dialog.symbol
 | 
				
			||||||
        flume = mode.feed.flumes[fqsn]
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    match msg:
 | 
					    match msg:
 | 
				
			||||||
        case Status(
 | 
					        case Status(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue