According to ChatGPT, your formula is incorrect. The Trading Fee=Entry Price×Quantity×Entry Fee. Leverage does not directly affect the trading fee. The fee is calculated by the Notional Value=Entry Price×Quantity (not the margin used).