Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
calling built in indicators
Collapse
X
-
Ok, this is what i need working : OnBarUpdate:
TotalSumSeries[0] = TotalSumSeries[1] + ( Close[0] - Close[1]) * Volume[0] ;
Value[0]= FisherTransform( TotalSumSeries ,Period)[0];
I receive this error:
Error on calling 'OnBarUpdate' method on bar 0: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
please advise.
Comment
-
Hello HighTrade,
Are you making sure you are using valid indexes?
In other words are you ensuring that CurrentBar is greater than any barsAgo value used?
https://ninjatrader.com/support/foru...262#post812262Chelsea B.NinjaTrader Customer Service
Comment
-
this fixed the problem with the error:
if (CurrentBar > 0)
{
TotalSumSeries[0] = TotalSumSeries[1] + ( Close[0] - Close[1]) * Volume[0] ;
}
Value[0]= FisherTransform( TotalSumSeries ,Period)[0];
Print(Value[0]);
the values seems correct, but no plot is shown.
Comment
-
trying to add another value to be returned by the indicator , but nothing shows up in the plot
// Value[0]= FisherTransform( TotalSumSeries ,Period)[0];
Values[1][0] = FisherTransform( TotalSumSeries2 ,Period)[0];
Values[0][0] = FisherTransform( TotalSumSeries ,Period)[0];
Comment
-
Hi , thank you for your response, i got the both plots to show , the only question is why this indicator or the built-in indicator does not show the value for the latest data point ( with the following settings ) :
Data series : number of data series loaded 100, Indicator : setup max bars look back infinite. Visual / displacement 0. , I printed values of the indicator and the current bar. and found that the current bar is printed from bar 0 through bar 66 ( which is one bar before the last price data ?) . I want to be able to show the value for the last price data ? ( P.S. if i use displacement = 1 , it just shifts the plot of values, i.e the value for the last price data is still not calculated. ) please advise.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
650 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
577 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment