Currency Conversion Feature - Calculation is incorrect  [SOLVED]

Questions about MultiCharts and user contributed studies.
zammo
Posts: 14
Joined: 28 May 2014
Has thanked: 3 times
Been thanked: 1 time

Currency Conversion Feature - Calculation is incorrect

Postby zammo » 03 Jul 2014

Hi all,

Had a couple of lengthy chats with Multicharts support about this but noone can seem to understand that there is a problem.

The new feature to convert to any currency is something I have been looking forward to, unfortunately when I looked at the conversion on trades I could see that the revaluation was incorrect.

I trade a lot of FX and I understand that the majority of users dont, so my examples are with FX pairs for now...

Hopefully someone can confirm what I am saying so we can get this issue fixed and working!

Attached are some example trades I sent to multicharts. I setup this as an example on the EUR/USD currency pair with a conversion back to GBP

If you look at the circled trades....

When is a $8.4 profit ever going to be a £58.17 gbp loss?

A $88.20 loss is only a £4.98 loss?

And a $75.30 loss is now a £165.02 WINNER?????

Henry from support sent me an excel file of how they do their calculations and they are revaling the entry and exit part of the trade at different conversion rates which is totally wrong.

You only have to reval after the trade is completed. Or if you want to reval every day, you need to reinstate it straight after the reval...

Can someone please confirm that these figures are wrong to multicharts please as I was told these values are correct and are due to currency fluctuations in the GBP/USD currency pair!

Thanks all

Zammo
Attachments
converterrors.jpg
(140.28 KiB) Downloaded 3294 times

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Currency Conversion Feature - Calculation is incorrect

Postby Henry MultiСharts » 03 Jul 2014

Henry from support sent me an excel file of how they do their calculations and they are revaling the entry and exit part of the trade at different conversion rates which is totally wrong.
Hello Zammo,

Why do you consider it to be wrong? Please explain your opinion. I have not received any explanation from you neither in the live chat nor in the emails.

zammo
Posts: 14
Joined: 28 May 2014
Has thanked: 3 times
Been thanked: 1 time

Re: Currency Conversion Feature - Calculation is incorrect

Postby zammo » 03 Jul 2014

Hi Henry....

Funnily enough I just called to see if I could talk to yourself but they said you were busy.

How can a $75.30 loss ever be shown as a £165.02 profit?

It really troubles me that you guys can believe the calculation you are using to get that figure is correct.

In the last 10 years with gbp/usd movement a $75 loss in a trade would have fluctuated between £35 and £55 at cables highest and lowest points.

On the spreadsheet you showed me with these calculations you are doing the reval twice... it only really needs to be done once on exit of the trade at the current cross rate. If you want to reval every day, you would need to reinstate the trade straight after the reval (which doesnt make sense in this case)

Effectively as ive said before you are not trading EUR/USD at all you are trading GBPUSD on the close rate each day... you have completely taken the actual trade out of the equation.

The best example I can give to you is this...

If you use the calculator you sent me to do this....

Buy 100 contracts of EUR/USD at 1.36

next day...

Sell 100 contracts of EUR/USD at 1.36

Surely we can all agree that this is a "scratched trade" and you will have a 0 balance EVERY TIME.

your sheet will show a profit or loss if GBP/USD has moved between entry and exit.

How can that be?

Thanks

Zammo

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Currency Conversion Feature - Calculation is incorrect

Postby Henry MultiСharts » 03 Jul 2014

Hello Zammo,

The option is called Base currency and it implies that when you enable it – you tell the system that the selected currency is like your account currency. So your money are in GBP. You want to buy EUR/USD which requires USD. But you have GBP, so you need to convert your GBP into USD to do the purchase. Once you have GBP converted to USD you purchase EURUSD.
When you sell EURUSD you get some USD. But your base currency is GBP. So you convert them back to GBP and now you see your profit or loss.
This is why there are two conversions.

zammo
Posts: 14
Joined: 28 May 2014
Has thanked: 3 times
Been thanked: 1 time

Re: Currency Conversion Feature - Calculation is incorrect

Postby zammo » 03 Jul 2014

Isn't the point of this feature so that we can see our p&l in a currency of our choosing instead of the default of the instrument?

If I buy ES today at 1900 and sell it next week at 1900 I have made 0? Do you agree to this?

It doesnt matter where I am in the world or what my home currency is.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Currency Conversion Feature - Calculation is incorrect

Postby Henry MultiСharts » 03 Jul 2014

Isn't the point of this feature so that we can see our p&l in a currency of our choosing instead of the default of the instrument?
You can see your current PnL (on a chart, in a DOM window, in Order and Position tracker window) in preferred currency by selecting the desired currency in MultiCharts->File->Preferences->Trading->Preferred currency dropdown menu.
If I buy ES today at 1900 and sell it next week at 1900 I have made 0? Do you agree to this? It doesnt matter where I am in the world or what my home currency is.
That is not correct. It depends on your base currency.

zammo
Posts: 14
Joined: 28 May 2014
Has thanked: 3 times
Been thanked: 1 time

Re: Currency Conversion Feature - Calculation is incorrect

Postby zammo » 03 Jul 2014

You can see your current PnL (on a chart, in a DOM window, in Order and Position tracker window) in preferred currency by selecting the desired currency in MultiCharts->File->Preferences->Trading->Preferred currency dropdown menu.
I didnt mean for live trading, purely for backtesting purposes / single or portfolio
That is not correct. It depends on your base currency.
If im trading the ES on CME I am trading in $ from trade entry to close, any other currency doesnt need to come in to it until after the trade is exited? I dont need to actually physically convert my £ to $ to open the trade!
Hello Zammo,

The option is called Base currency and it implies that when you enable it – you tell the system that the selected currency is like your account currency. So your money are in GBP. You want to buy EUR/USD which requires USD. But you have GBP, so you need to convert your GBP into USD to do the purchase. Once you have GBP converted to USD you purchase EURUSD.
When you sell EURUSD you get some USD. But your base currency is GBP. So you convert them back to GBP and now you see your profit or loss.
This is why there are two conversions.
In this example you have actually bought EUR/GBP not EURUSD


+$
-$
+E

Is net -£ +E

I am not holding nor have I had a EUR/USD position at all!

Im really hoping some other multicharts users can weigh in here.......

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Currency Conversion Feature - Calculation is incorrect

Postby JoshM » 04 Jul 2014

