Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Modified Zig-zag to plot to most recent swing value
Collapse
X
-
Modified Zig-zag to plot to most recent swing value
Is there a version of the Zigzag indicator ( or can I easily tweak the code ) such that when there is for example several bars with the same consecutive extreme value ( such as micro triple-top or micro triple-bottoms), the zigzag will plot not to the 1st instance but to the most recent instance of that value? -
Hello,
Thank you for the question.
I am not entirely sure how hard it would be to accomplish what you are trying to do, mainly the logic of determining the second instance instead of the first like you want.
You can edit the original ZigZag to your liking, any of the stock indicators in fact.
You would need to make a duplicate of the origianl before you can edit it, you can do that by doing the following:
Click Tools -> Edit NinjaScript -> Indicator -> ZigZag and open it.
In the NinjaScript window, Right click and choose Save As.
Give it a new name.
The NinjaScript window that is already open will now be the new file.
From here you can determine exactly what you need to change and after compiling you will see the new indicator listed in your indicators list with whatever name you gave it.
Please let me know if I may be of additional assistance.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
61 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
40 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
21 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
23 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
51 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment