I just installed 6.5 Beta 10 version (from an earlier 6.5 Beta version) and of course now all my indicators using slope are non-functional. I see in the release notes that slope has changed but I cannot determine in what way and/or what is needed to correct the problem...any suggestions? Thank you in advance.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Beta 10 slopes?
Collapse
X
-
Beta 10 slopes?
Hello,
I just installed 6.5 Beta 10 version (from an earlier 6.5 Beta version) and of course now all my indicators using slope are non-functional. I see in the release notes that slope has changed but I cannot determine in what way and/or what is needed to correct the problem...any suggestions? Thank you in advance.Tags: None
-
Yes, I agree...is this code (for example) no longer valid for some reason:
int Period = 8;
SLOPESTD.Set(Slope(StdDev(Close, 14).Value, CurrentBar - Period + 4, CurrentBar));
...I've been using code similar to this for months without issue...now they don't work at all? I haven't changed anything other than update to Beta 10.
Comment
-
No it is not.
Slope(IDataSeries series, int startBarsAgo, int endBarsAgo)
CurrentBar will bring you all the way to the beginning of the chart. Please take note of the Ago portion of the parameters. You are effectively saying start on the 4th to last bar and end on the last bar of the chart. Instead you need to say start on the last bar of the chart and end 4 bars after that.Josh P.NinjaTrader Customer Service
Comment
-
Thanks for the response. I'm looking at the manual here (for CurrentBar):
"A number representing the current bar in a Bars object that the OnBarUpdate() method in an indicator or strategy is currently processing. For example, if a chart has 100 bars of data, the very first bar of the chart (left most bar) will be number 0 (zero) and each subsequent bar from left to right is incremented by 1."
Why do you say that CurrentBar will take "all the way to the beginning of the chart" and that last CurrentBar parameter is stating to end "on the last bar of the chart"? According to the manual above CurrentBar remains what it has always been--the latest bar number.
If I change that code to this:
int Period = 8;
SLOPESTD.Set(Slope(StdDev(Close, 14).Value, CurrentBar, CurrentBar - Period + 4));
The code is no longer useful, it runs although the data is meaningless, it just outputs some downward sloping junk...
I apologize for my confusion, but it's frustrating to suddenly have many indicators non-functional and useless just because I did an upgrade...
Comment
-
Yes CurrentBar is the latest bar number, but when you pass that number into a barsAgo parameter it effectively means go all the way to the beginning of the chart. The latest bar may be numbered bar 200. When you go 200 bars ago, you are now on the first bar of the chart.Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Blaze212, Today, 10:05 PM
|
0 responses
7 views
0 likes
|
Last Post
by Blaze212
Today, 10:05 PM
|
||
Started by ntbone, 07-18-2019, 12:15 PM
|
14 responses
250 views
0 likes
|
Last Post
by BarzTrading
Today, 09:57 PM
|
||
Started by trober, 11-30-2024, 10:58 PM
|
9 responses
30 views
0 likes
|
Last Post
by trober
Today, 09:38 PM
|
||
Started by trober, Today, 02:21 AM
|
5 responses
19 views
0 likes
|
Last Post
by trober
Today, 09:37 PM
|
||
Started by DeskTroll, Today, 12:09 PM
|
3 responses
23 views
0 likes
|
Last Post Today, 03:52 PM |
Comment