brndnmtthws / thetagang

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

Return 0.0 if market price is NaN. #369

Closed brndnmtthws closed 4 months ago

brndnmtthws commented 4 months ago

On the odd chance ticker.marketPrice() returns NaN, return 0.0 instead. This is very rare, and shouldn't happen, but it might when you have contracts that are way OTM and near expiration.

This may hopefully address #368.