Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Optimizer] allow multi exchange backtests and handle settings fallbacks #2246

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

techfreaque
Copy link
Contributor

@techfreaque techfreaque commented Feb 24, 2023

if the api receives a list of "exchange_ids" and/or a list of "data_files" it will optimize on multi exchanges.
Should behave the same way as before if "data_files" is a string and not a list and if no "exchange_ids" list is provided

requires:
Drakkar-Software/OctoBot-Trading#847
Drakkar-Software/OctoBot-Backtesting#172
Drakkar-Software/OctoBot-Tentacles#865

self.required_idle_cores = int(
settings_dict.get(enums.OptimizerConfig.IDLE_CORES.value)
or constants.OPTIMIZER_DEFAULT_REQUIRED_IDLE_CORES
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using or when assigning default values from settings_dict can cause incorrect defaults when valid falsy values (e.g., 0, False) are provided. It might be better to change this to:

self.required_idle_cores = int(
    settings_dict.get(
        enums.OptimizerConfig.IDLE_CORES.value,
        constants.OPTIMIZER_DEFAULT_REQUIRED_IDLE_CORES
    )
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ruidazeng
I see, I have removed those changes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Herklos is this something merge-able? trying to backlog all the pull requests for OctoBot :))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ruidazeng Thank you but we can see the open pull requests on the OctoBot repos, can you please not do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants