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?
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?
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)