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?

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.

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.

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.

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

SetPositionSize(7,spsShares);

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

SetPositionSize(47,spsShares);

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.