class_docstr: An order criteria that allows execution when the quote price for a
  trading pair is above or below a specific price.
  
  Parameters
  ----------
  direction : `Union[StopDirection, str]`
      The direction to watch for the stop criteria.
  percent : float
      The percentage of the current price to use for watching.
class_docstr_tok: ["An","order","criteria","that","allows","execution","when","the","quote","price","for","a","trading","pair","is","above","or","below","a","specific","price",".","Parameters","--","--","--","--","--","direction",":","`","Union","[","StopDirection",",","str","]","`","The","direction","to","watch","for","the","stop","criteria",".","percent",":","float","The","percentage","of","the","current","price","to","use","for","watching","."]
code: def check(self, order: "Order", exchange: "Exchange") -> bool:
      price = exchange.quote_price(order.pair)
      percent = abs(price - order.price) / order.price
  
      is_take_profit = (self.direction == StopDirection.UP) and (
          price >= order.price
      )
      is_stop_loss = (self.direction == StopDirection.DOWN) and (
          price <= order.price
      )
  
      return (
          is_take_profit or is_stop_loss
      ) and percent >= self.percent
  
imports: import operator
  from abc import abstractmethod, ABCMeta
  from typing import Callable, Union, TypeVar
  from enum import Enum
  from tensortrade.oms.orders import TradeSide, Order
  from tensortrade.oms.exchanges import Exchange
label_desc: Use image node_id 2 for calling the Stop obj's underlying member method code with example usage: obj.check(order, exchange) and returns: unknown