Hey guys, hope everyone is doing fine. I'm new to pinescript coding and I'm having a fairly simple (I guess) issue that manages to mess up my day entirely.... In my code I have the following lines:
// Calculate entry price for long position
entryPriceLong = strategy.position_avg_price(Long Entry
)
// Calculate entry price for short position
entryPriceShort = strategy.position_avg_price(Short Entry
)
However, this error message is prompted:
Could not find function or function reference 'strategy.position_avg_price'
Thanks for anybody that finds the time and manages to save my day!