-Brett
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
why doesnt NT understand forex quantities and P/L
Collapse
X
-
Code and results
The code snippet is:
EnterLong((int)(GetAccountValue(AccountItem.Buying Power)/Close[0]), lsSignal + "Long");
The goal is to use all available cash in a trade, buying the currency.
Results end up as follows for EURJPY:
Trades Tab:
Qty: 10000
Entry: 99.87
Exit: 99.88
Profit: 0.01
Executions Tab:
Buy, 10000, 99.87, Entry, Rate=1
Sell, 10000, 99.88, Exit, Rate=0.0127828
I reran the same scenario above, but with a qty of 100,000 (just to see if the result was different and maybe my math was just off) but came up with 0.01 profit on half a pip this time. (rounded, maybe?).
I really apologize if I'm missing something basic here, but I would have expected the price difference (here 0.01) to be multiplied out by the qty (or cash amount purchased - 0.01 for every dollar committed).
Kindly let me know what I'm missing?
*******************************
Edit the above - looks like the profit of 0.01 is actually profit of 0.01%. I had to go to the periods tab and filter through the trading hours to see the actual dollars earned, but they show up much more in line.
Taking this lesson learned back to Strategy Analyzer, the rate column in the executions tab is always 1 and doesn't change to the appropriate denomination. I've the correct data for all major cross-currencies in the database.
For instance, an optimization run on a single pair returns a cumulative return of -15.69%, a total net profit of -$0.14 but the account amount used is $100,000.
Is there something I need to tweak for Strategy Analyzer?Last edited by khoga; 09-11-2012, 07:09 AM.
Comment
-
-
They are equal in the sake that 1 tick and 1 pip represent the smallest possible fluctuation in price. However that does not mean that 1 tick in futures is worth the same amount as 1 tick in forex. Each instrument has it's own point value which will change the cost per tick.MatthewNinjaTrader Product Management
Comment
-
I'm having this same P/L problem in NinjaTrader for Forex. NT does not correctly calculate pnl for forex for me. I have tried to test in live and market replay, and found it only working in market replay if I had immediately downloaded a new bit of market replay data.
Resetting the instruments does not work. I have tried uninstalls, reinstalls, db repairs, even getting rid of my entire NT7 folder and replacing with just a few pieces of fresh market replay data. How can I fix this?
Jim
Comment
-
bump?.................Originally posted by jimi euro View PostI'm having this same P/L problem in NinjaTrader for Forex. NT does not correctly calculate pnl for forex for me. I have tried to test in live and market replay, and found it only working in market replay if I had immediately downloaded a new bit of market replay data.
Resetting the instruments does not work. I have tried uninstalls, reinstalls, db repairs, even getting rid of my entire NT7 folder and replacing with just a few pieces of fresh market replay data. How can I fix this?
Jim
Comment
-
Hello,
Thanks for the the forum post.
To calculate forex PnL correctly you needed to have the converting pairs live data in NinjaTrader. Either in a market analyzer or another chart for example. To confirm this is the problem if you go to the control center->executions tab and look at the executions tab. The column of rate would be 0 or 1. This indicates no conversion has occurred and you need the live data of the forex pair that will convert it to USD data flowing.
Forex traders I recommend going to File->New->Market Analyzer and then right click and add instrument list and add the forex list. This contains the all the major pairs that should fill all your conversion needs for you.
-BrettBrettNinjaTrader Product Management
Comment
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
25 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
121 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
64 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
41 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|


Comment