Deduction of brockrage,sebi fees , stamp duty in share purchase and sell

i have bought shares for which i have paid brockrage ,sebi fees , stamp duty , stt etc . i have also sold some shares for which again i paid brockrage,sebi fees , stamp duty , stt .
in my filing of income tax in capital gain section can i deduct the brockrage, sebi fees , stamp duty as expenses on share bought and sold(some share) or only those fees could by deducted in which i have capital gains ie by selling only

A post was merged into an existing topic: Expenses deductible when calculating capital gains