explain_open_position_failure#

API documentation for tradeexecutor.strategy.pandas_trader.position_manager.explain_open_position_failure Python function.

explain_open_position_failure(portfolio, pair, timestamp, action_hint)[source]#

Display user friendly error message about conflicting open positions.

  • The strategy tries to open a new position, but there is already an existing position

  • Create a user-friendly message so that the user can diagnose their strategy

Returns:

The error message

Parameters:
Return type:

str