Hello all,
Was wondering if someone can help me with this little problem, I'm trying to convert the difference between two prices into a currency value (currency of the account). So first you calculate the pips, and then convert the pips to a dollar value. I have tried the code below but it does not seem to work:
pipvalue = instrument.getPipValue();
pipscale = instrument.getPipScale();
CurrencyValue = ((price1 - price2)/pipscale)*pipvalue *UseLots;
UseLots is the lots that is specified to trade with and price1 and price 2 the different instrument values.
Any help will be appreciated!