Skip to content

Why was my order filled significantly higher than the high of the bar? #153

@tankorsmash

Description

@tankorsmash

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

image

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

image

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
  • Backtesting version: 0.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionNot a bug, but a FAQ entry

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions