All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
The stock trader invests their money by buying and selling stocks to make a profit according to what they deem appropriate. The brokerage company managing the trading operations charges its commission for each buy and sell transaction. Sometimes, the stockholder keeps the stocks to collect their annual profits distributed by the company's management, leaving them in their portfolio for years.
When the value of stocks declines, the owner may incur losses, leading them to suspend trading for a year or more until the stock's value rises again. This is considered an attempt to protect the capital from losses, and as a result, no trading operations occur on the account, rendering it inactive.
In the case of dormant account, a certain amount of money is imposed on the account by the brokerage firm. However, imposing fines on dormant accounts is considered wrongful consumption of people's money. This is since Allah The Almighty Says (What means): "O ye who believe! Eat not up your property among yourselves in vanities: But let there be amongst you Traffic and trade by mutual good-will" [An-Nisa`, 29]. Moreover, because the brokerage firm does not incur any costs or burdens due to freezing the account, except that it loses the commission it would have earned, it compensates for that by imposing the fine.
In conclusion, it is prohibited for the company to impose such conditions, as it constitutes wrongful consumption of people's money. And Allah The Almighty Knows Best.