Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do i anchor a starting point?

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

    How do i anchor a starting point?

    Hi All,

    I'm trying to "anchor" a starting point, for example, if CurrentBar == o, StartingPoint = Close[0].

    Thereafter i plan connect this point with a pivot point.

    Can someone help me please?

    Regards

    Kaywai

    #2
    Best you post a chart and draw a few lines explaining what you wish to do. There are many ways of drawing lines or indicators based on a reference point. A floor pivot, an opening range or an anchored VWAP are all indicators that are anchored in one way or another.

    Comment


      #3
      Hello kaywai,

      Thank you for your post.

      Are you trying to store the price at bar 0? If so, create a double and store the value in that double. Then use the double for your start y value of your drawing object.

      Comment


        #4
        Hi All,

        The starting point is actually the first pivot. I need to anchor it. The attached chart shows multiple instances of what I'm trying to achieve. Any help is much appreciated.

        Regards

        Kay Wai
        Attached Files

        Comment


          #5
          Kay, the storing would happen as your condition to do so is seen (pivot swing for example found). You could then store for example the price point and barnumber via variables or some more advanced object such as a dictionary / list. Unless the condition is seen again > the values would be held in your variables then.

          Comment


            #6
            Originally posted by kaywai View Post
            Hi All,

            The starting point is actually the first pivot. I need to anchor it. The attached chart shows multiple instances of what I'm trying to achieve. Any help is much appreciated.

            Regards

            Kay Wai
            NinjaTrader comes with a zigzag indicator. You could have look at the code - although I feel that the code is somewhat cumbersome.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            160 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            308 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            245 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            349 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            179 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X