Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Stochastic over indicator
Collapse
X
-
Hello Jessica,
I think the that the thread so far missed an important point.
With NinjaTrader 8 there has been a major change in the architecture. The difference with respect to NinjaTrader 7 is that
-> NinjaTrader 8 does not remap Open, High, Low, Close, Typical, Median and Weighted to Input, when an indicator is applied to another indicator
-> while NinjaTrader 7 remapped everything to Input.
I believe that the new architecture is by far superior to the old one, but it has the implication that the code for all indicators that call Open, High, Low, Close, Typical, Median and Weighted needs to be adapted to allow for applying the indicator to an input series other than price. I have discussed this issue with ChelseaB, and it is been tracked as #SFT-1606.
In fact the following indicators cannot currently be used with an input series other than price, because they do not remap the DataSeries to Input as needed.
- ADX
- ADXR
- Aroon
- Aroon Oscillator
- ATR
- CCI
- DM
- DMI
- Double Stochastics
- Parabolic SAR
- RVI
- Stochastics
- Stochastics Fast
- Ultimate Oscillator
- WilliamsR
The code of these indicators needs to be adapted to allow for using them with an indicator as input series.
When the Stochastics is used on an input series other than price, it will simply return the Stochastics calculated from price, totally ignoring the selected input series. I have coded a sample Stochastics here that allows for selecting a different input series.
-
Hi Jessica,
No problem; I understood v 8.0.5.0 was still being developed.
And yes, the code you posted is the same I have on my indicator (obviously without the exceptions catching).
I think the problem could be either on the internal processing of [0] and [1], regarding with some kind of race condition, or more probably in the coding of "ApproxCompare()" function. I had similar problems developing other platforms, but I guess in this case is more related to the function mentioned.
I'll wait anxiously v 8.0.5.0
(Please test it using the stochastics on another indicator, such as a SMA, as mentioned on previous posts, not just with OHLC series).
Thank you for your time.
Leave a comment:
-
I apologize for the lack of clarity. To clarify, I have access to newer, in-development versions of NinjaTrader, and when I was testing using one of these versions, the behavior you and I observed stopped occurring in these versions. When the next version of NinjaTrader is released, what you observed with regard to K and D out-of-range values should be fixed. If this is not the case, please let us know so we can track down why.
Leave a comment:
-
8.0.5.0? I do not see any release information about it.Originally posted by NinjaTrader_JessicaP View PostYou are correct. Please compare the version of the stochastics indicator I attached in my previous reply to the one on your system. Please also let us know if this persists into the 8.0.5.0 release.
Leave a comment:
-
You are correct. Please compare the version of the stochastics indicator I attached in my previous reply to the one on your system. Please also let us know if this persists into the 8.0.5.0 release.
Leave a comment:
-
Hi Jessica,
I'm currently using NT8 v. 8.0.4.0, which is the one I was using during the session showed in the screenshot I sent; I've looked for newer versions but it seems to be the last one, am I wrong?
Leave a comment:
-
Hello manugarc,
This behavior has been observed to no longer occur in the latest version of NT8. The attached scripts were used to test through the Strategy Analyzer. Please let us know if you observe this behavior continuing into the latest version of NinjaTrader.
Leave a comment:
-
With regard to K and D Stochastics values outside of a 0-100 range,
This behavior was confirmed on our end. We will be investigating this further. Please keep an eye on the NinjaTrader 8 Release Notes page for updates and bugfixes.
Tracking ID: NTEIGHT-11194
Leave a comment:
-
Hello Jessica,
Thank you for your time. Actually I would suggest to test it over a moving average for example, since that would be quite similar to my scenario, where I use the stochastics on another indicator, not the price itself.
I'll check whether it happens on the scenarios you have pointed and I'll tell you as well.
Kind regards.
Leave a comment:
-
Hello manugarc, and thank you for your question.
I have added a simple unit test to the stock Stochastics indicator, and have attached this indicator to this file. To avoid using your code, let's build on this script until it helps us both see and understand what is happening.
If you would like help testing NinjaTrader against your custom code, please feel free to modify the attached code so that it reproduces any scenario in your code. Otherwise I will be using the code attached to this reply alone, updated with any modifications, to ensure :
- Stochastics values below 0 and above 100 never occur
- Using BarsArray[0] as the MIN and MAX input instead of Low and High, respectively, does not cause values outside range, or if it does, the reason is well understood
- Using BarsArray[0][0] as a replacement for Close[0] in a calculation for nom[0] does not cause values outside range, or if it does, the reason is well understood
- This indicator behaves the same way in NT7 and NT8
I'll keep this post updated with the test scenarios I will run, please feel free to suggest more :
- Run under a strategy through the Strategy Analyzer
- Minute, tick, and day data
- Based on Ask, Bid, Last
- ES 03-17, S&P 500 (all)
- 1 year period
- Run through market replay
- As per Strategy Analyzer
- Fast forward, then let alone for 3 hours on tick data
I will report back with my findings.Last edited by NinjaTrader_JessicaP; 02-03-2017, 02:47 PM.
Leave a comment:
-
Hi Chelsea,Originally posted by NinjaTrader_ChelseaB View PostHello manugarc,
These indicators have been corrected in the latest release of NinjaTrader (8.0.4.0). Please update to the latest version and test for the behavior once more.
Let me know if this is a continuing issue with 8.0.4.0.
I'm afraid the problem persists. I'm getting negative values in a number of stochastics I launched yesterday and values over 100 in another one.
I cannot send/show the code of my strategy, but please tell me what information or steps do you want me to take to make it easier for you to solve it if possible.
Thanks in advance.
Leave a comment:
-
You are right; I'm still using 8.0.3.1 (I thought it was the last one); I'll update it right now and of course I'll let you know in a week whether it keeps on going well (Since you've answered so sure about it, I'm also quite sure it will
).
Thank you Chelsea!
Leave a comment:
-
Hello manugarc,
These indicators have been corrected in the latest release of NinjaTrader (8.0.4.0). Please update to the latest version and test for the behavior once more.
Let me know if this is a continuing issue with 8.0.4.0.
Leave a comment:
-
Still not working
Hi,
I've been using the indicator, modified in the way I was indicated (State.Configure => State.DataLoaded) but it keeps on failing. After hours of being active in real-time it goes beyond values 100 and 0 (one direction or the other, depending on the product it's applied to).
Still the same behaviour; I have to deactivate and activate the strategy to get things back to normal, since it works fine over historical values but fails on real-time ones, and the error gets bigger as time goes by.
The problem is that I can't keep on checking when it begins to fail because sooner or later I won't realize on time, so it's becoming a mayor problem for me.
I'm not asking for help on a custom indicator but on a predefined one; Could it be related to 0s and 1s indexes?Last edited by manugarc; 01-31-2017, 05:12 PM.
Leave a comment:
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
647 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
368 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 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
571 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|


Leave a comment: