Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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 algospoke, Yesterday, 06:40 PM
|
2 responses
23 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
||
Started by ghoul, Today, 06:02 PM
|
3 responses
15 views
0 likes
|
Last Post Today, 06:43 PM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
45 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
22 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
181 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
Comment