Miscellaneous#

Miscellaneous methods are the methods that do not fit into other categories. You can use these methods to log messages to your log files, sleep for a few seconds and more. You can see a list of them below:

Strategy.log_message(message[, color, broadcast])

Logs an info message prefixed with the strategy name.

Strategy.sleep(sleeptime[, ...])

Sleep for sleeptime seconds.

Strategy.set_market(market)

Set the market for trading hours.

Strategy.update_parameters(parameters)

Update the parameters of the strategy.

Strategy.get_parameters()

Get the parameters of the strategy.

Strategy.await_market_to_close([timedelta])

Sleep until market closes.

Strategy.await_market_to_open([timedelta])

Executes infinite loop until market opens

Strategy.wait_for_order_registration(order)

Wait for the order to be registered by the broker

Strategy.wait_for_order_execution(order)

Wait for one specific order to be executed or canceled by the broker

Strategy.wait_for_orders_registration(orders)

Wait for the orders to be registered by the broker

Strategy.wait_for_orders_execution(orders)

Wait for a list of orders to be executed or canceled by the broker

Strategy.register_cron_callback(...)

Register a callback function to be executed according to a cron schedule.