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

Pivot Indicator

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

    Pivot Indicator

    Hi,

    How can I know how many ticks there are until the next pivot line up and down from the current price, from the PIVOT indicator?


    Thanks, Alejandro

    #2
    Hello ahrt|,

    Thanks for your post.

    You would subtract the value of the pivot lines from the current price, then divide the difference by the TickSize.

    For example:

    int PPticks = Convert.ToInt32((Close[0] - Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).PP[0]) / TickSize); // An example of the PP pivot point value.

    Reference: https://ninjatrader.com/support/help.../?ticksize.htm

    Please let us know if we can be of further assistance.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you Paul

      Comment


        #4
        Hi Paul,

        In the example that I am sending you, you can see that the price is 26410 and R1 is 26404, the difference is -6 ticks.

        With this instruction
        int R1ticks = Convert.ToInt32 ((Close [0] - Pivots (PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20) .R1 [0]) / TickSize); // An example of the R1 pivot point value.
        I get -41

        What am I doing wrong?




        Thanks, Alejandro

        Comment


          #5
          Hello Alejandro,

          Thanks for your reply.

          Please verify that the pivots shown on the chart are set the same way as the indicator is using them, ie: make sure that the Pivots indicator is set to:
          • HLCCalculationMode.CalcFromIntradayData
          • PivotRange.Daily
          I suspect the HLCCalculation mode is set to daily bars and should be set to Calculate from intraday data, to match the indicator you are creating (or vice versa depending on your needs).
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Hi Paul,

            You were right, HLCCalculation mode was set to daily bars.

            Thanks for your help

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by hurleydood, 09-12-2019, 10:45 AM
            14 responses
            1,093 views
            0 likes
            Last Post Board game geek  
            Started by cre8able, Yesterday, 04:16 PM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by cre8able, Yesterday, 04:22 PM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by stafe, 04-15-2024, 08:34 PM
            5 responses
            28 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by StrongLikeBull, Yesterday, 04:05 PM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Working...
            X