brndnmtthws / thetagang

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

Use a lambda for minimum price #370

Closed brndnmtthws closed 4 months ago

brndnmtthws commented 4 months ago

When scanning chains, sometimes the underlying can move a fair bit and it moves the minimum prices around if there's a big move. Instead of calculating the minimum price once, we'll use a lambda so that if there is a big change, it should be accounted for appropriately. This could lead to some odd behaviour, but it should still be less bad than the alternative which is using an out-of-date price.