A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/kernc/backtesting.py/issues/153 below:

Why was my order filled significantly higher than the high of the bar? · Issue #153 · kernc/backtesting.py · GitHub

Expected Behavior

I'd expect my order to fill at or around the close of the current bar/open of next bar.

Actual Behavior

My order looks like it was filled at $178.74, but the bar it took place in had a high of $177.89, so this doesn't seem like it should b e possible. trade_on_close is left default.

I wouldn't think this should be possible, regardless of how I place my order. I've tried placing a limit order at the latest close price, I've tried a market order, and I've tried a close price + a little bit of wiggle room and it doesn't place this order where I'd expect.

Is there something I can try to debug this? Is this behaviour caused by something I can look into.

Steps to Reproduce
Additional info

The yellow line is the trade, is this is relevant:

Data of the bar where the trade was entered:

Volume    127488.0000
Vw           178.4709
Open         178.3501
Close        178.6400
High         178.6700
Low          178.3450
N            924.0000
Name: 2020-05-15 11:02:00-05:00, dtype: float64

and the bar following it

Volume    76352.0000
Vw          178.6253
Open        178.6400
Close       178.6400
High        178.6700
Low         178.5600
N           644.0000
Name: 2020-05-15 11:03:00-05:00, dtype: float64

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4