You could use Math.Floor to round down to the nearest integer.
I have attached a sample strategy which will calculate 2 percent of your account size, divide that by the currency price, then divide by 1000 and round down to give you how many micro lots to purchase.
If you were applying this to something which doesn't have the quote currency in USD, for example JPYUSD, extra consideration would need to be made to line 80 within the code.
The strategy was written in NT8 thus will not work in NT7, however demonstrates the logic for how you would calculate what you're looking for.
Please let us know if you need further assistance.
Comment