When is a $8.4 profit ever going to be a £58.17 gbp loss?
This is how I understand the currency conversions in MultiCharts (if I've made a calculation mistake besides rounding differences, let me know):

From profit..

At point A you sold 30.000 units of EUR/USD at 1.37947, which gave a position of -$ 41.384.

At point B you bought back the EUR/USD at 1.37919 for $41.375.

The profit that this netted was $41.384 - $41.375 = 9 USD.

..to loss

To be able to sell $ 41.384 at point A, the pounds in your account need to be converted to USD.

With an GBP/USD rate of 1.7141, going short in EUR/USD (see point A) requires 24.143 GBP ($ 41.384 / 1.7141).

At point B the position is closed, giving us USD that again need to be converted to GBP (this is the second conversion Henry mentions).


Here's the catch: let's say the GBP/USD has moved from 1.7141 (point A) to 1.7098 (point B) during the time the EUR/USD trade was open. What's the profit of this trade?

At point B, we get 41.375 USD which is now worth 24.198 GBP ($ 41.375 / 1.7098).

The profit is now: 24.143 GBP (point A) - 24.198 GBP (point B) = a loss of GBP 55.

To summarise
If you book a profit in EUR/USD, but the GBP/USD rate moves against you (43 pips in this example), the profit will turn into a loss due to the currency conversions at the opening and closing of the trade.
Last edited by JoshM on 07 Jul 2014, edited 1 time in total.

AlphaCat
Posts: 69
Joined: 09 Jul 2013
Been thanked: 9 times

Re: Currency Conversion Feature - Calculation is incorrect

Postby AlphaCat » 05 Jul 2014

"To be able to sell $ 41.384 at point A, the pounds in your account need to be converted to USD."

Not really - you typically trade on margin, so you can sell USD on your brokers credit and margin is deducted from your GBP account. When the trade is closed, the margin is freed up. The margin is not converted to another currency. The only thing that needs to happen is to convert the PnL to GBP. (IB does it a bit differrently tho for spot fx than most others)

Same thing for futures, i.e. if you trade european futures with a GBP account. You need only convert the PnL.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Currency Conversion Feature - Calculation is incorrect

Postby JoshM » 06 Jul 2014

Not really - you typically trade on margin, so you can sell USD on your brokers credit and margin is deducted from your GBP account. When the trade is closed, the margin is freed up. The margin is not converted to another currency. The only thing that needs to happen is to convert the PnL to GBP. (IB does it a bit differrently tho for spot fx than most others)

Same thing for futures, i.e. if you trade european futures with a GBP account. You need only convert the PnL.
Good point AlphaCat, and that's of course true. I didn't take margin into consideration in the example because Henry's comment did not use margin. And, looking at Zammo's screenshot, it seems that he/she has not specified the margin in the QuoteManager settings: otherwise, I would not know how a 8 USD profit can become a 58 GBP loss when margin is used.

Zammo, could you perhaps provide your QuoteManager settings for EUR/USD to clear this up?

zammo
Posts: 14
Joined: 28 May 2014
Has thanked: 3 times
Been thanked: 1 time

Re: Currency Conversion Feature - Calculation is incorrect

Postby zammo » 06 Jul 2014

Hi guys,

Alphacat has it right....

Im a little shocked at how people cannot see this was wrong, when a profit becomes a huge loss or a scratched trade is a huge loss because my home currency happens to be different to the instruments?

This is nothing to do with margin settings, it is just the total wrong way to show us our P&L in a different currency. When the trade is closed, then convert the p&l in to the base currency at the current rate or close rate. Easy

Think of ANY instrument that is tradable to you that is NOT in your home currency, if you buy it at a rate today and sell it out at the same rate tomorrow do you expect to see this as a huge loss in your trading account?

Its also like saying, "I want to sell amazon today" but I have to buy it in order to do so.....

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Currency Conversion Feature - Calculation is incorrect

Postby JoshM » 07 Jul 2014

Im a little shocked at how people cannot see this was wrong, when a profit becomes a huge loss or a scratched trade is a huge loss because my home currency happens to be different to the instruments?
Then you're shocked easily, perhaps too shocked to notice that there are two subjects discussed in this thread: how MultiCharts calculates currency conversions and how it should be done.

I think that understanding the first makes a convincing case for the second easier, hence my suggestion to change QuoteManager settings and see how this impacts the calculations. But I suspect that repeating how 'totally wrong' it is and not seeking first to understand will also convince MultiCharts employees/engineers.

Alternatively you can add references as a means of convincing and being more constructive. I'll start:

OANDA: IB: Alpari:

zammo
Posts: 14
Joined: 28 May 2014
Has thanked: 3 times
Been thanked: 1 time

Re: Currency Conversion Feature - Calculation is incorrect

Postby zammo » 07 Jul 2014

Then you're shocked easily, perhaps too shocked to notice that there are two subjects discussed in this thread: how MultiCharts calculates currency conversions and how it should be done....

I think that understanding the first makes a convincing case for the second easier, hence my suggestion to change QuoteManager settings and see how this impacts the calculations. But I suspect that repeating how 'totally wrong' it is and not seeking first to understand will also convince MultiCharts employees/engineers.
Josh, I apologise if you think I have not been constructive, I am a little frustrated because I have had a couple of live chats, emails and phone calls with multicharts and they don't seem at all open to the idea that they are wrong. I keep getting asked where their calculation is wrong and just provided proof that the math behind their formula is correct. So yes I have felt that I have been banging my head against the wall...

I have not repeatedly just said 'its wrong' in a deal with it kind of way. I have posted real and hypothetical examples where the calculation would produce extreme incorrect results. I cannot think of a simpler explanation than the scratched trade examples? And yes I am a little shocked when after I've given this example I am still being told that everything is fine?

In the original live chat I was being told a 9000 yen profit that equated to a £1000 loss was correct.

Henry:
there is nothing wrong
Henry:
the calculation is correct
Tommy:
yes your calculation is correct....
Tommy:
but its not correct for fx....
Henry:
you cannot just convert the profit or loss you got after closing the position
Henry:
you need to convert both entry and exit
Tommy:
u cant turn a 9000 yen profit in to £1000 sterling loss


The calculation multicharts are using would be for actually physically moving money around from account to account. Another example I posted was that you do not have to buy amazon to sell amazon... yet this is fundamentally what we are being told.

Based on the current calculation formula, all I am ever doing trading any $ based asset is actually physically trading the GBP/USD exchange rate with the amounts converted.

In post 8 you do a good breakdown of how multicharts is handling the conversion. But if you net everything out here the 'trade' you are doing here is going Long approx 24k GBP/USD at 1.7141 and exiting at 1.7098.

Of course once a trade is exited then the USD P&L is open to exchange rate risk. But not the kind of fluctuations that have been given. Even if GBP/USD is at 1.71 and falls 10 big figs down to 1.61... my 9 USD profit is only going to fluctuate between £5.26 and £5.59 in GBP. In the mentioned example it only falls 43 pips not 1000 and becomes a loss 6x the usd amount!

I hope the links you posted will help address the issue.

IB quotes "Also note that once you close out a security position which is denominated in a given currency, the proceeds will remain in that currency regardless of whether it is the Base Currency you've selected for your account. Accordingly, such proceeds will be subject to exchange rate risk relative to your Base Currency until such time you either perform a currency conversion or use those proceeds for another similarly denominated product"

Alpari states:

If your Alpari UK account is in the same currency as the quote currency, any profit or loss made does not need to be converted. If not however, your profit or loss will be converted into your account currency at the spot rate at the time the position is closed.


Hopefully this helps the engineers realise the conversion should be done WHEN/AFTER the trade is closed...

If this is difficult to do for the programmers and they definately need two sides to the conversion, can they just use the conversion rate taken at time of entry and duplicate that at exit? Although not the correct way, it will be hugely more accurate than it is now. - maybe just a quick fix until they can change the format?

I do think this issue is actually extremely serious as I have had portfolio tests come out extremely favourable in the results due to this incorrect conversion when the actual system if traded would be garbage and would have lost money. I have seen another post on the forum showing a profit on a portfolio live trade and simultaneously a loss at the broker(open positions window)....I wonder if this is the same issue?

I know people should always do due diligence before putting money on the line but the fact is there is a potential here for users to come out the wrong side of this.

Im hoping this can be fixed for the next release as when working it will be a fantastic feature for those of us that do portfolio testing on different currency based assets.

I just need to convince multicharts that a problem exists!

Cheers

meo
Posts: 26
Joined: 23 Apr 2012
Has thanked: 3 times
Been thanked: 1 time

Re: Currency Conversion Feature - Calculation is incorrect

Postby meo » 07 Jul 2014

Hi Zammo, I agree with your explanation. I got the exact same problem with the calculation of PnL when backtesting on FX pairs...

zammo
Posts: 14
Joined: 28 May 2014
Has thanked: 3 times
Been thanked: 1 time

Re: Currency Conversion Feature - Calculation is incorrect

Postby zammo » 08 Jul 2014

Multicharts, can you relook at this problem please?

Thank you

meo
Posts: 26
Joined: 23 Apr 2012
Has thanked: 3 times
Been thanked: 1 time

Re: Currency Conversion Feature - Calculation is incorrect

Postby meo » 08 Jul 2014

Here is my current workaround: 1) set the portfolio currency to none. 2) created a new exchange, add another set of FX pairs and re imported the data. I set the name with a suffix and its no longer detected as a currency pair. For JPY pair, you can change the BigPointValue.

Not accurate backtesting but at least the results are not messed up.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Currency Conversion Feature - Calculation is incorrect

Postby Henry MultiСharts » 08 Jul 2014

We are currently analyzing this behavior.

zammo
Posts: 14
Joined: 28 May 2014
Has thanked: 3 times
Been thanked: 1 time

Re: Currency Conversion Feature - Calculation is incorrect

Postby zammo » 08 Jul 2014

Here is my current workaround: 1) set the portfolio currency to none. 2) created a new exchange, add another set of FX pairs and re imported the data. I set the name with a suffix and its no longer detected as a currency pair. For JPY pair, you can change the BigPointValue.

Not accurate backtesting but at least the results are not messed up.
Yes from what I have read this is how users have had to convert fx in the past, far from ideal and the whole point of this new feature was to get this problem right. Hopefully this can be fixed promptly before someone starts trading a system they think is profitable with disastrous results....

zammo
Posts: 14
Joined: 28 May 2014
Has thanked: 3 times
Been thanked: 1 time

Re: Currency Conversion Feature - Calculation is incorrect

Postby zammo » 21 Jul 2014

MC- Have we made any progress please?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Currency Conversion Feature - Calculation is incorrect

Postby Henry MultiСharts » 23 Jul 2014

MC- Have we made any progress please?
Yes, we continue running some tests. We will get back to you with the results shortly.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Currency Conversion Feature - Calculation is incorrect

Postby JoshM » 27 Jul 2014

MultiCharts Support, do the following quotes apply to backtesting?
Hi,

in the new feature description, it is mention the following about currency conversion:

"To make the results as close to perfection as possible, we use actual currency rates for each day."

Does that mean that you are using only one rate per trading day? If so, this feature cannot be use to backtest intraday strategies..
Only one rate per day is used for currency conversion.
Source.

But the original feature request asked for:
(...) after the close of each trade, calculate the result to the base currency of the user using the exchange rate of that moment.
Source.

If only one historical fx price per day is used in backtesting, the requested accurate backtest results are not achieved and I would have to argue that feature request #349 is not implemented.

User avatar
furytrader
Posts: 354
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 155 times
Been thanked: 217 times

Re: Currency Conversion Feature - Calculation is incorrect

Postby furytrader » 28 Jul 2014

I don't think it's fair to say that it's useless for backtesting purposes to use a single FX rate for daily p/l conversions. You're not converting your foreign p/l back to your domestic p/l immediately after every trade, are you? Be honest - the total impact that a change in the conversion FX rate is going to have on your NET p/l is minimal - most likely less than 1% of your net p/l.

So, if after a year of trading, you're up 50% (congratulations), you're likely to be off, what, by 1/2 of 1%? Also, you'd have to take into account that in some instances, the use of a single daily FX rate is going to understate your p/l and in other instances, it's going to overstate your p/l (again perhaps by 1% of the net p/l), so it could very well be a wash.

In any event, if the viability of your trading strategy can be undermined by 1% of your P/L being off, you need a new strategy.

zammo
Posts: 14
Joined: 28 May 2014
Has thanked: 3 times
Been thanked: 1 time

Re: Currency Conversion Feature - Calculation is incorrect

Postby zammo » 28 Jul 2014

Yes the intraday calculations that JoshM has brought attention to would not be 100% accurate but they would be extremely close and pretty accurate for testing purposes, as furytrader points out it shouldnt be an issue and a reval each day is more than sufficient.

ANYTHING would be better than what we have now...

I have just been caught out by doing a test on EURAUD, normally I dont set the currency to anything (none) but I changed the instrument from a USD based pair and the currency was still selected to USD without me knowing....

Please see attached screenshot (niceequityline) for an example of how awful and downright dangerous this is right now.....

This is not in the Portfolio backtester, this is a one instrument backtest in the multicharts main software....

Looks great right?

Reality is a horrific curve and a 50% loss of funds (based on my amounts but thats not the point) - Please see second attachment.

Multicharts - Someone WILL lose money after having seen false information the software is reporting.I think this is a critical fix that you need to address immediately...
Attachments
realitycurve.png
(102.26 KiB) Downloaded 3237 times
niceequityline.png
(127 KiB) Downloaded 3222 times

User avatar
furytrader
Posts: 354
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 155 times
Been thanked: 217 times

Re: Currency Conversion Feature - Calculation is incorrect

Postby furytrader » 28 Jul 2014

I agree that, in the case of futures and FX forwards, the FX conversion will only apply to the net p/l. For equities, I'm thinking that you actually need to do the entry and exit conversions (not just the net p/l), because you actually do have to convert your $ to Euros or Euros to Swiss Francs in order to enter the trade.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Currency Conversion Feature - Calculation is incorrect

Postby JoshM » 03 Aug 2014

MC- Have we made any progress please?
Yes, we continue running some tests. We will get back to you with the results shortly.
Just wondering if there is an update on this.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Currency Conversion Feature - Calculation is incorrect

Postby Henry MultiСharts » 04 Aug 2014

Thank you for all your feedback. We have decided to change the calculation algorithms to have a single conversion. The updated logic will become available in MultiCharts 9.0 beta 3. At the moment we are working on it and cannot give any ETA.

zammo
Posts: 14
Joined: 28 May 2014
Has thanked: 3 times
Been thanked: 1 time

Re: Currency Conversion Feature - Calculation is incorrect

Postby zammo » 04 Aug 2014

Thank you!

User avatar
swz168
Posts: 120
Joined: 30 Sep 2010
Location: Germany
Has thanked: 47 times
Been thanked: 32 times

Re: Currency Conversion Feature - Calculation is incorrect

Postby swz168 » 04 Aug 2014

Don't forget to describe the new logic in the wiki. Thanks!

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Currency Conversion Feature - Calculation is incorrect  [SOLVED]

Postby Henry MultiСharts » 26 Aug 2014

We have reworked the Currency Conversion algorithms in MultiCharts 9.0 Beta 3. You can download the version here. We hope that now it suits the needs of the majority of our customers. Please feel free to share your feedback in this thread.

StefanoSF
Posts: 116
Joined: 19 Aug 2012
Location: San Francisco
Has thanked: 23 times
Been thanked: 30 times
Contact:

Re: Currency Conversion Feature - Calculation is incorrect

Postby StefanoSF » 01 Oct 2014

To save someone the trouble of going through numerous restarts, here are the correct setting for EURUSD in USD Currency. Note that Big Point Value is 1 not 10 as you may have thought.

Image

Keywords: Big Point Value, Fx, Forex, Price Scale
Attachments
BPV-fx.png
(5.92 KiB) Downloaded 3566 times


Return to “MultiCharts”