I have problems using “positionprice” when i want to use it directly after i opened a position. It then still is zero though a position was opened. So i wonder when it is updated?
Positionprice is updated each time you launch an order on the market, so you’ll be able to get the open price of the current order if you correctly use the keyword 🙂
Take a look at the documentation on the website, maybe it could help you.
Then is maybe what causes the problem that if i launch a market order it will be executed on the following bar so i will get the positionprice 1 bar later, or is it 2 bars later (so that the bar the order was executed on is finished)?
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.