View Full Version : cant see my indicator in the chart indicators menu
svedat
01-31-2009, 12:43 AM
I developed an indicator and compiled it sucessfully but i cannot see it in the indicators menu of the plotted chart
NinjaTrader_Ben
01-31-2009, 09:24 AM
Hello,
You see all of the other indicators though?
Try posting the indicator and I will test it on my end.
svedat
02-01-2009, 06:46 AM
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);
}
NinjaTrader_Ben
02-01-2009, 09:39 AM
Hello,
Try putting if(CurrentBar < 22) return; right after OnBarUpDate(). This link will help understand why:
http://www.ninjatrader-support2.com/vb/showthread.php?t=3170
If that does not work, let me know.