Suggest you to read through our module on taxation while trading on varsity. If you make gains during the last quarter, there is no way for you to predict that during the earlier quarters. So it is okay, you don't need to pay advance tax, make sure to speak to a CA.
Here is some bit of advance tax from the above link
5.7 – Advance tax – business income
Paying advance tax is important when you have a business income. Like we discussed in the previous chapter, advance tax has to be paid every year – 30% by 15th Sep, 60% by 15th Dec, and 100% by 15th March. I guess the question that will arise is % of what?
The % of the annual tax that you are likely to pay, yes! When you have a business income you have to pay most of your taxes before the year ends on March 31st. The issue with trading as a business is that you might have a great year until September, but you can’t extrapolate this to say that you will continue to earn at the same rate until the end of the financial year. It could be more or less.
But everything said and done, you are required to pay that advance tax, otherwise the penalty is 12% annualized for the time period it was not paid for. The best way to pay advance tax is by paying tax for that particular time period, so Sept 15th pay for what was earned until then, and by March 15th close to the year end, you can make all balance payments as you would have a fair idea on how you will close the year. You can claim a tax refund if you end up paying more advance tax than what was required to pay for the financial year. Tax refunds are processed in quick time by IT department.