Help on Commission


I am having trouble getting the commissions aspect. Here’s my scenario. I am trading only one symbol.

I have set these at the Symbol Information page
Round Lot size = 40 ( Its future contract size is 40)
MarginDeposit = -10 ( requires 10% of the capital)
Point Value = 1

For any given trade, the commissions are charged at 220 per contract ( 40 lot size ) for both the buy and sell.

Which mode should I be setting this for this scenario?

On using the $ per trade to 220, my backtest yields positive results.
However, on choosing $ per share/contract to 220, the back test results are horrible. account is exhausted within the first few trades.

What is the right setting for this scenario?
Also, is there a way to see the commissions for each trade in the trade list?

Thanks for all the previous help and this one too :slight_smile:


A mistake while posting. I set it to 110. Not 220.

Also, I wanted to trade a fixed number of contracts all the time. I used the code below

NumContracts = 7;
PositionSize = NumContracts * MarginDeposit;

However it doesnt seem to work. Is it because the MarginDeposit is set to -10


the above setup is definitely wrong. Margin Deposit needs to be positive. ticksize is specified by the exchange, point value also.

What contract are you trading?

For the NQ it looks like this:


In addition, AB can only use commissions in base currency, maybe you could change it but it’d be really troublesome. If you are trading a proper trend-following logic with a global portfolio and many currencies, this will be a problem. Yours is one contract only, hence it’s fine and my comment only FYI.


@satishvasu: The easiest way to set your position size would be to simply do this:

NumContracts = 7;
SetPositionSize(NumContracts, spsShares);

The way you have set the Margin Deposit should allow AmiBroker to correctly handle your cash balance. @Dionysos, the AB documentation does describe using both positive and negative values for MarginDeposit.

Regarding commissions, when you enter a trade for 7 contracts, how much do you pay in TOTAL commissions? If you pay a total of $110, then you should be using per trade commissions. If you pay 7 x $110 = $770, then you should be using per share commissions. AmiBroker will assume that you pay the commission amount both on the entry and again on the exit of the trade.


It’s new to me. Where did you find this exactly? Are you sure we’re talking about MarginDeposit as opposed to PositionSize?


@Dionysos this is news to me, from



thanks for the update. I must say i have generously read over it many times without noticing.



Thanks @mradtke. I could use the logic you gave and proceed. It is 110 per contract. So multiplied the number of contracts * 110.

However, the NumContracts = 7 doesn’t work. instead I have to set it to the RoundLotsize * NumofContracts. In this case 7*40 = 280.
So I do a SetPositionSize of 280 instead of 7.

Is that the way its supposed to work?


First, read about Round Lot Size here:

RoundLotSize=0 is a special case that tells AmiBroker to allow position sizes with a fractional number of shares/contracts.

For all positive values of RoundLotSize, the actual position size will be a multiple of the RoundLotSize value. In your example, if RoundLotSize = 40, then your position size must be 40, 80, 120… contracts. AmiBroker will always round DOWN to the nearest multiple of RoundLotSize. For example, assuming RoundLotSize = 40 then if you call


Then AB will round down to 0 and you will not enter the position. If you call


Then AB will round down to 40.

I am not aware of any instance in which you should multiply your desired number of contracts by the RoundLotSize.