NexusFi: Find Your Edge


Home Menu

 





Setting "Line" attributes


Discussion in NinjaTrader

Updated
    1. trending_up 3,320 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?
Thanks Mike. Godspeed.
The Elite Circle
Warsh Drops Easing Bias, December Hike Now Above 50% -- …
Prediction Markets & Event Contracts
Datafeed for Atas
Platforms and Indicators
Netherlands & Germany Surge as World Cup Field Narro …
Prediction Markets & Event Contracts
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
Afternoon-close session
1 thanks
Franks Trading Journey
1 thanks
Denied 20K payouts: Alpha Futures
1 thanks
FootPrintV2 Chart for NT8
1 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