Period = 7;
AddPlot(new Stroke(Brushes.Blue, 2), PlotStyle.Dot, NinjaTrader.Custom.Resource.RangeValue);
}
else if (State == State.Configure)
{
AddDataSeries(BarsPeriodType.Tick, 1);
}
else if (State == State.Configure)
{
Volumen = VOL(); Print(Volumen);
wma = SMA(Volumen, Period); Print(wma);
}
}
protected override void OnBarUpdate()
{
//Add your custom indicator logic here.
if(CurrentBars[1] < Period)
return;
if(BarsInProgress == 2){
if( CrossAbove(Volumen, wma, 1) )
Value[0] = Closes[1][0];
}
}
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
N/A Value
Collapse
X
-
N/A Value
I am creating an indicator that will record the price each time a condition happens. However, the indicator only shows N/A when loaded in the chart. Since the indicator compiles, how can I find the error?
Code:Tags: None
-
Hello Jorge.andres.o,
Indicator plots are synchronized with the primary series, BarsInProgress 0, only.
Further, you have a cross above condition that must be true for the plot series to be assigned a value. The plot will have not have a value assigned for all bars where there was no cross.
Likely, you are not setting a value for every primary bar for the plot for BarsInProgress 0.
Do you really want to be using a plot if you are not assigning a value on every primary bar?
Perhaps you want to use a drawing object like Draw.Dot() to mark bars where a cross has occurred?
Chelsea B.NinjaTrader Customer Service
-
Hello Chelsea,
Can you explain me the following?
“…Likely, you are not setting a value for every primary bar for the plot for BarsInProgress 0...” can you provide and example please?
“…Indicator plots are synchronized with the primary series, BarsInProgress 0, only…” Can I use multi-timeframes with the indicators?
Thank you so much
Comment
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
153 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
305 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
244 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
345 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
176 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment