Coding help please for dashed line - NinjaTrader Programming | futures io social day trading
futures io futures trading


Coding help please for dashed line
Updated: Views / Replies:2,599 / 10
Created: by gever17 Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

Coding help please for dashed line

  #1 (permalink)
Elite Member
Cheyenne,Wyoming...USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: NQ, YM
 
Posts: 69 since Nov 2010
Thanks: 329 given, 54 received

Coding help please for dashed line

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

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
USA
 
Futures Experience: Advanced
Platform: NT, TOS
 
Posts: 65 since Aug 2009
Thanks: 10 given, 42 received



gever17 View Post
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...

Reply With Quote
The following user says Thank You to Turning Point for this post:
 
  #4 (permalink)
Elite Member
Cheyenne,Wyoming...USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: 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


Last edited by gever17; January 1st, 2011 at 03:10 PM.
Reply With Quote
 
  #5 (permalink)
Elite Member
Orlando, Florida
 
Futures Experience: Advanced
Platform: NinjaTrader, TradeStation, MultiCharts, eSignal, MetaTrader
Favorite Futures: ES
 
Posts: 56 since Aug 2010
Thanks: 3 given, 66 received

Try

 
Code
                            
Lines[0].Pen.DashStyle=DashStyle.Dash;
Lines[1].Pen.DashStyle=DashStyle.Dash;
Lines[2].Pen.DashStyle=DashStyle.Dash

Reply With Quote
The following 2 users say Thank You to MooreTech for this post:
 
  #6 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,220 since Jun 2009
Thanks: 628 given, 6,318 received
Forum Reputation: Legendary


gever17 View Post
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.

Reply With Quote
The following user says Thank You to cory for this post:
 
  #7 (permalink)
Elite Member
Cheyenne,Wyoming...USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: 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

Reply With Quote
The following user says Thank You to gever17 for this post:
 
  #8 (permalink)
Elite Member
Cheyenne,Wyoming...USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: 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

Reply With Quote
The following user says Thank You to gever17 for this post:
 
  #9 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,356 given, 83,237 received


gever17 View Post
Thanks MooreTech!!!!!


gever17 View Post
Thanks cory for your help!!!

May I also suggest, for your viewing pleasure...

https://futures.io/help-tutorials-how-tos/6661-how-use-thanks-button.html



Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following user says Thank You to Big Mike for this post:
 
  #10 (permalink)
Elite Member
Cheyenne,Wyoming...USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: 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

Reply With Quote

Reply



futures io > > > > > Coding help please for dashed line

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Soft Patch Delusion Is Dashed, Recession on the Way: Roubini Quick Summary News and Current Events 0 August 8th, 2011 08:20 AM
Color coding for indicator line help? hector24 NinjaTrader Programming 8 July 13th, 2011 10:10 PM
Bar back adjusting line coding, is it possible? hector24 NinjaTrader 6 June 24th, 2011 07:40 PM
Coding for beginner max-td NinjaTrader Programming 8 July 21st, 2009 07:42 AM
Coding Standards Saroj NinjaTrader Programming 0 July 10th, 2009 12:31 AM


All times are GMT -4. The time now is 09:09 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-18 in 0.13 seconds with 19 queries on phoenix via your IP 107.20.115.174