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 10-28-2008, 12:46 PM   #1
gooph
Junior Member
 
Join Date: Oct 2008
Posts: 14
Thanks: 0
Thanked 0 times in 0 posts
Default Plot Lines

Hello,
Can someone help me with setting up an indicator to do the following.
-Plot 2 horizontal lines - both an overnight high and overnight low (in between market close and open)
-Plot 2 horizontal lines - first hour high and a first hour low (first hour the market is open)
-Plot two more Horizontal user defined lines.

Any help would greatly be appreciated.
gooph is offline  
Reply With Quote
Old 10-28-2008, 01:26 PM   #2
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

I recommend giving it a try in our strategy wizard:
http://www.ninjatrader-support.com/H...verview41.html

If you get stuck provide us with a screen shot of your set up and we will assist.
NinjaTrader_Ben is offline  
Reply With Quote
Old 10-28-2008, 01:30 PM   #3
gooph
Junior Member
 
Join Date: Oct 2008
Posts: 14
Thanks: 0
Thanked 0 times in 0 posts
Default

Am I looking for a strategy or indicator?
gooph is offline  
Reply With Quote
Old 10-28-2008, 01:46 PM   #4
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

You will need to build this as a strategy, but instead of orders you will use drawings. I recommend going through the tutorials first.
NinjaTrader_Ben is offline  
Reply With Quote
Old 10-28-2008, 02:19 PM   #5
gooph
Junior Member
 
Join Date: Oct 2008
Posts: 14
Thanks: 0
Thanked 0 times in 0 posts
Default

So this is my attempt at drawing the high between 630 and 730pst. How would I adjust this so that only 1 line is drawn for that time period.
Attached Images
File Type: jpg 630 and 730.JPG (42.2 KB, 26 views)
gooph is offline  
Reply With Quote
Old 10-28-2008, 05:11 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

You may need to unlock your code and change the signal name of the horizontal line. You don't want it to be a unique name. You just want one line that updates so you want to pass in one name.

DrawHorizontalLine("My horizontal line", High[0], Color.Blue);

Notice the removal of the + CurrentBar part.
NinjaTrader_Josh is offline  
Reply With Quote
Old 10-30-2008, 10:12 AM   #7
gaatr
Junior Member
 
Join Date: Oct 2008
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default Plot Lines NT vs Esig

I am trying to do a similar thing, I want lines to be drawn for entries and exits on my strategy. I have attached a sample from esignal -

Problem - How to draw a horizontal line that continues until price crosses it.

In NT Indicator - When you draw Horizontal Line, the line only lasts for that specific tick/bar - and you have to draw it again for subsequent bars. This poses the problem, when you are using the same name for the bar in a loop etc.

Is this even possible on an indicator, or do you have to use a strategy to accomplish this.

Thanks in advance.

Simon
Attached Images
File Type: jpg ReentryView6.jpg (92.1 KB, 35 views)
gaatr is offline  
Reply With Quote
Old 10-30-2008, 10:16 AM   #8
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

gaatr,

It is possible. I suggest you just use a plot with a style of dash. Then just set the plot to take the value you want for each bar. If you keep setting it to the same value it will end up drawing a horizontal line segment.

Alternatively you may want to use DrawLine() or any of the other draw methods available to you. Play around with it. See what works for you. You do not need a strategy to do chart plotting.
NinjaTrader_Josh is offline  
Reply With Quote
Old 10-30-2008, 10:25 AM   #9
gaatr
Junior Member
 
Join Date: Oct 2008
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default Plot Lines

Thanks Josh. I will play around with it, thanks for the quick response.
gaatr 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
Displaying the label for horizontal plot lines mgbloomfield Indicator Development 12 09-20-2009 02:59 PM
ADX Lines pivot44 Miscellaneous Support 1 05-14-2008 03:03 PM
Saving Drawn Lines and Fib Lines jfalbert19 Charting 6 04-01-2008 07:45 PM
Sma To Plot Color Bars Not Lines avlasov Indicator Development 4 12-08-2007 03:37 PM
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 06:32 PM.