Answer your question Brokerage will deduct the purchase before pay
-in case the sell amount is more than the buy amount that brokerage will pay profit to customer
-in case the sell amount is less than the buy amount that customer must pay the difference amount
And brokerage may be charge for XX% and reduced credit line as punishment.