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 01-31-2009, 12:43 AM   #1
svedat
Junior Member
 
Join Date: Sep 2007
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
Default cant see my indicator in the chart indicators menu

I developed an indicator and compiled it sucessfully but i cannot see it in the indicators menu of the plotted chart
svedat is offline  
Reply With Quote
Old 01-31-2009, 09:24 AM   #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,

You see all of the other indicators though?

Try posting the indicator and I will test it on my end.
NinjaTrader_Ben is offline  
Reply With Quote
Old 02-01-2009, 06:46 AM   #3
svedat
Junior Member
 
Join Date: Sep 2007
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
Default


protectedoverridevoid Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Zobv1"));
Add(new Plot(Color.FromKnownColor(KnownColor.Green), PlotStyle.Line, "Zobv9"));
Add(new Plot(Color.FromKnownColor(KnownColor.DarkViolet), PlotStyle.Line, "Zobv21"));
CalculateOnBarClose = true;
Overlay = false;
PriceTypeSupported = false;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.\
double Obv1=OBV()[0];
Zobv1.Set(Obv1);
Obv9=EMA(OBV(),9)[0];
Zobv9.Set(Obv9);
Obv21=EMA(OBV(),21)[0];
Zobv21.Set(Obv21);
}
svedat is offline  
Reply With Quote
Old 02-01-2009, 09:39 AM   #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,

Try putting if(CurrentBar < 22) return; right after OnBarUpDate(). This link will help understand why:
http://www.ninjatrader-support2.com/...ead.php?t=3170

If that does not work, let me know.
NinjaTrader_Ben 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
Moving indicators on the chart unclelou Charting 2 01-27-2009 05:25 PM
Indicator not in indicators list on chart. CraigC Indicator Development 3 06-17-2008 09:29 PM
FR: 'Open Chart' command in the Right-Click Context Menu Elliott Wave Market Analyzer 3 05-05-2008 08:58 AM
This is how the indicator menu should work... Elliott Wave Suggestions And Feedback 1 04-29-2008 09:52 PM
Drawing on Chart Indicators? ashish Historical NinjaTrader 6.5 Beta Threads 6 11-10-2007 11:59 PM


All times are GMT -6. The time now is 06:48 AM.