NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 11-22-2007, 10:21 PM   #1
DORAIRAJ_S@HOTMAIL.COM
Member
 
Join Date: Sep 2007
Posts: 49
Thanks: 0
Thanked 0 times in 0 posts
Send a message via Yahoo to DORAIRAJ_S@HOTMAIL.COM
Default Drawing parallel lines

Hi Josh / Ray

Please advise on the tool to be used for drawing parallel lines on the charts.

I would like to use this tool to draw a parallel line in parallel to a trend line, drawn using the trendline indicator.

Thanks,
DORAIRAJ_S@HOTMAIL.COM is offline  
Reply With Quote
Old 11-22-2007, 10:23 PM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

http://www.ninjatrader-support.com/H.../DrawLine.html
Use that. Just make sure the two lines have the same slope and then you'll have parallel lines.
NinjaTrader_Josh is offline  
Reply With Quote
Old 11-22-2007, 11:34 PM   #3
DORAIRAJ_S@HOTMAIL.COM
Member
 
Join Date: Sep 2007
Posts: 49
Thanks: 0
Thanked 0 times in 0 posts
Send a message via Yahoo to DORAIRAJ_S@HOTMAIL.COM
Default Parallel line

Can some one help me to develope a code for drawing a parallel line to an existing line in the chart?

Appreciate your help.

Thanks,
DORAIRAJ_S@HOTMAIL.COM is offline  
Reply With Quote
Old 11-22-2007, 11:56 PM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

You will need to determine the slope of the trendline indicator's line and then do some math to draw your own line. Unfortunately I cannot provide exact code for you due to bandwidth reasons.
NinjaTrader_Josh is offline  
Reply With Quote
Old 11-25-2007, 03:20 PM   #5
sbgtrading
Certified NinjaScript Consultant
 
Join Date: Oct 2007
Location: Northern Illinois
Posts: 256
Thanks: 0
Thanked 3 times in 3 posts
Default

Is there any way to query an existing graphical object (such as a line) to get the endpoints of the line?

MT4 lets you do this with "GetObjectData()" or something similar.

Thanks,
Ben
sbgtrading is offline  
Reply With Quote
Old 11-25-2007, 04:49 PM   #6
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

There could be ways to do it in C#, but unfortunately we cannot offer support for that level of programming.
NinjaTrader_Josh is offline  
Reply With Quote
Reply

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
Turning off Avg. & MACD lines jeremymgp Charting 1 08-11-2007 04:41 AM
Draw Horizontal Lines Richard Von Indicator Development 11 08-02-2007 12:23 PM
Extending drawn lines LG Charting 9 04-22-2007 09:32 PM
Horizontal Lines guym Suggestions And Feedback 2 12-07-2006 08:32 AM
more lines in the DOM jeff1 Suggestions And Feedback 4 10-21-2006 02:20 PM


All times are GMT -6. The time now is 04:27 PM.