Go Back   NinjaTrader Support Forum > NinjaTrader 7 > Platform Technical Support

Platform Technical Support General platform technical support for NinjaTrader 7.

Thread Tools Display Modes
Old 04-22-2013, 11:52 AM   #1
Join Date: Jul 2008
Location: Denver
Posts: 91
Thanks: 2
Thanked 4 times in 3 posts
Default Horizontal & Vertical Line Drawing Objects

1. Looks like the max line width for a hor or vert line is 10. Is there a way to increase that?
2. If i draw a hor. ref line at a specific price, is there a way to attach a label to that line that signifies the price? Is there a way to attach a label to the line that says what it represents - "swing high" for example?
3. If I have 3 charts open at different durations, is there a way to draw a ref line on one chart and have that line, at the price show up on all 3 charts at the right location?
4, Is there a way to move the re line to the back to sow up behind other objects or the price chart?
5. Is there a way to change the opacity of the ref line?

Thanks in advance for any help

dmking is offline  
Reply With Quote
Old 04-22-2013, 01:09 PM   #2
NinjaTrader Customer Service
NinjaTrader_ChelseaB's Avatar
Join Date: Dec 2012
Location: Denver, CO
Posts: 7,601
Thanks: 119
Thanked 1,688 times in 1,591 posts

Hello dmking,

Thanks for writing in.

1) The maximum width for a line is 10. This cannot be increased. However, if you are wanting to color a wide area I recommend you use DrawRectangle.

Below is a link to the help guide on DrawRectangle.

2) A horizontal or vertical line does not have the ability to show a price marker.

To add a label to this line you could draw a text box below the line that has the line price. Drawing text a few ticks below or above the line I think would accomplish your goal.

Below is a link to the help guide on DrawText.

3) Yes, you can make a line that extends across all charts that are using that same instrument.

To do this:
  • Double click the line you have drawn
  • In the "Attach to:" drop-down, select the instrument that is followed by (All Charts). For example: ES 06-13 (All Charts)
  • Click OK

4) Yes, you can change the order that objects are on top of each other. This is called the z-order.

To change this:
  • Select an object by clicking on it -> hold the Shift key and then scroll the mouse wheel

Below is a link to the help guide on Navigating a Chart. Please refer to the section 'How to change the z-order (paint order) of a chart object'.

5) Yes, you can change the opacity of a line when declaring the color.
For example:
DrawHorizontalLine("myLine", true, Close[0], Color.FromArgb(50, Color.Blue), DashStyle.Solid, 10);

Please let me know if I can be of any further assistance.
NinjaTrader_ChelseaB is offline  
Reply With Quote
Old 04-14-2015, 06:50 AM   #3
Senior Member
Join Date: Feb 2012
Posts: 123
Thanks: 0
Thanked 1 time in 1 post
Default Horizontal & Vertical Line Drawing Objects Reply to Thread


I understand how to use DrawHorizontalLine and DrawVerticalLine to draw the respective lines. However these methods draw lines that extend across the x-axis and y-axis, respectively. For example, DrawHorizontalLine at a price of 50, will draw a line at 50 that extends over the entire time period of the chart.

How can I draw a horizontal line at a price of 50 at 10am and extends until 10:30? I then want to draw a second such line at a price of 55 from 10:30-11am. So, the first line should only be visible for the period from 10-10:30 and the second line should only be visible from 10:30-11.

Thank you.

ivb73077 is offline  
Reply With Quote
Old 04-14-2015, 07:05 AM   #4
NinjaTrader Customer Service
NinjaTrader_Brandon's Avatar
Join Date: Nov 2011
Location: Denver, CO
Posts: 2,365
Thanks: 38
Thanked 413 times in 364 posts

Hello Isaac,

Thanks for your reply.

You would need to use the line tool to do this.
Below I have provided a link to the DrawLine() section of the help guide.
NinjaTrader_Brandon is offline  
Reply With Quote
Old 04-14-2015, 07:08 AM   #5
Senior Member
Join Date: Feb 2012
Posts: 123
Thanks: 0
Thanked 1 time in 1 post

Excellent. Thank you for the quick reply.
ivb73077 is offline  
Reply With Quote

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
Labels for Horizontal & Vertical Lines Indtrader Platform Technical Support 1 01-18-2011 10:20 AM
Drawing a vertical line NOT using DrawVerticalLine() fxRichard Platform Technical Support 4 01-18-2009 11:50 PM
Drawing Tools - Vertical Line zeller4 Platform Technical Support 2 10-04-2008 06:40 AM
Vertical Line drawing tool ? T2020 Platform Technical Support 3 07-03-2008 10:35 AM

All times are GMT -6. The time now is 05:36 PM.

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content.