First, read about Round Lot Size here: https://www.amibroker.com/guide/h_backtest.html
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.