I want to access my portfolio through the code such that, I can use my last buy quantity, value etc for taking decisions on averaging out etc.
For example,
If my portfolio is having ONGC 25QTY @ 360/share, I want to write an algorithm when the ONGC price goes below 5% of my Portfolio price of 360 and recommend a buy to average out the value.
I hope my question is clear.