brndnmtthws / thetagang

ThetaGang is an IBKR bot for collecting money
GNU Affero General Public License v3.0
1.96k stars 261 forks source link

Optionally close positions when rolling fails #442

Closed brndnmtthws closed 4 months ago

brndnmtthws commented 4 months ago

If we try to roll a position and can't find a suitable contract to roll to, allow the option of closing the position out instead.

This can be configured by setting roll_when.close_if_unable_to_roll = true, or per-symbol with symbols.<symbol>.close_if_unable_to_roll = true. Disabled by default.

This closes #439.