stop_loss#

API documentation for tradeexecutor.strategy.stop_loss Python module in Trading Strategy.

Module description#

Stop loss trade logic.

Logic for managing position stop loss/take profit signals.

Functions#

check_flexible_triggers(timestamp, p, ...)

Check for custom trigger conditions.

check_position_triggers(position_manager, ...)

Generate trades that depend on real-time price signals.

check_trigger_hit(timestamp, p, trade, ...)

See if any of the trades triggers activate.

expire_remaining_triggers(timestamp, position)

Position was closed/otherwise manipulated and we can clean up whatever triggers it had left.

report_position_triggered(position, ...)

Write a trade logging output report on a position trigger.

update_trade_triggered(timestamp, position, ...)

Trade was triggered during the trigger check.

update_trigger_expired(timestamp, trigger, ...)

Trigger is past its best before.