Where do the entry prices come from? #1079
-
So I am trying to understand backtesting.py by implementing my own version of the SMA strategy from the tutorial, with my own price data. I have loaded my data successfully and now I am trying to apply a simple stop/limit strategy, with stop and limit each set to 5 pips. However, when I look at the data, I see weird entry prices. For example, a trade is opened at Bar 32 at Price 1.371305, but Low/High is 1.37124 – 1.37136, so the EntryPrice is out of the range of that bar. How does that happen? Note that the next bar (where the position is closed) has the range 1.37108 – 1.37124, so it’s still above the EntryPrice. I have seen that commission affects entry prices, so I have set that to 0. The numbers above are with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Nevermind, it was because of some live processing with the data that was going on. I was too tired yesterday. |
Beta Was this translation helpful? Give feedback.
Nevermind, it was because of some live processing with the data that was going on. I was too tired yesterday.