NexusFi: Find Your Edge


Home Menu

 





Setting "Line" attributes


Discussion in NinjaTrader

Updated
    1. trending_up 3,145 views
    2. thumb_up 1 thanks given
    3. group 0 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 
Saroj's Avatar
 Saroj 
Arcata, CA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: index futures, oil
Posts: 482 since Jun 2009
Thanks Given: 232
Thanks Received: 416

Can someone please tell me how to set the thickness on the line? I've tried following NT "help" documentation with no luck.

Add(new Line(Color.Red, 200, "Upper Extreme"));
Add(
new Line(Color.Black, 100, "Up Trend"));
Add(new Line(Color.Gray, 0, "Zero Line"));
Add(new Line(Color.Black, -100, "Dn Trend"));
Add(
new Line(Color.Lime, -200, "Lower Extreme"));

One thought I have is that even though lines are not defined in the Properties region, maybe the following approach works:

Lines[0].Pen.Width = 3; // sets the "Upper Extreme" line width to 3
Lines[1].Pen.Width = 2; // sets the "Up Trend" line width to 2
Lines[2].Pen.Width = 1; // sets the "Zero Line" line width to 1
Lines[3].Pen.Width = 2; // sets the "Dn Trend" line width to 2
Lines[4].Pen.Width = 3; // sets the "Lower Extreme" line width to 3

Is that it? But these aren't a dataseries are they?

or maybe:

Add(new Line(new Pen(Color.Red, 3), 200, "Upper Extreme"));
Add(
new Line(new Pen(Color.Black, 2), 100, "Up Trend"));
Add(new Line(new Pen(Color.Gray, 1), 0, "Zero Line"));
Add(new Line(new Pen(Color.Black, 2), -100, "Dn Trend"));
Add(
new Line(new Pen(Color.Lime, 3), -200, "Lower Extreme"));



Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
Victory Day Delivers: Russia-Ukraine Ceasefire Market Cl …
Prediction Markets & Event Contracts
SEC Chairman Calls for New Golden Age of SEC-CFTC Regula …
Traders Hideout
Asia Equities Crash Overnight -- Nikkei -5.2%, KOSPI -6. …
Traders Hideout
NinjaTrader Connect Launches -- Krakens $1.5B Acquisitio …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
22 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Hello Im new here
5 thanks
  #2 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 478 since Jun 2009
Thanks Given: 1,419
Thanks Received: 404

Hi Saroj,

Add(
new Line(new Pen(Color.Lime, 4), 20, "LineAtTwenty"));
is what i use...

looks like you tracked it down

Kirk


Reply With Quote
Thanked by:
  #3 (permalink)
 
Saroj's Avatar
 Saroj 
Arcata, CA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: index futures, oil
Posts: 482 since Jun 2009
Thanks Given: 232
Thanks Received: 416


Thanks much zeller... I checked out the MS doco link but can't sort it out yet... there seem to be so many different ways to skin the plotting cats...


Started this thread Reply With Quote




Last Updated on November 17, 2009


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts