pair = ['A','B']
pair_open = lambda c,d: maybe_open_position(c, d, pair)
pair_close = lambda c,d: eod_close_position(c, d, pair)
for t in times:
schedule_function(func=pair_open,
date_rule=date_rules.every_day(),
time_rule=time_rules.market_open(minutes=t))
# exit at close worst case
schedule_function(func=pair_close,
date_rule=date_rules.every_day(),
time_rule=time_rules.market_close(minutes=1))
Error Runtime exception: MismatchedArguments: lambda c, d accepts mismatched parameters
I am pretty sure this should work, for now I'll just switch to a regular function that specifically accepts context and data, but hopefully this can be fixed? I think it's part of the "pre-compile" checks again.