NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


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-06-2007, 05:58 PM   #1
PorkChop
Junior Member
 
Join Date: Oct 2007
Posts: 7
Thanks: 0
Thanked 0 times in 0 posts
Default Stochastic Indicator

I am looking for a way other than using the drawing tool to add a 50% line on the stochastic indicator.
The only ones available are the %80 and %20 and I need them as well.

Searched the forums but if I missed it please point me in the right direction.

I’m new to Ninja Trader but I really like the extra features and additional scripts.

Thanks in advance.

P.C
PorkChop is offline  
Reply With Quote
Old 11-06-2007, 08:57 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

Hi PorkChop,

You can do this through a little modification to the source code of the Stochastic indicator.

Open up the Stochastic indicator through the NinjaScript editor and add this line into the Initialize() method.
Code:
Add(new Line(Color.RoyalBlue, 50, "Middle"));
You will then have to save the indicator with another name. Just right click->Save As and choose a new name.
NinjaTrader_Josh is offline  
Reply With Quote
Old 11-07-2007, 06:56 AM   #3
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

Another "out of the box" option is to do the following:

- Add your Stochastics indicator (lets say its in Panel2)
- Add the indicator "ConstantLines"
- Set its "Line1Value" property to a value of 50
- Set its "Panel" property to a value of 2
NinjaTrader_Ray is offline  
Reply With Quote
Old 11-07-2007, 05:24 PM   #4
PorkChop
Junior Member
 
Join Date: Oct 2007
Posts: 7
Thanks: 0
Thanked 0 times in 0 posts
Default Stochastic Indicator

Josh and NinjaTrader_Ray
Both methods work great!.
Thank you both for your quick response and solutions.

Thanks again.

P.C
PorkChop is offline  
Reply With Quote
Old 11-07-2007, 06:59 PM   #5
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

You are very welcome!
NinjaTrader_Ray 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
Dinapoli Stochastic delta88 NinjaScript File Sharing Discussion 34 04-11-2013 07:29 AM
Stochastic Momentum Index geoarb Indicator Development 21 03-14-2012 02:32 AM
Using Strategy Wizard to develope Indicator on Indicator mrlucky1x Indicator Development 3 08-25-2007 04:09 PM
Overlay Stochastic on Price in NT6? pbastowski Charting 2 08-10-2007 05:01 AM


All times are GMT -6. The time now is 05:14 PM.