Welcome to the BEST forum for traders

Did you know we're sharing tons of exclusive content here?
Our community is growing quickly. Take a look around and say "Hello".

Unkown error

Jun 3, 2023 - 7:04 PM

Viewed 408 times

https://best-trading-indicator.com/community/bti/forums/3871/topics/1765039 COPY
  • 1

    0
  • 1

    0
  • 1

    0
  • 1

    0
  • 1

    0
  • 1

    0
  • 1

    0
  • 1

    0
  • 1

    0
  • 1

    0
  • 1

    0
  • 1

    0
  • 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!

    0
CONTENTS