Reputation: 1175
In Pine, if I made some strategy.order
on a previous bar, with id "order ID"
, is there a function to retreive the entry price of that order on a later bar?
Upvotes: 2
Views: 896
Reputation: 21294
You can use strategy.closedtrades.entry_price
or strategy.opentrades.entry_price
.
// Return the entry price for the latest entry.
entryPrice = strategy.closedtrades.entry_price(strategy.closedtrades - 1)
Upvotes: 2