Skip to content

staggered_orders_trading: use order_quantity/order_price in warning - #3648

Open
blueyed wants to merge 1 commit into
Drakkar-Software:devfrom
blueyed:fix-warning
Open

staggered_orders_trading: use order_quantity/order_price in warning#3648
blueyed wants to merge 1 commit into
Drakkar-Software:devfrom
blueyed:fix-warning

Conversation

@blueyed

@blueyed blueyed commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

@blueyed
blueyed changed the base branch from master to dev August 15, 2026 12:19
if not created_order:
self.logger.warning(
f"No order created for {order_data} (cost: {quantity * order_data.price}): "
f"No order created for {order_data} (cost: {order_quantity * order_price}): "

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

order_quantity and order_price are initialized in the above for loop that can yield no iteration, in this case, order_quantity and order_price would be unset. To use them in this log, we need to init them before the loop, to be sure they are always set variables

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