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

Backtesting updated to provide a more accurate fill prices #279

Merged
merged 3 commits into from
Sep 5, 2023

Conversation

davidlatte
Copy link
Collaborator

Applies to for market, limit, and stop loss orders.

@davidlatte davidlatte linked an issue Aug 30, 2023 that may be closed by this pull request
@davidlatte davidlatte temporarily deployed to unit-tests August 30, 2023 23:19 — with GitHub Actions Inactive
# Get the assets last price
asset_price = self.get_last_price(order.asset)

if order._trail_stop_price:
Copy link
Contributor

Choose a reason for hiding this comment

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

issue with None?

if price is not None:

# If the price is set, then the order has been filled
if price:
Copy link
Contributor

Choose a reason for hiding this comment

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

Issue with $0/None?

@davidlatte davidlatte temporarily deployed to unit-tests September 5, 2023 18:16 — with GitHub Actions Inactive
@grzesir grzesir merged commit ed07aa9 into dev Sep 5, 2023
1 check passed
@davidlatte davidlatte deleted the 278-fill-prices-in-backtest-candle-open-vs-close branch September 5, 2023 18:22
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.

Fill Prices in BackTest: Candle Open vs Close
2 participants