USDJPY backtest result

I am using IQFeed for Fx data and backtesting a strategy on daily USDJPY FX. I have specified the following contract specification for USDJPY as described in the following amibroker for forex link

Round Lot size - 1
Margin Deposit - 2500
Tick Size - 0.01
Point Value - 100000

I've also updated the JPY Preferenes -> Currencies section to include the dynamic rate symbol with inverse multiplier and set my base currency as USD

However, the result I get for a backtest seems to have the profit in JPY rather than USD -
If the Entry price is 114.637 and Exit Price is 111.879, then pnl for 1 contract used would be
= -1100000(111.879-114.637)*(1/111.879) = 2465.16 USD. However, the result above shows profit in JPY and not USD. How can I get it to show profit in USD?

Thank you in advance for the help!

Set "Currency" field to "JPY" in "Information" window (Window -> Information).
To be save click "View - Refresh all" afterwards. Then re-do analysis.


Hi fxshrat, Thank you for the answer and the document. Its very helpful! I was wondering if there is a way to set the periodicity of the backtest in AFL script. The reason I ask is I am trying to run it on 4h bars and although I see a hourly option in backtester settings I cant find one for 4h.

In Tools-Preferences-Intraday you can set custom intervals.

1 Like

Hi all,
I have almost the same problem as the first post by fxtr8er
Here are the settings:

Round Lot size: 1
Margin Deposit: 1000
Tick Size: 0.0001
Point Value: 100000

Base Currency: USD

Consider the below picture on USDCAD.
Entry: 1.2989
Exit: 1.2992

Profit= 100000 * (1.2992 - 1.2989) / 1.2992 = 23.09 USD

However, Amibroker calculate it to be 61.61 USD

I did all the settings based on documentation and set the "Currency" field to "CAD" in "Information" window.
The same error occurs for other no USD pairs such as EURCAD.
Note that if pairs that USD is the 2nd pair, the profit calculated correctly.
Does anyone know how to fix this error?!


It is user error on your end.

You have to check Tools - Preferences - Currencies having added dynamic rate symbol.