So basically, I'm new to Quantopian and Python. I used to code on TD Ameritrade's ThinkScript platform and I need your help in creating a code that helps me to calculate the percentage change of my OPEN positions!
On ThinkScript it was as simple as this :
def percentChg = 100 * (open - EntryPrice()) / EntryPrice();
'open' denotes the market price of the security, and 'EntryPrice()' indicates the entry price of my open position. e.g. I entered aapl at $85.05 (entry price), and its trading at $87 (open).
Would appreciate your help in helping me find out how to retrieve the current market price of a security & how to denote the Entry price on quantopian.