Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Modified Zig Zag

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

    Modified Zig Zag

    Attempting to modify the Original Zig Zag to only add Plot for High

    AddPlot(Brushes.DodgerBlue, NinjaTrader.Custom.Resource.NinjaScriptIndicatorNa meZigZag);

    or AddPlot for each High and Low

    what should replace the NinjaTrader.Custom.Resource.NinjaScriptIndicatorNa meZigZag

    Thanks

    #2
    Hello DTSSTS,

    Thanks for your post.

    You can replace this with any string name you wish, for example AddPlot(Brushes.DodgerBlue, "MyPlot");

    Comment


      #3
      I do understand that, but how do I get the the Plot to be the High ONLY plots, if you plot the using HIGH data you still get the Low plots on charts as well
      Thanks

      Comment


        #4
        Hello DTSSTS,

        Thanks for your reply.

        I'm not sure I understand what you are wanting to do, can you provide a screenshot of a chart with just the price bars and the zigzag and draw on the chart what you are trying to accomplish?

        Comment


          #5
          my screens are 4k and the screen shots are very small so cant see very well, use standard zig zag, plot on Input series of High of bars (NO check for Use High/Low)

          plotting that you will have plots up and down but the down will NOT be the low but be the High (which is fine)

          Example of what trying to accomplish is : chart is onbarclose

          New High Plotted confirmed by 3 lower bars <<-------- this plot is ZigZagHigh[0]

          the previous plot was a lower plot of the High <<--- IS THIS PLOT ZigZagHigh[1]

          and the previous to that plot was a high plot of the High <<--- IS THIS PLOT ZigZagHigh[2]

          TRYING TO ACCOMPLISH THAT

          ZigZagHigh[0] > ZigZagHigh[2 (which on a standard zigzag plot would have been the previous High before the present High)


          thanks

          testing this with strategy and BackBrush drawing when true, but drawings are not correct places

          Comment


            #6
            Attached Files

            Comment


              #7
              Hello DTSSTS,

              Thanks for your reply with the description and the screenshots and have been able to replicate so I understand what you are trying to accomplish in the strategy.

              The use of the Bars ago index ZigZagHigh[0], [1], [2] will not work because these are a bars ago reference and they provide the value of the ZigZagHigh as it was known on that bar so using [0],[1],[2] is only pulling the last 3 sequential bar values of the ZigZagHigh.

              I think what you want to do can be done in the Strategy Builder but you would have to experiment and test to find out. Basically, you would create 3 double-type variables to hold the last 3 zigzag highs (name them for example ZZH1, ZZH2, ZZH3). You would need to detect when a new zigzag has formed which would occur on the next bar after the high and you can check the value of the current bar of the zigzaghigh [0] to the value of [2] bars ago. When these values are NOT equal, then a new high is found. at that point you would move the write the ZZH2 into ZZH3, ZZH1 into ZZH@ and finally the current zigzagHigh into ZZH1. You can then compare ZZH1 to ZZH2 or ZZH3, point being that those would be the last 3 high values.
              I would encourage you to use Print statements in the strategy builder to validate that you are detecting when a high occurs and you would do this by printing the bar time, the ZigZagHigh[0], and the ZigZagHigh[2].

              Otherwise, you may find it far easier to work this out in Ninjascript. In Ninjascript you can use the indicators ability to search back and provide the "bars ago" of the last 3 zigzaghighs that you can then compare.
              Reference: https://ninjatrader.com/support/help...tml?zigzag.htm

              Comment


                #8
                I type a long explantion of what is in the image attached here, but It got lost, NOT retyping, but you have me an idea of how to use a SwingHighLow indicator to plot the Green and Red line on the retest of the prior levels THANKS Click image for larger version

Name:	GSSwingTriggers.png
Views:	429
Size:	185.2 KB
ID:	1175840

                Comment


                  #9
                  Hello DTSSTS,

                  Thanks for your reply.

                  If I understand correctly you are stating you have an idea of how to use some other indicator to meet your needs.

                  Comment


                    #10
                    YES for this part of the strategy but may need to use you greater suggestion to move forward on additional conditions, thanks for all the input

                    Comment


                      #11
                      Update: FYI we ended up having a ZigZag Indicator with 6 Plots created - 3 Most Recent High that roll back at New Plots are created H1 H2 H3 ( on new plot H1 becomes H2 and H2 becomes H3 and H3 is no longer plotted. Did the Same for Low

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      599 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      344 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      103 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      558 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      557 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X