![]() |
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
|
|||||||
| Charting Support for NinjaTrader Advanced Charting. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Feb 2011
Posts: 52
Thanks: 15
Thanked 0 times in 0 posts
|
Hi!
How can I draw a line on a chart and see the label of price on it? Thanks |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
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);
}
Joydeep M.
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Feb 2011
Posts: 52
Thanks: 15
Thanked 0 times in 0 posts
|
Can you explain step by step please
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
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.
Joydeep M.
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Feb 2011
Posts: 52
Thanks: 15
Thanked 0 times in 0 posts
|
I draw the lines by hand/manually
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
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.
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.
Joydeep M.
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Joydeep for this post: |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |