You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
by doing so, we can make it easier for the writer of a policy, hiding some low-level mechanisms from them, while retaining full functionality.
we could have trading functions in BasePolicy that match our existing signature: close_short_trade(reduce_short_amount, maturity_time, slippage_tolerance, base_fee_multiple, priority_fee_multiple, gas_limit)
so the policy just calls self.close_short_trade(...) and doesn't care about the implementation, passing in overrides if they want, if not the defaults are used.
those can just append the trade to an internal ._action_list which is retrieved by the simulation instead of being returned by the policy's action(...) function.
or action() could exist in BasePolicy and return action_list as it currently does, while calling another function left to be implemented by the user which actually populates the action list (trade_if_you_want_to()?).
The text was updated successfully, but these errors were encountered:
by doing so, we can make it easier for the writer of a policy, hiding some low-level mechanisms from them, while retaining full functionality.
we could have trading functions in BasePolicy that match our existing signature:
close_short_trade(reduce_short_amount, maturity_time, slippage_tolerance, base_fee_multiple, priority_fee_multiple, gas_limit)
so the policy just calls
self.close_short_trade(...)
and doesn't care about the implementation, passing in overrides if they want, if not the defaults are used.those can just append the trade to an internal
._action_list
which is retrieved by the simulation instead of being returned by the policy'saction(...)
function.or
action()
could exist in BasePolicy and returnaction_list
as it currently does, while calling another function left to be implemented by the user which actually populates the action list (trade_if_you_want_to()
?).The text was updated successfully, but these errors were encountered: