View Full Version : No money going in Realized P&L when trade closes
jlm0@infionline.net
11-08-2007, 08:11 AM
It seems that no money is being shown in the realized column of control center upon closing out of a trade.
NinjaTrader_Ray
11-08-2007, 09:48 AM
Which column?
- Accounts tab
- Strategies tab
If Strategies tab, is it a NinjaScript strategy or ATM strategy
Thanks
jlm0@infionline.net
11-08-2007, 09:54 AM
I am talking about closed trades from a ninjascript strategy not appearing in the Realized column under the Strategies tab.
NinjaTrader_Ray
11-08-2007, 10:22 AM
Thanks for the clarification.
I created a new strategy with only the following code in OnBarUpdate()
if (Historical)
return;
EnterLong();
ExitLong();
I ran it in real-time on a 20 second chart. On each closed trade the "Realized" column under the Strategies tab updates --> Working as expected in this situation.
If you have a reproducible scenario that would be great.
jlm0@infionline.net
11-09-2007, 07:25 AM
This is to confirm that there are no results showing in Realized P&L under the Strategies Tab or the Account Tab for Currency Strategy trading.
This apparently is preventing the following code from working:
if (Position.MarketPosition == MarketPosition.Long && Position.GetProfitLoss(Close[0], PerformanceUnit.Currency) + Performance.RealtimeTrades.TradesPerformance.Curre ncy.CumProfit > 100)
ExitLong("lg");
return;
NinjaTrader_Ray
11-09-2007, 08:08 AM
After further investigation, it seems that there is no problem. Are you on MBT FX? If yes, please increase your order quantity.
1 = 1.
10,000 = 1 MBT lot = 10,000 in notional value etc...
jlm0@infionline.net
11-09-2007, 08:51 AM
I am on Gain, and I can assure you that no results are showing in Realized P&L under Strategies TAb or Account tab.
NinjaTrader_Ray
11-09-2007, 09:02 AM
I am not disputing that you do not see any results.
Please change your quantity to a value of 100,000 and see if it makes a difference.
Thanks.
NinjaTrader_Ray
11-09-2007, 09:06 AM
Disregard my last request on testing with 100,000. Will come back to you after I run some tests with GAIN.
jlm0@infionline.net
11-09-2007, 09:30 AM
Using 100,000 for quantity seems to get the money right in Realized P&L for Accounts tab, but wild looking numbers in Unrealized P&L.
NinjaTrader_Ray
11-09-2007, 12:21 PM
We will have this resolved in Beta3. You will need to place orders on GAIN in simulation for 100,000 = 100,000. When trading GAIN live, 1 = your lot size, either a mini lot of 10,000 or standard lot of 100,000.
jlm0@infionline.net
11-12-2007, 07:46 AM
When do you expect to have Beta 3 available?
NinjaTrader_Ray
11-12-2007, 08:01 AM
It is currently available - http://www.ninjatrader-support.com/vb/showthread.php?t=3994