Price Max is very useful feature. However for Investing it returns quantity which if taken in full will result in Debit balance in our account due to applicability of STT, Stamp Duty and other Charges. You need to modify its calculations so as to not leave us with a Debit balance in our accounts.
Please clarify what happens if our account turns into Debit balance after all the expenses related to purchases are debited? Will you liquidate our holdings to meet the shortfall?