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!
See more
See less

Partner 728x90

Collapse

Drawing two rays in a zigzag artifact I don’t know how to solve

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

    Drawing two rays in a zigzag artifact I don’t know how to solve

    Hello!!
    I have the following problem. I'm trying to implement a wolf wave pattern. All correct conditions are marked and drawing two rays on the knee zigzig! On a small Deviation, everything seems to work well and everything is drawn correctly and according to the condition, and when Deviation is large or medium (in Renko 10 Deviation = 0.15 percentage calculation), artifacts begin and everything is not drawn correctly, namely, the beginning and end of the rays are not put on the zigzag knee and with a very large deviation one of the rays is even the other way

    Here is what I want to implement.

    This is what happens on a small Deviation

    Here are the artifacts with medium and large Deviation

    And another question is how do I get the price values ​​of the beam relative to bar 0 or 1

    #2
    I spread the code ........................
    Attached Files

    Comment


      #3
      Hello oscsoft,

      Thanks for your post(s).

      The rays are drawing backward because that is what the code is telling them to do, While you are checking the zigzag high/low values for your pattern you probably need to check that bars ago of the instances you are drawing from/to are less than your starting point of the Low 3.

      To visually debug, you may want to draw using colored dots for each of the two points you are drawing the rays to/from (actually 3 dots as both rays start at the same point). I would also recommend drawing a vertical line at the current bar when you are drawing the rays, as this will give you a visual reference to when the latest occurrence of the conditions to draw was last true.

      "And another question is how do I get the price values ​​of the beam relative to bar 0 or 1" I am understanding that Beam means Ray, if that is not correct please clarify. To determine the Y value of a ray, you would need to determine the slope of the line and then project that slope to the distance of the current bar. I have previously provided you with a means to do that in this thread: https://ninjatrader.com/support/foru...-the-drawn-ray
      Paul H.NinjaTrader Customer Service

      Comment


        #4
        I did as you said marked points even increased the amount of calculated bars! it is useless anyway in some areas all three points are not drawn on the zigzag's knees. Perhaps this condition somehow affects and how to fix it? but the coordinates of the knee of the zigzag are clearly spelled out at my point. Why is this point drawn not on the knee?
        Attached Files

        Comment


          #5
          Hello oscsoft,

          Thanks for your reply.

          If you want to see the rays drawn on every "knee" you would need to make the "tag names" unique as you have for the dots by adding +CurrentBar to the tag name.

          Here is an example and I also draw a vertical line when the conditions to draw the rays are true.

          Click image for larger version

Name:	oscsoft-2.PNG
Views:	145
Size:	186.0 KB
ID:	1059840
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Paul Hello
            I also added a vertical line and display all the rays however the problem still persists! Once again I want to note the problem! It is simply not displayed correctly and even the conditions are ignored on some parts of the chart! Today updated to 8.0.18.1 did not help!

            Comment


              #7
              Hello oscsoft,

              Thanks for your reply.

              I would not expect an update to resolve the issue as the issue is understanding how the zig-zag is working relative to how you are using it.

              In an earlier post I wrote, "The rays are drawing backward because that is what the code is telling them to do, While you are checking the zigzag high/low values for your pattern you probably need to check that bars ago of the instances you are drawing from/to are less than your starting point of the Low 3.". Have you adjusted your code to account for this? The ray is drawing backward because the #2 instance on the high side is farther back (bars ago) than the #3 instance on the low side. If you check the bars ago of the high side 2nd instance to the low side 3rd instance and find that the high side is a greater barsago, then can you can use the 1st instance of the High side (provided it is less than the low side 3?
              Paul H.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by GussJ, 03-04-2020, 03:11 PM
              15 responses
              3,271 views
              0 likes
              Last Post xiinteractive  
              Started by Tim-c, Today, 02:10 PM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by Taddypole, Today, 02:47 PM
              0 responses
              2 views
              0 likes
              Last Post Taddypole  
              Started by chbruno, 04-24-2024, 04:10 PM
              4 responses
              51 views
              0 likes
              Last Post chbruno
              by chbruno
               
              Started by TraderG23, 12-08-2023, 07:56 AM
              10 responses
              403 views
              1 like
              Last Post beobast
              by beobast
               
              Working...
              X