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.
          BertrandNinjaTrader Customer Service

          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 schmidtbc16, Today, 03:36 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by RT001, Today, 03:25 PM
            2 responses
            14 views
            0 likes
            Last Post RT001
            by RT001
             
            Started by mbrandau, Today, 01:58 PM
            5 responses
            37 views
            0 likes
            Last Post mbrandau  
            Started by remcovdmeulen, Today, 02:15 PM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_Jim  
            Started by gbrad, Today, 09:57 AM
            7 responses
            16 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X