• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Modified Zig-zag to plot to most recent swing value

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Yeah, I've been trying to do that but have not yet figured out what to change in the code, to do this. I've seen some closed-source indictors that do it, but so far no open-source ones.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by luxurious_04, Yesterday, 07:13 PM
      2 responses
      10 views
      0 likes
      Last Post luxurious_04  
      Started by swcooke, Today, 07:35 PM
      0 responses
      5 views
      0 likes
      Last Post swcooke
      by swcooke
       
      Started by Miguel_88, Today, 06:41 PM
      0 responses
      6 views
      0 likes
      Last Post Miguel_88  
      Started by spikeruk, Today, 01:49 PM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by Yandychang, Today, 02:16 PM
      5 responses
      20 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X