NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Miscellaneous Support > Historical Version 7 Beta Threads > Version 7 Beta General Questions & Bug Reports

Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports.

 
 
Thread Tools Display Modes
Old 10-25-2010, 08:08 AM   #1
kumaresh11
Senior Member
 
Join Date: Sep 2009
Posts: 186
Thanks: 0
Thanked 0 times in 0 posts
Default Unrealized and Realized in Strategy Tab

in NT7 sim, don't see values of Unrealized and Realized in Strategy Tab while they are enabled and know, it has some PnL. should I have to change parameters somewhere?
kumaresh11 is offline  
Old 10-25-2010, 08:23 AM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello Kumaresh11,

Can you please post a screenshot of your strategy tab?

To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.
NinjaTrader_RyanM is offline  
Old 11-08-2010, 11:36 AM   #3
ssylwester
Senior Member
 
Join Date: Aug 2010
Location: Locust Valley, NY
Posts: 102
Thanks: 0
Thanked 0 times in 0 posts
Default PnL in strat tab

Same issue here.
The PnL unrealized Does show in Positions tab, but not Strategies. Also, many NT code references to open p&l, closed p&l seem to be ignored (i expect it's same problem).
7.23
ssylwester is offline  
Old 11-08-2010, 12:24 PM   #4
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

The strategies tab will only list PnL generated by that particular strategy instance. It does not show PnL when waiting for a flat state and the wait until flat option is set.

Can you please post a screenshot of your strategies tab so we can isolate what may be happening?
NinjaTrader_RyanM is offline  
Old 11-08-2010, 01:04 PM   #5
ssylwester
Senior Member
 
Join Date: Aug 2010
Location: Locust Valley, NY
Posts: 102
Thanks: 0
Thanked 0 times in 0 posts
Default

OK, see the attached 2 shots (move to far R).
BTW, these are launched from NT code as ATM strats, and managed by DOM/ATM.
Attached Images
File Type: jpg positionsTabFarRight.JPG (693.9 KB, 9 views)
File Type: jpg strategyTabFarRight.JPG (307.9 KB, 6 views)
ssylwester is offline  
Old 11-08-2010, 01:14 PM   #6
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

Thanks for the screenshot.

The only issue here is that we cannot tell weather the positions where generated by the strategy.

I see some output window text but I dont see really anythign that corresponds.

For us to correspond this in we would also need the log file.

Please send the log file to support at ninjatrader dot com and put ATTN: Ryan and also put in the subject line a link to this forum post.

Please send the following file as an attachment.

My Documents--> NinjaTrader 7--> Log--> log.2010051108 for today. (log.yyyymmdd for any other date)

Thanks again for sending in.
NinjaTrader_Brett is offline  
Old 11-08-2010, 02:03 PM   #7
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

Thanks for sending that in, I'm also posting here for other to benefit from.

You are using ATM Strategies with your NinjaScript Strategy.

Essentially what occurs when you use an ATM Strategy the PnL and Position/Avg price information is stored in this secondary Sub Strategy that is running/created and is no longer maintained by the host strategy. Since the ATM Strategy is managing the position now. Since your using ATM Strategies this information will only be displayed on the chart or the DOM Unfortunately at this time since the NinjaScript strategy is not managing the position it cannot display the position information. Since it does not know what is occurring inside that ATM Strategy.

This is something that development is aware of however it is working as expected currently.

Let me know if I can be of further assistance.
NinjaTrader_Brett is offline  
Old 11-10-2010, 04:24 PM   #8
ssylwester
Senior Member
 
Join Date: Aug 2010
Location: Locust Valley, NY
Posts: 102
Thanks: 0
Thanked 0 times in 0 posts
Default

Related to this:

From Ninja script 7.23, i launch a 2-contract ATM. I can see both working in the ATM. When i try to modify the stop loss level, it seems to only modify one of the orders. How do i access both the contracts? and is there a way i can check on the current stop level? i havent found anything in the 7-handbook

launching the strategy:
atmStrategyIdL = GetAtmStrategyUniqueId();
orderIdL = GetAtmStrategyUniqueId();
AtmStrategyCreate(OrderAction.Buy, OrderType.Limit, longEntry, 0,
TimeInForce.Day, orderIdL, myAtm, atmStrategyIdL); }


tightening the stop level:
private void TightenStopL(int amount, string reason)
{ drawColor = Color.White;
if (atmStrategyIdL.Length > 0)
{ if (GetAtmStrategyMarketPosition(atmStrategyIdL) == MarketPosition.Long)
{ newStop = Low[0]-amount*TickSize;
if (_debug2); Print(Time[0].ToString()+header+ " Tightening LONG stops to " + newStop + " "+reason);
drawColor = Color.Red;
//DrawDiamond("newstop"+currentBar, true, 0, newStop, Color.White);
if (takeExits) AtmStrategyChangeStopTarget(0, newStop, "STOP1", atmStrategyIdL);
PlaySound(@"C:\Program Files\NinjaTrader 7\sounds\autotrail.wav");
}
}
DrawText("tgt"+CurrentBar, "tgtn", live, newStop, drawColor);
}
ssylwester is offline  
Old 11-10-2010, 04:32 PM   #9
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello ssylwester,

Are you trying to change manually or through code? Through code, you can use:
http://www.ninjatrader.com/support/h...stoptarget.htm

If you're looking to get the status of your stop loss:
http://www.ninjatrader.com/support/h...rgetorders.htm
NinjaTrader_RyanM is offline  
Old 11-10-2010, 05:53 PM   #10
ssylwester
Senior Member
 
Join Date: Aug 2010
Location: Locust Valley, NY
Posts: 102
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi Ryan, thanks for the response. I'm changing it through code. in fact, i included the code in the original posting. But the code only changes 1 of the 2 orders.
ssylwester is offline  
Old 11-11-2010, 05:49 AM   #11
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
Default

You would need to the same call to change for STOP2 then, right now you only call STOP1 for a change in your snippet provided.
NinjaTrader_Bertrand is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
unrealized/realized valuta symbol wrong currency zweistein Version 7 Beta General Questions & Bug Reports 7 06-10-2010 09:43 AM
Understanding realized and unrealized p/l skat100 Miscellaneous Support 1 12-16-2008 04:09 PM
Unrealized and Realized PnL in points/pips and % in stead of only $ whitegun Suggestions And Feedback 22 11-14-2008 05:54 PM
Unrealized + realized profits? Ninja B Automated Trading 2 10-08-2008 06:57 AM
No Money in unrealized or realized for Forex jlm0@infionline.net Historical NinjaTrader 6.5 Beta Threads 5 11-12-2007 10:35 AM


All times are GMT -6. The time now is 11:15 PM.