brndnmtthws / thetagang

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

Setting DTE per symbol in toml #425

Closed noamagiv closed 1 month ago

noamagiv commented 1 month ago

Hi, I would like to set individual DTE per symbol, getting an error while setting DTE under symbols in TOML configuration. is there any way to configure this?

Thanks !

brndnmtthws commented 1 month ago

Not currently possible, but this should be easy to add.

noamagiv commented 1 month ago

I can try.... do you want to assign it to me?

brndnmtthws commented 1 month ago

Sure thing!

As a hint to get started, take a look at how functions like get_target_delta() work. It should be as simple as copying that pattern and plugging it into places like this: https://github.com/brndnmtthws/thetagang/blob/18a46e25374d1da37ac500012d3078469faf3bbf/thetagang/portfolio_manager.py#L322.

noamagiv commented 1 month ago

Done in PR #428