Im writing a function to calculate my lot size based on risk and sl, pretty standard stuff so far.
Now where I am struggling is my account is a GBP spread betting account on Oanda convert everything to USD, so my question is how to I get to the price of 1 lot for my account.
So far I know Oanda convert my trades into dollars and back when placing trades and because its spread betting it is always USD but Im struggling to find how to convert to GBP for my function.
Their calculator here demonstrates
If I do the conversion manually based on the USDGBP fx ratio I get pretty close but its for a robot so should be a bit smarter than that.