Trading Articles
Article Categories
Article Tools
Coding help please for dashed line
Updated January 3, 2011
Top Posters
looks_one
gever17
with 6 posts (3 thanks)
looks_two
Big Mike
with 1 posts (1 thanks)
looks_3
Turning Point
with 1 posts (1 thanks)
looks_4
MooreTech
with 1 posts (2 thanks)
Best Posters
looks_one
MooreTech
with 2 thanks per post
looks_two
cory
with 1 thanks per post
looks_3
Big Mike
with 1 thanks per post
looks_4
gever17
with 0.5 thanks per post
trending_up
3,851 views
thumb_up
8 thanks given
group
3 followers
forum
10 posts
attach_file
0 attachments
Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free and simple.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Coding help please for dashed line
(login for full post details)
#1 (permalink )
Cheyenne,Wyoming...USA
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: NQ, YM
Posts: 69 since Nov 2010
Thanks: 329 given,
54
received
Hello,
I am not familiar with ninjascript!!! Would someone please help me out with line issue I am trying to resolve.
I would like to make a solid line a dashed line.
Here is the line code in the indy:
Add(new Line(Color.DarkViolet, -40, "Lower"));
Add(new Line(Color.YellowGreen, 40, "Upper"));
I would like to make these 2 lines dashed when I add the indy to a chart.
Any help would be greatly appreciated!!!!
Thank you for your time
gever17
Can you help answer these questions from other members on futures io?
Best Threads (Most Thanked) in the last 7 days on futures io
(login for full post details)
#3 (permalink )
USA
Experience: Advanced
Platform: NT, TOS
Posts: 65 since Aug 2009
Thanks: 10 given,
43
received
gever17
Hello,
I am not familiar with ninjascript!!! Would someone please help me out with line issue I am trying to resolve.
I would like to make a solid line a dashed line.
Here is the line code in the indy:
Add(new Line(Color.DarkViolet, -40, "Lower"));
Add(new Line(Color.YellowGreen, 40, "Upper"));
I would like to make these 2 lines dashed when I add the indy to a chart.
Any help would be greatly appreciated!!!!
Thank you for your time
gever17
Add( new Plot(Color.Magenta, "PLOTNAME" ));
Plots[ 1 ].PlotStyle = PlotStyle.Line;
Plots[ 1 ].Pen.DashStyle = DashStyle.Dash;
Plots[ 1 ].Pen.Width = 1.0f ;
as an example...
The following user says Thank You to Turning Point for this post:
(login for full post details)
#4 (permalink )
Cheyenne,Wyoming...USA
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: NQ, YM
Posts: 69 since Nov 2010
Thanks: 329 given,
54
received
WOW!!! Thanks for replying so fast Turning Point!!
Maybe I did not give enough information. I added the code you posted and it worked. But it changed the wrong line.
Here is the code for all the lines in the indy:
Add(new Plot(Color.Green, "SMI")); //<<<<Your code dashed this one>>>>>
Add(new Plot(Color.Orange, "SMIEMA"));
Add(new Line(Color.Firebrick, 0, "Zero")); //<<<<<Trying to dash this>>>>>
Add(new Line(Color.Gray, -50, "Lower")); //<<<<<Trying to dash this>>>>>
Add(new Line(Color.Gray, 50, "Upper")); //<<<<<Trying to dash this>>>>>
My bad for not asking for the right help!!!
Thanks again for your help!!!
gever17
(login for full post details)
#5 (permalink )
Orlando, Florida
Experience: Advanced
Platform: NinjaTrader, TradeStation, MultiCharts, eSignal, MetaTrader
Trading: ES
Posts: 57 since Aug 2010
Thanks: 6 given,
73
received
Try
Code
Lines [ 0 ]. Pen . DashStyle = DashStyle . Dash ; Lines [ 1 ]. Pen . DashStyle = DashStyle . Dash ; Lines [ 2 ]. Pen . DashStyle = DashStyle . Dash ;
The following 2 users say Thank You to MooreTech for this post:
(login for full post details)
#6 (permalink )
the coin hunter
virginia
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,030 since Jun 2009
Thanks: 845 given,
7,894
received
gever17
WOW!!! Thanks for replying so fast Turning Point!!
Maybe I did not give enough information. I added the code you posted and it worked. But it changed the wrong line.
Here is the code for all the lines in the indy:
Add(new Plot(Color.Green, "SMI")); //<<<<Your code dashed this one>>>>>
Add(new Plot(Color.Orange, "SMIEMA"));
Add(new Line(Color.Firebrick, 0, "Zero")); //<<<<<Trying to dash this>>>>>
Add(new Line(Color.Gray, -50, "Lower")); //<<<<<Trying to dash this>>>>>
Add(new Line(Color.Gray, 50, "Upper")); //<<<<<Trying to dash this>>>>>
My bad for not asking for the right help!!!
Thanks again for your help!!!
gever17
you are having 2 diff type of objects; a plot and a line. Ninja keeps track of plots you add, the first add plot = plot (0) the second add plot = plot (1). The same with lines, first add line = line(0) etc...So pay attention to order of lines, plots when you refer to them.
The following user says Thank You to cory for this post:
(login for full post details)
#7 (permalink )
Cheyenne,Wyoming...USA
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: NQ, YM
Posts: 69 since Nov 2010
Thanks: 329 given,
54
received
Thanks MooreTech!!!!!
As soon as I saw what you posted the light bulb came on and it made sense. I added the code and it works perfect!
Thanks so much for your help!
gever17
The following user says Thank You to gever17 for this post:
(login for full post details)
#8 (permalink )
Cheyenne,Wyoming...USA
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: NQ, YM
Posts: 69 since Nov 2010
Thanks: 329 given,
54
received
Thanks cory for your help!!!
With the help of you guys and your last post I see now how NT keeps track of plots and lines!
Thanks again for the help!!!
gever17
The following user says Thank You to gever17 for this post:
(login for full post details)
#9 (permalink )
Site Administrator Swing Trader Data Scientist & DevOps
Manta, Ecuador
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
Posts: 49,790 since Jun 2009
Thanks: 32,314 given,
97,610
received
The following user says Thank You to Big Mike for this post:
(login for full post details)
#10 (permalink )
Cheyenne,Wyoming...USA
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: NQ, YM
Posts: 69 since Nov 2010
Thanks: 329 given,
54
received
Thanks Big Mike!!!!
I was just looking for how to post a thanks!!!!!!
gever17
(login for full post details)
#11 (permalink )
Cheyenne,Wyoming...USA
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: NQ, YM
Posts: 69 since Nov 2010
Thanks: 329 given,
54
received
I very much appreciate the time that all of you took to answer my very elementary question!
I now know where the thanks button is also!
gever17
The following user says Thank You to gever17 for this post:
Last Updated on January 3, 2011
Right now
Ongoing
Right now
March
Register to Attend
Elite only
Coming soon
April