Am I closing out the position incorrectly? P&L is there until I do the ExitLong(). I have tried passing nothing and passing the signalName but the strategy tab shows no realized or unrealized profit once I make this call.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ExitLong doesn't show P&L
Collapse
X
-
ExitLong doesn't show P&L
When I go long with an EnterLong(), then have the trade appreciate, and then do an ExitLong(), I see a "Buy to cover" on the chart, but my P&L dissapears and it looks as if the original trade was never made.
Am I closing out the position incorrectly? P&L is there until I do the ExitLong(). I have tried passing nothing and passing the signalName but the strategy tab shows no realized or unrealized profit once I make this call.Tags: None
-
Sorry, should have been more clear, if you look in the strategy tab, when the order is long and above water, the unrealized gains show up. As soon as you close the position using ExitLong(), the unrealized gains goes to zero and realized gains does not increase, it remains at zero.
Comment
-
Shouldn't the realized gains show up in the strategies tab? It does when I close out orders using other methods. And in the cases I am talking about, the PnL on the trade was positive. I will try to look at the performance by right clicking, but something is wrong here, I know its supposed to update that row in the strategies tab in real time. It does when the position is open, but as soon as I close a position (that was created originally as a market order) with ExitLong("signalName") or ExitLong(), the value goes back to zero.
I think something else is up here, thanks for the help but does anyone have any additional ideas?
Comment
-
Would it be possible for someone to try to reproduce this? Just create a strategy through ninja script that EnterLong() market order, then wait until its a few points above and ExitLong(). Watch the strategy tab in the control center. See how the unrealized gains fluctuates as the price of the instrument fluctuates? Once you ExitLong(), does the realized gains update at all?
Comment
-
I'm not going to be at my desk until later this evening. Any way you can try to repro this and tell me if its normal for it to show up in the performance but not in the regular row displayed in the strategies tab? Maybe that row is only for open orders?Originally posted by NinjaTrader_Ray View PostDid you check the performance? Was the trade PnL zero?
Comment
-
Wow, ok then it's not just me. That definitely doesn't seem right. It makes it very hard to monitor multiple strategies in real time if you have to check each one through the strategy performance by right clicking on it.Originally posted by ryker View PostI've got the same problem, although the PnL is reported correctly in the MarketAnalyser (but not the position and the unrealized PnL which are reported correclty in the strategy performance tab!).
Ryker, when you say strategy tab performance you don't mean the tab with strategies in the control center right?
Comment
-
Lets not confuse things here, two different things.
tradefaz, I have tried it here and it works as expected. Please following instructions in prior posts.
ryker,
PnL in MA displays account based PnL, strategy reports strategy based PnL. They are not one to one relationship. I suspect you likely have seen this before but in case you have not, this might be of value - http://www.ninjatrader-support.com/v...ead.php?t=4033RayNinjaTrader Customer Service
Comment
-
Ok now I am confused. Are you saying that after closing out a winning long order from a strategy, that the realized gains column on the row for that strategy in the strategy tab (not the strategy performance window which is right click to get to) will show the new realized gains for that strategy?Originally posted by NinjaTrader_Ray View PostLets not confuse things here, two different things.
tradefaz, I have tried it here and it works as expected. Please following instructions in prior posts.
ryker,
PnL in MA displays account based PnL, strategy reports strategy based PnL. They are not one to one relationship. I suspect you likely have seen this before but in case you have not, this might be of value - http://www.ninjatrader-support.com/v...ead.php?t=4033
Because if that is what you're able to do I am not able to. But if you're saying that its not supposed to show realized gains after a position is closed within a strategy, and that column is purely for displaying unrealized gains on open positions, then I guess its doing what its supposed to do.
Sorry for all the confusion, its a bit difficult to explain all this in writing.
EDIT: I should stop saying realized P&L, i mean realized gains column, sorry.Last edited by tradefaz; 08-21-2008, 12:17 PM.
Comment
-
Ray,
I'm aware of what you say, but both of them should show the same numbers in realized if you trade a strategy on just a symbol and don't trade this symbol anywhere else.
Anyway realized column is not populated in strategy tab (or stays at 0), unrealized sometimes stays at 0 and is sometimes populated (I mean when I'm in position).
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
579 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment