Can someone provide the lines(s) of code and where to place it(them)?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Modified Swing
Collapse
X
-
Modified Swing
I want to create a modified NT7 Swing indicator that uses an oscillator indicator as its Input Series, and only plot swing highs when >0 and swing lows when <0. I tried to modify the code, but I am not sufficiently knowledgeable to make it work perfectly.
Can someone provide the lines(s) of code and where to place it(them)? -
Hello ScorpioTravis,
Thank you for the post.
While I wouldn't be able to provide the specific syntax for this concept based on your description, I can try to provide help materials or samples of concepts you may be having difficulties with. Can you detail where you got stuck while working on this?
I look forward to being of further assistance.
-
I know what syntax to use, but I can't determine where (line) to insert it to prevent swing high <0 and swing low >0. My modified code works correctly in except in a few instances.
Comment
-
Hello ScorpioTravis,
Thank you for your reply.
With the provided details, I am unsure if it would be possible to say what you need to change in your custom script to prevent that specifically. This would also be difficult to say what line may need to be changed if you have added or subtracted from the script, the line numbers would no longer match the existing script to be able to say something goes on a certain line.
This is an item that you would likely need to provide more specific details about the changes you have made and what specific problems you are unable to overcome. You noted a few instances the code you made does not work correctly, this would be a good starting point for your question in contrast to what you have added.
Would you be able to provide detail on what you changed, and what the specific case is that you see it not working? Very likely a path toward a solution is to use Prints in the script at this location to find what part of the logic is not happening as you expect it to.
The swing indicator is fairly complex in how it works, so if you are trying to prevent its default logic in some way, you would likely need to first review and "walk" through the logic to find how it is setting the data you want to omit. There are plots which are used to render data in this script, and series which are used to store data. This script also has some functions near the bottom that contain loops to find the swings when requested so depending on which part of the script you want to remove will likely require some research as removing that part or changing it may affect how the overall script works.
I look forward to being of further assistance.
Comment
-
"The swing indicator is fairly complex in how it works"
Yes, and therein is my issue. :>) At this point it's not worth the work, I can live with what I have.
Thank you for your time!
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
579 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment