backtesting forex pair USDJPY

Questions about MultiCharts and user contributed studies.
tozwp
Posts: 145
Joined: 15 Apr 2011
Has thanked: 16 times
Been thanked: 8 times

backtesting forex pair USDJPY

Postby tozwp » 09 Apr 2014

New to forex and working on a system and have run into a problem that I don't understand. Backtesting doesn't calculate the results properly. Here's an example. USDJPY trading at 93.536, risking $1000 USD, entry minus stop price is 0.26 USDJPY, size is 359754. This trade is stopped out and the strategy report shows a loss of $93536 but should be $1000. Is there a property or a setting that I do not have set correctly? Thanks

gpw797
Posts: 216
Joined: 04 Mar 2006
Has thanked: 3 times
Been thanked: 7 times

Re: backtesting forex pair USDJPY

Postby gpw797 » 09 Apr 2014

Would probably need to see it but you are probably looking at yen not $.... MC is a bit awkward when backtesting forex pairs. It doesn't convert everything to your base currency like it should

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: backtesting forex pair USDJPY

Postby Andrew MultiCharts » 10 Apr 2014

Hello tozwp,

Please upload 3 screenshots:
  • The trade values from the report
  • Right-click on the chart you backtest -> Format Signals -> Properties -> Properties tab
  • Right-click on the forex pair in QuoteManager -> Edit symbol... -> Settings tab

tozwp
Posts: 145
Joined: 15 Apr 2011
Has thanked: 16 times
Been thanked: 8 times

Re: backtesting forex pair USDJPY

Postby tozwp » 10 Apr 2014

Hi Andrew, here are the screenshots requested:
Attachments
Properties.JPG
(62.78 KiB) Downloaded 1002 times

tozwp
Posts: 145
Joined: 15 Apr 2011
Has thanked: 16 times
Been thanked: 8 times

Re: backtesting forex pair USDJPY

Postby tozwp » 10 Apr 2014

Symbol settings:
Attachments
SymbolSettings.JPG
(43.24 KiB) Downloaded 992 times

tozwp
Posts: 145
Joined: 15 Apr 2011
Has thanked: 16 times
Been thanked: 8 times

Re: backtesting forex pair USDJPY

Postby tozwp » 10 Apr 2014

Trade values
Attachments
TradeValues.JPG
(94.5 KiB) Downloaded 990 times

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: backtesting forex pair USDJPY

Postby Andrew MultiCharts » 10 Apr 2014

Hello tozwp,

Everything is calculated correctly according to your screenshots:
Profit (in the second currency of the symbol) = (entry price - exit price) x number of contracts (specified by your code) x big point value (from QuoteManager settings)
¥ Profit = (104.728 - 105.023) x 355397 x 1 = -104842.11

tozwp
Posts: 145
Joined: 15 Apr 2011
Has thanked: 16 times
Been thanked: 8 times

Re: backtesting forex pair USDJPY

Postby tozwp » 10 Apr 2014

Thanks Andrew. If I understand this correctly, to backtest in MC I will need to divide by 100K which is the size of the contract. For trading though, I need to leave this as is because the trade size with the broker (IB) is in units, not contracts.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: backtesting forex pair USDJPY

Postby Andrew MultiCharts » 10 Apr 2014

If you mean you want to see lots in backtesting but still trade with IB - yes.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: backtesting forex pair USDJPY

Postby Andrew MultiCharts » 11 Apr 2014

As far as I can see it is showing $ sign which is wrong.
It always shows the $ sign, no matter what is the currency of the symbol. Simply ignore it and keep in mind the second currency of a forex pair is used in profit/loss values.

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

Re: backtesting forex pair USDJPY

Postby JoshM » 13 Apr 2014

But my currency is not Yen, GBP, CAD, . What if I would trade USDJPY, EURGBP, AUDCAD and my base currency was USD? So P/L should be converted to USD. Simply ignoring it is not a solution.
This probably will be implemented in MC 9.0 Beta 1.

See PM request MC-349 - Add realistic multi-currency support to Portfolio Backtesting.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: backtesting forex pair USDJPY

Postby Andrew MultiCharts » 14 Apr 2014

But my currency is not Yen, GBP, CAD, . What if I would trade USDJPY, EURGBP, AUDCAD and my base currency was USD? So P/L should be converted to USD. Simply ignoring it is not a solution.
JoshM is right, at the moment the only workaround is to change Big Point Value for a forex pair in QuoteManager in order to emulate currency conversion. Big Point Value in this case acts like a multiplier. In future version we will introduce some improvements in regards to this case.


Return to “MultiCharts”