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 > Charting

Charting Support for NinjaTrader Advanced Charting.

Reply
 
Thread Tools Display Modes
Old 02-21-2012, 03:37 PM   #1
maratrm
Member
 
Join Date: Feb 2011
Posts: 52
Thanks: 15
Thanked 0 times in 0 posts
Default Price label

Hi!
How can I draw a line on a chart and see the label of price on it?
Thanks
maratrm is offline  
Reply With Quote
Old 02-21-2012, 03:55 PM   #2
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello maratrm,
Thanks for writing in and I am happy to assist you.

You can use the DrawText function along with the DrawLine function to print the price on the chart.

A basic sample code will be
Code:
if (CurrentBar > 20)
{
	DrawLine("tag", 20, Close[0], 2, Close[0], Color.Blue);
	DrawText("str", Close[0].ToString(), 0, Close[0], Color.Blue);
}
Please let me know if I can assist you any further.
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 02-21-2012, 04:09 PM   #3
maratrm
Member
 
Join Date: Feb 2011
Posts: 52
Thanks: 15
Thanked 0 times in 0 posts
Default

Can you explain step by step please
maratrm is offline  
Reply With Quote
Old 02-22-2012, 07:34 AM   #4
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello maratrm,
To assist you further can you tell me, are you trying to draw the lines by hand/manually or coding it using NinjaScript?

Please let me know if I can assist you any further.
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 02-22-2012, 09:23 AM   #5
maratrm
Member
 
Join Date: Feb 2011
Posts: 52
Thanks: 15
Thanked 0 times in 0 posts
Default

I draw the lines by hand/manually
maratrm is offline  
Reply With Quote
Old 02-22-2012, 10:40 AM   #6
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello maratrm,
Unfortunately while drawing the lines manually the price wont be displayed.

As an alternative if you are drawing Horizontal lines then you can use the ConstantLine indicator that comes with NinjaTrader. You can draw upto 4 lines with each instances of the ConstantLines indicator. You can use multiple instances of the indicator.

Please follow the below steps to use the ConstantLine indicator.
  • Right click on the chart.
  • In the context menu click on Indicators….
  • In the Indicator dialog in the left select the ConstantLines indicator in the indicator list.
  • Click on the New button.
  • In the parameters box in the right, set the Line1Value, Line2Value, Line3Value and Line4Value with appropriate values.
  • Click on the Ok button.

You can also try this indicator which draws the price on Horizontal line http://www.ninjatrader.com/support/f...atid=4&lpage=6

Please let me know if I can assist you any further.
NinjaTrader_Joydeep is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Joydeep for this post:
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
price label jimnovak Charting 8 04-07-2011 07:29 AM
Please fix the gridline price label cw30000 Charting 5 12-29-2010 08:48 AM
submitting ExitLongAtLimit() etc with new price and label only changes price adamus Version 7 Beta General Questions & Bug Reports 4 10-15-2010 10:29 AM
drawn line with price in text label on it laredo Miscellaneous Support 1 08-06-2009 02:43 PM
price label of bond futures clearpicks Charting 1 02-03-2009 10:16 AM


All times are GMT -6. The time now is 05:37 AM.