Just completed a huge refactoring owing to me wanting to trade stocks, futures as well as options on the same.
Well, it wasn't really huge. It just felt huge. I knew it was coming because there was hard-coding of certain things which I think @HobbyTrading mentioned. Took a few hours, code is much, much better, everything still works.
Lines of code still manageable:
View attachment 216720
It always seems easier to write from scratch than refactor. Several years into pysystemtrade later....
GAT
