Closed bi-kash closed 3 years ago
@fernando-az-infertrade has done good work. It's well-written and well-tested code.
Agree...!
@bi-kash - if you look at the version of code in 42226e22a2add05ea113cba1f4145521d74728a5 you can see a different format of decorator, one where you do not supply the limits to the decorator, but add them as keyword arguments to the decorated functions. I think we could add that format of decorator as @apply_restrictions
and include within it the limit_allocations as an option.
So user could call my_first_infertrade_rule(lower_limt = -0.1, upper_limit = 0.5) or similar once my_first_infertrade_rule was decorated by
@apply_restrictions`
This format would allow us to extend @apply_restrictions
to include other limits (e.g. a stop loss) as additional keyword arguments.
@fernando-az-infertrade has done good work. It's well-written and well-tested code.