Thanks for the reply Petra.

The Lots variable is indeed an integer.

I agree with your LotAmount example. The only problem is that Oanda recognizes the 5 Lots as 5.0 Amount or 50 x 0.1, which is 10 times more than desired with LotAmount set as 0.1 in the AssetList table as provided in my initial Post above. Editing the AssetList does not matter as any integer value sent as Lots will be 10 times the expected amount. As it currently stands, I have to divide the Lots calculated by Zorro before the order is sent to Oanda by 10 and manage any resulting decimals by rounding up or down while using the suggested code by Grant above to distinguish when in TRADEMODE and TESTMODE for the Risk and Profit calculations to be correct. There will always be a discrepancy between the trade sizes calculated in Train /Test mode versus Trade mode unless I round the calculated amounts in Test/Train mode up to the next highest decimal place to match the behavior of what would happen in Trade mode. As you stated, using different lots in test and trade mode "is a recipe for disaster" but I understand where the issues are and have made accommodations for them.

The better option is to live with the fact that I cannot take advantage of the smaller sizes offered by Oanda and adjust the LotAmount in the AssetList table to 1 rather than 0.1 in order for the Profit and Risk calculations done by Zorro to be consistent in TRADEMODE and TESTMODE, which would match Oanda's calculations. This option would, unfortunately, require a much larger account to trade a diversified portfolio of assets to include most of the CFD Indices since the position sizes would be larger requiring more margin. I would also need to use the SET_PATCH brokerCommand to use my AssetList which should override what Oanda provides as the asset parameters.

The best option would be to edit the Oanda API to accommodate how the Oanda v20 API handles the reduced minimum CFD trade size to one decimal place they implemented earlier this year as this is a global change, not a country change, given one user from Italy had the same experience as mentioned by the user in a previous post.

Please let me know if this make sense and what can be done, if anything, to be able to accommodate the smaller CFD Index minimums offered by Oanda. Thanks.