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 > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 06-23-2009, 03:12 PM   #1
xmms1
Junior Member
 
Join Date: Oct 2008
Posts: 24
Thanks: 0
Thanked 0 times in 0 posts
Default Displaying actual price, stop and limit order

Hello,
I have a followind formula which tells me the actual stop loss in ticks:

Code:
SetStopLoss("", CalculationMode.Ticks, sL, false);
SetProfitTarget("", CalculationMode.Ticks, PT);
EnterShort(DefaultQuantity, "");
Print("Stop loss: " + sL + " ticks.");
but I am missing the absolute price and don't know how to get the actual price of stop or limit working order and opened position price.
I want it to make it work like this:

Code:
Print("Sold at 502.5, stop: 14 ticks at 501.1, profit 40 ticks at 506.5.");
and show this as a new indicator. It would give me a good summary of my actual situation.
Please help.
xmms1 is offline  
Reply With Quote
Old 06-23-2009, 11:17 PM   #2
sefstrat
Member
 
Join Date: Jan 2009
Posts: 89
Thanks: 0
Thanked 1 time in 1 post
Default

Position.AvgPrice gives you the average entry price (or the exact price if all contracts were executed at the same entry price)
sefstrat is offline  
Reply With Quote
Reply

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
Stop limit order and Stop Market Order... Fritztx SuperDOM and other Order Entry Windows 4 05-17-2009 02:03 PM
Stop Limit with Price Improvement daven ATM Strategies (Discretionary Trading) 22 03-10-2009 10:07 AM
globex stop limit vs stop order ct Miscellaneous Support 3 04-04-2008 12:21 PM
double stop limit before stop order? ct Strategy Development 8 01-02-2008 02:59 AM
Submit Limit Entry Order and Stop Loss Order at same time? aspTrader Miscellaneous Support 2 10-04-2006 02:40 AM


All times are GMT -6. The time now is 01:13 AM.