check_position_triggers#
- check_position_triggers(position_manager)[source]#
Generate trades that depend on real-time price signals.
Stop loss
Take profit
What dots this do.
Get the real-time price of an assets that are currently hold in the portfolio
Update dynamic stop loss/take profits like trailing stop loss
Use mid-price to check for the trigger price threshold
Generate stop loss/take profit signals for trades
See related position attributes
tradeexecutor.state.position.TradingPosition.trailing_stop_loss
- Parameters:
position_manager (PositionManager) – Encapsulates the current state, universe for closing positions
epsilon – The rounding error to zero
- Returns:
List of triggered trades for all positions, like market sell on a stop loss triggered.s
- Return type: