{quote} Try the attached. I made a small change and ran it on a AUD-denominated demo account. I checked the result and I'm fairly sure that it's correct. The formula is: number_of_lots = amount_at_risk / SLpips / tickvalue, rounded down to the nearest 0.01 lots where tickvalue = 10 / AUDYYY_exchange_rate, for all XXXYYY pairs. e.g. for GBPUSD, current AUDUSD_exchange_rate is 0.67509 hence tickvalue = 10 / 0.67509 = 14.8128 thus for amount_at_risk = $200, and SLpips = 15, number_of_lots = 200 / 15 / 14.8128 = 0.9001, rounded down to 0.90 (see screenshot){image}{file}{file}My...