This appears to be a bug. Has anyone seen this and even better, have a fix ?
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
Bug in Swing Indicator ?
Collapse
X
-
-
Originally posted by BAltman View PostAttached is a screen shot showing where the Swing indicator plotted an orange dot (swing low) at a price of 0 (lower right, 8/19 at 15:00).
This appears to be a bug. Has anyone seen this and even better, have a fix ?
Increasing my days to load to 10... fixed it also.
Comment
-
BAltman, thanks for pointing that out - I'll make sure to let development know this scenario so it can be tested as we update the studies for our next major platform update. Can you check sledge's input in the meantime and let me know if increasing the loaded data range would improve the outcome for you?BertrandNinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Bertrand View PostBAltman, thanks for pointing that out - I'll make sure to let development know this scenario so it can be tested as we update the studies for our next major platform update. Can you check sledge's input in the meantime and let me know if increasing the loaded data range would improve the outcome for you?
Changing the end date corrected the problem, but I am writing a custom indicator that uses Swing and I now know there are cases where it won't perform properly.
Is there a time frame for the next major platform update where this might be fixed ?
Comment
-
Originally posted by BAltman View PostHi Bertrand,
Changing the end date corrected the problem, but I am writing a custom indicator that uses Swing and I now know there are cases where it won't perform properly.
Is there a time frame for the next major platform update where this might be fixed ?
If you use "end date = 8/19" and "days to load = 1", it happens.
and you can increase by 1 , each item and it will continue to happen series: (8/20, 2)(8/21,3)...
The problem appears to be at 16:00, a low was put in. the 15:00 bar has no idea for some reason. But as I pointed out earlier, starting on a date with out the issue it works.
I think as long as you don't see the issue - it is fine. ie, have a date that doesn't start with the LOW/HIGH on the 16:00 EST bar.
Comment
-
Originally posted by BAltman View PostThanks Sledge - that's a good clue for when I debug and fix it
I've got other things to do first, but I'll post the fix (if I fix it :-)
Code:if (isSwingLow) { currentSwingLow = swingLowCandidateValue; for (int i=0; i <= strength; i++) SwingLowPlot.Set(i, currentSwingLow); } else if (Low[0] < currentSwingLow) { currentSwingLow = double.MaxValue; SwingLowPlot.Reset(); } else [I][COLOR="Blue"] { if (currentSwingLow != 0.00) SwingLowPlot.Set(currentSwingLow); }[/COLOR][/I]
And also at the HIGH
Code:if (isSwingHigh) { currentSwingHigh = swingHighCandidateValue; for (int i=0; i <= strength; i++) SwingHighPlot.Set(i, currentSwingHigh); } else if (High[0] > currentSwingHigh) { currentSwingHigh = 0.0; SwingHighPlot.Reset(); } else [I][COLOR="Blue"] { if ( currentSwingHigh != 0.00 ) SwingHighPlot.Set(currentSwingHigh); }[/COLOR][/I]
Comment
-
Thanks for the code Sledge, but I am not using this indicator on a chart (I only showed the attached screen shot to demonstrate the bug).
I need to fix the reason that currentSwingLow and currentSwingHigh sometimes come back as 0.0 - I'm using these values in a custom indicator that uses the Swing indicator beneath it...
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by wzgy0920, 04-20-2024, 06:09 PM
|
2 responses
27 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:43 PM
|
||
Started by wzgy0920, 02-22-2024, 01:11 AM
|
5 responses
32 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:33 PM
|
||
Started by wzgy0920, 04-23-2024, 09:53 PM
|
2 responses
74 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:29 PM
|
||
Started by Kensonprib, 04-28-2021, 10:11 AM
|
5 responses
193 views
0 likes
|
Last Post
by Hasadafa
Yesterday, 10:19 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
11 responses
3,235 views
0 likes
|
Last Post Yesterday, 08:07 PM |
Comment