I am using the following code to see if I am long or short in a futures trade for "NQ":

def _in_long_position(self):
return (self.Portfolio["NQ"].Quantity > 0)

def _in_short_position(self):
return (self.Portfolio["NQ"].Quantity < 0)

def _is_flat(self):
return (self.Portfolio["NQ"].Quantity == 0)

However, I am getting the following error: Runtime Error: Exception : This asset symbol ( ) was not found in your security list.

When trading futures, we trade a specific contract (like NQH19). Which symbol are we supposed to use, "NQ" or "NQH19" (obtained from self.front_contract.Symbol)? Or is teh symbol really "/NQ" or somthing like that?