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
Improvement to ZigZag Indicator
Collapse
X
-
Hello sinpeople,
Thank you for your post.
You can search our list of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more:
You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem, LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
Let me know if I may be of further assistance.
-
Originally posted by NinjaTrader_Jim View PostHello David,
Thanks for your post.
We may be able to give some direction, but we could not offer a direct path without actually making thee modifications for you.
With regards to #1, you will need to modify the indicator so it assigns plot values with BarsAgo 0 instead of BarsAgo 1. The ZigZag indicator currently always calculates 1 bar ago.
With regards to #2 and #3, I am not sure if this is what you want. When I test on the Simulated Data Feed, keeping the market moving in 1 direction, the ZigZag does get updated with the new high or low, although this happens for at least 1 bar ago, depending on the Calculate mode.
If you want to filter spikes, you can keep track of bar indexes when ZigZag highs and lows are formed, and if you encounter a new ZigZag Low when the last ZigZag Low was 2 bars ago, or N bars ago, you can update the the previous ZigZag Low with the new found ZigZag Low, and you could consider resetting the last ZigZag high.
Series<double>.Reset() - https://ninjatrader.com/support/help...nt8/?reset.htm
This would be the most I could offer for initial insight. Anyone wishing to tackle the task may find other obstacles while trying these modifications and getting something to work.
If you are interested in services to have a modification made for you, we would suggest enlisting the services of a NinjaScript Consultant.
If that interests you, please let me know.
Thank you!
Leave a comment:
-
Hello David,
Thanks for your post.
We may be able to give some direction, but we could not offer a direct path without actually making thee modifications for you.
With regards to #1, you will need to modify the indicator so it assigns plot values with BarsAgo 0 instead of BarsAgo 1. The ZigZag indicator currently always calculates 1 bar ago.
With regards to #2 and #3, I am not sure if this is what you want. When I test on the Simulated Data Feed, keeping the market moving in 1 direction, the ZigZag does get updated with the new high or low, although this happens for at least 1 bar ago, depending on the Calculate mode.
If you want to filter spikes, you can keep track of bar indexes when ZigZag highs and lows are formed, and if you encounter a new ZigZag Low when the last ZigZag Low was 2 bars ago, or N bars ago, you can update the the previous ZigZag Low with the new found ZigZag Low, and you could consider resetting the last ZigZag high.
Series<double>.Reset() - https://ninjatrader.com/support/help...nt8/?reset.htm
This would be the most I could offer for initial insight. Anyone wishing to tackle the task may find other obstacles while trying these modifications and getting something to work.
If you are interested in services to have a modification made for you, we would suggest enlisting the services of a NinjaScript Consultant.
If that interests you, please let me know.
Leave a comment:
-
Improvement to ZigZag Indicator
Hi Folks,
I tried the ZigZag indicator on a volume-based chart using the data from replay connection. I need the following improvement.
1) Update ZigZag Low High point on the current bar which is still in formation. I noticed it only update it on the completed bar if any update is possible. Although in the setup it is calculate on every tick, it didn't work on the latest bar. (For a SMA indicator, I can observe its working on the latest tick if I set it up to calculate on every tick.)
2) After ZigZag high is formed, If there is any new bar with its high higher than the zig zag high, update it immediately. It only add a new zigzag low point after at least N bars without new update on zigzag high, and the low of a forming bar is M+ points to the last zigzag high.
3) After ZigZag low is formed, if there is any new bar with its low lower than the zig zag low update it immediately. It only add a new zigzag high point after at least N bars without new update on zigzag low, and the high of a forming bar is M+ points to the last zigzag low.
2) and 3) is actually the same logic.
I went through the code of ZigZag.But I have no idea how to make the modifications.
Attached a sample picture. By doing the above 1, 2, 3), it can remove the spikes in the picture.
Please guide me how to modified the zigzag indicator. Many thanks! I am using NT8.
Best Regards
David WANGTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by zstheorist, Today, 07:52 PM
|
0 responses
3 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
149 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
||
Started by mattbsea, Today, 05:44 PM
|
0 responses
5 views
0 likes
|
Last Post
by mattbsea
Today, 05:44 PM
|
||
Started by RideMe, 04-07-2024, 04:54 PM
|
6 responses
33 views
0 likes
|
Last Post
by RideMe
Today, 05:31 PM
|
||
Started by tkaboris, Today, 05:13 PM
|
0 responses
5 views
0 likes
|
Last Post
by tkaboris
Today, 05:13 PM
|
Leave a comment: