Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Swing indicator within strategies
Collapse
X
-
Also, if you take note of where the bug happens, it's obviously when a pivot "would have" been detected and so it changed its internal state flag, but then price turned around and went back the other way intrabar, causing it to no longer be a pivot. But Swing does not go back fully to the way it was at the start of the bar - it loses track of the prior state which is why the swing high or swing low disappears. This is the sort of error that is commonplace in indicators that are not designed for intrabar operation and have an "awareness of state". They can be done correctly, it's just that there are lots of details that have to be right. The bug can often be found by noting any field variables in the indicator instance, and following those to figure out which one isn't getting reset back to the first tick of the bar value at the start of each evaluation.
- Likes 1
-
Any official response from any at Ninjatrader considering the excellent recent explanations of the issue on this thread?Originally posted by NinjaTrader_PatrickH View PostHello lillomur,
Thank you for your patience.
I am unable to reproduce the same behavior on my end.
Please send me your log and trace files so that I may look into what occurred. You can do this by going to the Control Center-> Help-> Email Support. Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.
Please list 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.
I look forward to assisting you further.
Comment
-
Hello,
Thanks for your notes.
I was able to reproduce the behavior in question reguarding the Swing indicator and I reported the behavior to the Development team. They will look into the behavior as soon as they are available.
Once the Development team reaches back out to me with their findings I will update this forum thread with more information.
Thanks for reporting the behavior and providing steps to reproduce it.Last edited by NinjaTrader_BrandonH; 05-22-2023, 12:49 PM.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
QuantKey_Bruce - OMG, Thank you for writing about this and confirming things! I've been having strange bugs in indicators and strategies that use swing and ZZ. I suspected there was something buggy like this going on and it was driving me nuts in my debugging. Big thanks! I'm going to re-write pretty much all my logic based on these things.Originally posted by QuantKey_Bruce View PostI just don't use the Swing function - it's easier to just code up something to keep track of the siwng pivots yourself.
But, this is part of a broader context. If you regularly develop strategies that are intrabar, you necessarily must become attuned to the issue that unless you've looked at the code for the indicator and are sure it is correct for intrabar operation, you have to be very cautious. Usually, I don't worry about using simple things like SMA or EMA or RSI or Stochastics and the like but for something that has an "awareness of state" like a Swing or a ZigZag I've learned to be very cautious, and often I'll just code it in-line rather than calling the function because I don't want to risk losing hours trying to track down someone else's mistake, or worse yet, it looking like it was is my fault the strategy doesn't work when I was just relying on a functionality that I should not have relied on. It's the easiest thing in the world when writing an indicator like Swing to miss something about how to "reset" when it swings one way intrabar then swings back the other way and you have to "undo" the state flip you just did by returning to the state you were in before when the bar started. That sounds simple, but in a complex indicator it's easy to miss something and have a subtle bug.
An indicator like Swing absolutely can be fixed, and perhaps NinjaTrader will fix it. But right now, as you can see, we're still at the stage where we're trying to get a common understanding there is a problem, so if you would like to move forward, you should probably just code the swing determination. It's easy to do so. Then, you won't have to worry about whether the inbuilt one does it correctly.
So very annoyed that NT code can't be trusted. I'm done using Ninjacrap syntax now, gonna write everything from scratch instead.
Comment
-
Yes, one learns the hard way that there are certain areas that are really solid, and others where they're solid for ad hoc use like on a chart but if you put them in a strategy that runs intrabar you can't necessarily trust them to give reproducible outcomes because they either weren't designed for intrabar or they have non-deterministic characteristics like they depend on the order some ticks arrive in OnMarketData for different series and things like that. You gradually develop a sort of second sense for where these danger areas are and learn to code defensively in this regard so you don't waste hours and hours chasing ghosts.
Comment
-
It looks like more and more people are coming forward with problems with this issue. The OP posted this issue 5.5 years ago.Originally posted by NinjaTrader_BrandonH View PostHello,
Thanks for your notes.
I was able to reproduce the behavior in question reguarding the Swing indicator and I reported the behavior to the Development team. They will look into the behavior as soon as they are available.
Once the Development team reaches back out to me with their findings I will update this forum thread with more information.
Thanks for reporting the behavior and providing steps to reproduce it.
Are there any updates from ninjatrader on this?
Comment
-
Hello burmaz,
Thanks for your note.
No, there are no updates at this time.
I will update this forum thread with more information as soon as I hear back from the Development team on the matter.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
How come there is no 'feature request' number?Originally posted by NinjaTrader_BrandonH View PostNo, there are no updates at this time.
I will update this forum thread with more information as soon as I hear back from the Development team on the matter.
I mean, it's a bug, but you guys classify everything to
the users as 'feature requests' -- so, what's the number?
Comment
-
Hello bltdavid,
Thanks for your notes.
This is classified as a bug and not as a feature request. Not everything is classified as a feature request.
That said, this bug is being tracked under NT-4641.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
- Likes 1
Comment
-
How long does it usually take for Ninjatrader to correct a bug like this after it has been reported? Days? Weeks? Months?Originally posted by NinjaTrader_BrandonH View PostHello bltdavid,
Thanks for your notes.
This is classified as a bug and not as a feature request. Not everything is classified as a feature request.
That said, this bug is being tracked under NT-4641.
Comment
-
Hello burmaz,
Thanks for your note.
We do not have an ETA that we can provide as to when a resolution will be implemented for this.
There are many factors involved when it comes to testing and implementing a fix for a bug.
You'll find a note regarding a fix for the issue in the release notes when it is implemented.
Release Notes: https://ninjatrader.com/support/help...ease_notes.htm<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
Any updates on this? It's been 5 months since the issue was reported to the development team and we haven't gotten a response yet.Originally posted by NinjaTrader_BrandonH View PostHello burmaz,
Thanks for your note.
We do not have an ETA that we can provide as to when a resolution will be implemented for this.
There are many factors involved when it comes to testing and implementing a fix for a bug.
You'll find a note regarding a fix for the issue in the release notes when it is implemented.
Release Notes: https://ninjatrader.com/support/help...ease_notes.htm
Comment
-
Hello burmaz,
Thanks for your notes.
Yes, I have heard back from the Development team on this matter.
The Development team has investigated the reported behavior and implemented a fix in the latest version release of NinjaTrader (8.1.2.0).
Please update NinjaTrader to the latest version (8.1.2.0) by following the steps below.
To update NinjaTrader- Shutdown all programs including NinjaTrader *important
- Download NinjaTrader from the link below
- Double click the downloaded file to execute it
- Follow the on screen instructions
- Restart NinjaTrader
https://ninjatrader.com/support/help...ease_notes.htm<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, 03-13-2026, 05:17 AM
|
0 responses
87 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
151 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
80 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
53 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
62 views
0 likes
|
Last Post
|

Comment