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)?
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue