Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple zigzag for strength 1.

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

    Simple zigzag for strength 1.

    Hello everyone,

    would anyone know how to translate the script below (pinescript) to ninjascript?

    The script is very simple, it only connects the pivots strength 1 with a line, including the pivots on 'outside bars' (bars with pivot high and low at the same time).

    I've already tested the built-in Zigzag, all the ones available on the Ninjatrader User Script Sharing site, and all the free ones available in futures.io, but I still think this one below is the best one for monitoring the formation of all legs in the chart.

    Last edited by rafaelcoisa; 11-01-2022, 09:03 AM.

    #2
    A guy (thanks man) tried to do this translation for Quantower C# script like in the script below, but without the 'outside bar' feature.
    Last edited by rafaelcoisa; 11-01-2022, 09:05 AM.

    Comment


      #3
      Here, an image of the script working:

      Last edited by rafaelcoisa; 11-01-2022, 09:04 AM.

      Comment


        #4
        Hi rafaelcois, thanks for posting.

        The support team is not able to convert scripts from other languages. Other community members will need to volunteer. The platform does come with a Pivots and Swing indicator by default which can be studied through the NinjaScript editor.

        Kind regards,
        -ChrisL

        Comment


          #5
          I understand ChrisL.
          But, the translation of scripts by the support team has already happened in the past.
          Anyway, the Ninjatrader community is big, hope someone who knows pinescript and ninjascript will see my post.

          Comment


            #6
            I tried something but this is going to be more complicated than changing words.
            In pinescript, the values of variables created at the beginning of the script will change as conditions become true or false. It's as if they store the values and wait for the next condition to become true or false and then change it. The function responsible to draw the line always get new value as conditions become true or false.
            With ninjascript does this happen too?

            Comment


              #7
              Hi rafaelcoisa,

              You can make a custom Series<T>. This can be any type and will have a slot index for every bar on the chart:


              OnBarUpdate will be called based on the Calculate setting of your script, by default, OnBarClose. You will normaly update the custom series value within OnBarUpdate.

              Kind regards,
              -ChrisL

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              576 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              334 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              553 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              551 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X