NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 08-23-2008, 06:01 AM   #1
MoreYummy
Senior Member
 
Join Date: Aug 2008
Posts: 325
Thanks: 0
Thanked 0 times in 0 posts
Default drawing a line above or below a period with the conditions met

I want to draw a line above or below a period with the conditions met.

Lets say if a SMA cross another SMA, then draw something to show the beginning till the end of this condition is true.
MoreYummy is offline  
Reply With Quote
Old 08-23-2008, 12:41 PM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

You can use DrawLine() and programmatically do it inside your NinjaScript Strategy.
NinjaTrader_Josh is offline  
Reply With Quote
Old 08-23-2008, 02:00 PM   #3
MoreYummy
Senior Member
 
Join Date: Aug 2008
Posts: 325
Thanks: 0
Thanked 0 times in 0 posts
Default

How do you do it to draw a line from the first bar that met the condition till the last bar that met the condition?

Is there a document for this DrawLine() function?
MoreYummy is offline  
Reply With Quote
Old 08-23-2008, 03:02 PM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

You choose the startBar and the endBar parameters for the DrawLine to decide where it draws. You need to program logic to decide where the start bar is and where the end bar is. http://www.ninjatrader-support.com/H.../DrawLine.html
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
Allow for line width 0 when drawing boxes tobbe Suggestions And Feedback 2 08-10-2008 04:39 AM
Rev Conditions Dobbes Strategy Development 0 08-05-2008 08:57 AM
Vertical Line drawing tool ? T2020 Charting 3 07-03-2008 10:35 AM
Price Marker(s) on Horizontal Line and other Drawing Tools adamnjen Suggestions And Feedback 3 04-29-2008 07:12 AM
Period 14 crossing Period Linear Regression 25 Viper3 Strategy Development 8 10-21-2007 10:51 AM


All times are GMT -6. The time now is 10:41 PM.